Linear Algebra
9.1310 min read

The SVD Solution

The solution to the linear reduction problem is: compute A=UΣVA = U\Sigma V^\top and take Vk=Uk=[u1,,uk]V_k = U_k = [\mathbf{u}_1, \ldots, \mathbf{u}_k] — the top kk left singular vectors. The minimum reconstruction error is AUkUkAF2=σk+12++σr2\|A - U_k U_k^\top A\|_F^2 = \sigma_{k+1}^2 + \cdots + \sigma_r^2.

The fraction of variance retained is i=1kσi2/AF2\sum_{i=1}^k \sigma_i^2 / \|A\|_F^2. As kk increases, more variance is retained and error decreases. When k=rk = r (rank), the error is zero.

Formal View

Theorem 9.5 — SVD Solves Linear Reduction
The optimal Vk=Uk=[u1,,uk]V_k = U_k = [\mathbf{u}_1, \ldots, \mathbf{u}_k] (first kk left singular vectors of AA). Minimum reconstruction error:
AUkUkAF2=i=k+1min(m,N)σi2.\|A - U_k U_k^\top A\|_F^2 = \sum_{i=k+1}^{\min(m,N)} \sigma_i^2.

Explained variance: i=1kσi2\sum_{i=1}^k \sigma_i^2 out of total AF2=iσi2\|A\|_F^2 = \sum_i \sigma_i^2.

Interactive Visualization

SVD as Three Transformations

Why This Matters

The SVD gives the provably optimal way to compress data while minimizing reconstruction error.

  • PCA: project onto top-kk singular vectors to capture maximum variance.
  • Image compression: only largest singular values and vectors needed.
  • Collaborative filtering: SVD finds latent user/item factors.

Quiz

Question 1

The optimal kk-dimensional subspace for dimensionality reduction is spanned by:

Question 2

Keeping only the top-kk singular vectors minimizes the Frobenius-norm reconstruction error.

Common Mistakes

  • Using right singular vectors VV instead of left singular vectors UU for the reduction subspace.
  • Confusing "top-kk" (largest) with "bottom-kk" — always keep largest singular values.