Euler Hall — free maths guides

Compute an outer product uv^T

Compute uvT entry by entry as ui times vj. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

Plain words first

Takeuu withmm entries andvv withnn entries.

  • -uTvu^{\mathrm{T}}v is a row times a column: one number, the dot product.
  • -uvTuv^{\mathrm{T}} is a column times a row: anm×nm\times n matrix.

For the matrix, entry(i,j)(i,j) isuivju_iv_j. Nothing is summed, so each entry is just one multiplication.

uvT=[u1v1u1v2⋯u2v1u2v2⋯⋮].uv^{\mathrm{T}}=\begin{bmatrix}u_1v_1 & u_1v_2 & \cdots\\ u_2v_1 & u_2v_2 & \cdots\\ \vdots & & \end{bmatrix}.

Rowii of this matrix isuiu_i times the whole ofvTv^{\mathrm{T}}; columnjj isvjv_j times the whole ofuu. Every row is a multiple of one row, every column a multiple of one column, so the rank is11 unless a vector is zero.

Why nothing is summed

Compare the index patterns. InuTvu^{\mathrm{T}}v both indices run over the same range and are summed:∑iuivi\sum_i u_iv_i. InuvTuv^{\mathrm{T}} the index onuu is the row and the index onvv is the column, so they are independent and nothing collapses. That is the entire difference, and it is why one operation returns a scalar and the other returns a matrix.

It also explains the shape rule.uu ism×1m\times1 andvTv^{\mathrm{T}} is1×n1\times n, so the inner dimension is11:(m×1)(1×n)=m×n(m\times1)(1\times n)=m\times n. An inner dimension of11 is exactly the "no summation" case.

Worked example, and the rank

Look at the columns. Column 1 is(1,3,2)=u(1,3,2)=u, column 2 is2u2u, column 3 is10u10u, column 4 is100u100u. Every column is on the same line — the line throughuu — so the column space is one-dimensional and the rank is11.

Look at the rows:(1,2,10,100)(1,2,10,100), then three times it, then twice it. Every row is a multiple ofvTv^{\mathrm{T}}. So the row space is also one-dimensional, a line, and the two dimensions agree — which they must.

This is the standard example of a rank-one matrix. Every rank-one matrix arises this way: a matrix has rank11 exactly when it equals some column times some row.

By the end you can
  • Compute uv^T entry by entry as u_i times v_j
  • State the shape of uv^T from the lengths of u and v
  • Explain why a nonzero outer product has rank one
Check yourself

u=(1,0,1)u=(1,0,1) andv=(2,−1)v=(2,-1). Write downuvTuv^{\mathrm{T}} and say why its rank is11 without computing the determinant.

Answer

Its rank is11 because it is a nonzero column times a nonzero row: every column is a multiple of(1,0,1)(1,0,1) — column 1 is22 times it, column 2 is−1-1 times it — so the column space is a single line. Column 3 of a3×23\times2 matrix does not exist, and two columns on one line cannot give rank more than11.

Work out where to start — free, no accountAnswer six real questions — free, no account