The idea
The SVD says every matrix — rectangular, singular, ugly, it does not matter — is secretly three simple operations chained together:
rotate (by ), stretch along perpendicular axes (by the diagonal ), rotate again (by ). The columns of are an orthonormal basis of input directions, the columns of an orthonormal basis of output directions, and the singular values are gain knobs pairing them up:
Feed the matrix its -th input direction, get the -th output direction, amplified by . The singular values rank what the matrix actually does: direction 1 is its loudest behavior, and directions with tiny barely matter.
That reading makes the most useful identity in applied linear algebra almost obvious — the matrix as a sum of rank-1 layers:
Keep the loudest layers and you get the truncated SVD , and the Eckart-Young theorem says this greedy choice is optimal: no rank- matrix is closer to , and the squared Frobenius error is exactly the discarded energy . That single theorem is why SVD sits under PCA, LSA/topic models, image compression, and denoising.
Where does it come from? Multiply out : the right singular vectors are the eigenvectors of , and (all because is symmetric PSD). Likewise holds eigenvectors of . So the SVD is eigendecomposition applied to the two symmetric matrices any generates — which is exactly why it exists for every matrix while eigendecomposition of itself may not.
Worked example
Take
Step 1 — form :
Step 2 — find its eigenvalues and singular values:
Two checks account for the determinant and all Frobenius energy:
Step 3 — right singular vectors (eigenvectors of ):
Step 4 — left singular vectors via :
Check: — orthonormal, as promised.
Step 5 — rank-1 truncation. Keeping only the top layer:
which captures of the squared Frobenius energy. The error matrix is
with squared Frobenius norm — Eckart-Young verified on the spot: the residual is exactly the discarded layer .
Cheat sheet
Structure
- , any matrix. Thin/economy form keeps columns; the compact form keeps only the with . Action: .
- ; = eigenvectors of , = eigenvectors of .
- Rank-1 layer form: , layers ordered by importance.
Numbers you can read off the spectrum
| Quantity | In terms of singular values |
|---|---|
| Rank | count of (numerically: above tolerance) |
| Frobenius norm | |
| Spectral norm | (largest amplification factor) |
| Condition number | |
| Best rank-k error | |
| Energy kept at rank k |
Decision rules
- Need best low-rank approximation → truncated SVD (Eckart-Young says nothing beats it).
- Least squares with a nearly rank-deficient design → pseudoinverse (invert only the safely nonzero ).
- PCA at scale → SVD of the centered data matrix directly; never form the covariance matrix (squaring the condition number costs precision).
- Choosing → spectral gap or elbow, cumulative energy target (90-95%), or cross-validate a downstream metric.
Gotchas
- Singular vector pairs have a joint sign ambiguity — flips across library versions or runs are normal, not bugs.
- Recommender-system "SVD" (Netflix Prize) is regularized matrix factorization over observed entries — exact SVD is undefined with missing data, and zero-filling biases factors hard.
- Symmetric matrix with negative eigenvalues: , the sign moves into — singular values are never negative.
- Near-equal trailing singular values mean individual trailing vectors are unstable (the subspace is fine, its basis is not).