The SVD sorts a matrix into pieces by importance. Keeping the important pieces and dropping the rest is the idea behind image compression, noise removal, recommendation systems and principal component analysis.
Multiplying out $U\Sigma V^{T}$ column by column gives the outer-product form $$A = \sigma_1\mathbf{u}_1\mathbf{v}_1^{T} + \sigma_2\mathbf{u}_2\mathbf{v}_2^{T} + \cdots + \sigma_r\mathbf{u}_r\mathbf{v}_r^{T},$$ a sum of rank-1 matrices, largest first. The rank-$k$ approximation $A_k$ keeps the first $k$ terms.
Key idea
Why it works
Worked example: Storage for an image
- Each term needs $\sigma_i$ (1 number), $\mathbf{u}_i$ (400 numbers) and $\mathbf{v}_i$ (600 numbers): $1001$ numbers.
- Twenty terms: $20 \times 1001 = 20{,}020$ numbers.
- The full image has $400 \times 600 = 240{,}000$, so the approximation uses about $8.3\%$ of the storage.
Answer: $20{,}020$ numbers
Worked example: A rank-1 approximation
- $\mathbf{u}_1\mathbf{v}_1^{T}$ $= \begin{bmatrix} \frac{3}{5} \\ \frac{4}{5} \end{bmatrix}\begin{bmatrix} \frac{4}{5} & \frac{3}{5} \end{bmatrix}$ $= \begin{bmatrix} \frac{12}{25} & \frac{9}{25} \\ \frac{16}{25} & \frac{12}{25} \end{bmatrix}$.
- $A_1$ $= 10\,\mathbf{u}_1\mathbf{v}_1^{T}$ $= \begin{bmatrix} \frac{24}{5} & \frac{18}{5} \\ \frac{32}{5} & \frac{24}{5} \end{bmatrix}$.
- Error: $\lVert A - A_1\rVert = \sigma_2 = 1$, small compared with $\sigma_1 = 10$.
Answer: $A_1 = \begin{bmatrix} \frac{24}{5} & \frac{18}{5} \\ \frac{32}{5} & \frac{24}{5} \end{bmatrix}$, error $1$
Worked example: How much is kept?
- Total: $64 + 16 + 4 + 1 = 85$. Kept: $64 + 16 = 80$.
- Fraction: $\frac{80}{85} = \frac{16}{17} \approx 94\%$, using half the terms.
Answer: $\frac{16}{17}$
- Principal component analysis: center a data matrix (rows = people, columns = measurements). Its right singular vectors are the directions of greatest spread, and $\sigma_i^{2}$ measures the spread along each.
- Noise reduction: noise spreads over many small singular values; truncating removes much of it.
- Least squares: the pseudoinverse $A^{+} = V\Sigma^{+}U^{T}$ gives the least-squares solution of smallest length, even when the columns are dependent.
Common mistake