Part II — Linear Algebra & Matrix Decompositions · Chapter 8

Low-rank matrix approximations

Hook

A matrix's SVD splits it into a sum of pieces, each carrying a singular value that measures how much of the matrix that piece accounts for. What happens if you just... throw away the small pieces?

Intuition
3.02.02.03.0
original A
2.52.52.52.5
rank-1 approximation

reconstruction error ‖A - A_k‖_F = 1.000

The rank-1 heatmap keeps only the SVD's largest term; rank-2 keeps both and reconstructs the original exactly. Watch how close rank-1 already gets, and exactly how large the leftover error is.

Formalize

The Eckart-Young theorem says the best possible rank-kk approximation to AA — the one closest to it in Frobenius norm, among every rank-kk matrix — is obtained by keeping only the kk largest terms of AA's SVD:

Ak=i=1kσiuiviAAkF=i>kσi2A_k = \sum_{i=1}^{k} \sigma_i u_i v_i^\top \qquad \|A - A_k\|_F = \sqrt{\sum_{i>k} \sigma_i^2}
  • σi\sigma_i — the ii-th singular value of AA, sorted largest to smallest.
  • ui,viu_i, v_i — the corresponding left and right singular vectors.
  • AkA_k — the best possible rank-kk approximation of AA.
  • F\|\cdot\|_F — the Frobenius norm: the square root of the sum of every entry squared.
  1. Truncation error is exact, not a bound

    The right-hand equation isn't an upper bound — it's the exact error, computable directly from the singular values you dropped, without ever forming AkA_k and subtracting.

  2. Why the small singular values matter least

    Since the dropped singular values are squared and summed, a handful of small σi\sigma_i's contribute far less error than their count alone would suggest — this is what makes low-rank compression work at all.

  3. It's the best rank-k matrix, full stop

    No other rank-kk matrix — found by any method — can get closer to AA in Frobenius norm than AkA_k does. Truncating the SVD isn't just convenient; it's provably optimal.

Play

rank 1: error = 1.000, energy retained = 96.2%

rank 2: error = 0.000, energy retained = 100.0%

σ1=5\sigma_1=5 carries far more of the squared-Frobenius "energy" than σ2=1\sigma_2=1 — which is exactly why dropping σ2\sigma_2 costs so little.

Worked example

A=(3223)A=\begin{pmatrix}3&2\\2&3\end{pmatrix} has singular values σ1=5, σ2=1\sigma_1=5,\ \sigma_2=1, with singular vectors u1=v1=(12,12)u_1=v_1=(\tfrac{1}{\sqrt2},\tfrac{1}{\sqrt2}) and u2=v2=(12,12)u_2=v_2=(\tfrac{1}{\sqrt2},-\tfrac{1}{\sqrt2}):

  1. Build the rank-1 approximation

    A1=5u1v1=512(1111)=(2.52.52.52.5)A_1 = 5 u_1 v_1^\top = 5\cdot\tfrac12\begin{pmatrix}1&1\\1&1\end{pmatrix} = \begin{pmatrix}2.5&2.5\\2.5&2.5\end{pmatrix}.

  2. Compute the error directly

    AA1=(0.50.50.50.5)A - A_1 = \begin{pmatrix}0.5&-0.5\\-0.5&0.5\end{pmatrix}, and AA1F=4×0.52=1=1\|A-A_1\|_F=\sqrt{4\times0.5^2}=\sqrt{1}=1.

  3. Confirm it matches the formula

    Eckart-Young predicts AA1F=σ22=σ2=1\|A-A_1\|_F = \sqrt{\sigma_2^2} = \sigma_2 = 1 — exactly what direct subtraction gave. Retained energy: σ12/(σ12+σ22)=25/2696.2%\sigma_1^2/(\sigma_1^2+\sigma_2^2)=25/26\approx96.2\%.

Checkpoint

A matrix with singular values 6 and 2 is truncated to rank 1. By the Eckart-Young theorem, what is the Frobenius-norm reconstruction error?

4.02.02.04.0
matrix
3.03.03.03.0
rank-1 approx
Pick a value to try it
Summary
AAkF=i>kσi2\|A - A_k\|_F = \sqrt{\sum_{i>k} \sigma_i^2}

Compression, denoising, and dimensionality reduction all lean on the same fact: a matrix's "important" information concentrates in its largest singular values, and the Eckart-Young theorem guarantees that truncating the rest is the best possible rank-kk summary you could build. The capstone ahead applies exactly this to compress an actual image.