Singular Value Decomposition
Matrix Decompositions
The singular value decomposition (SVD) factors *any* matrix A in mathbb{R}^{mtimes n} as A = USigma V^top, where U in mathbb{R}^{mtimes m} and V in mathbb{R}^{ntimes n} are orthogonal and Sigma is a (rectangular) diagonal matrix with non-negative entries sigma_1 geq sigma_2 geq dots geq 0 called the
SVD factors any matrix as — rotate, scale, rotate.
No SVD means no stable pseudo-inverse, no PCA, no truncated-SVD recommender, no low-rank LoRA adapters in modern LLMs, and no principled way to diagnose ill-conditioning.
The singular value decomposition (SVD) factors *any* Matrixⓘ as , where and are Orthogonalⓘ and is a (rectangular) diagonal matrix with non-negative entries called the singular valuesⓘ. Unlike eigendecomposition, SVD applies to rectangular and singular matrices — there is no 'diagonalizability' condition to worry about.
Geometrically, every linear map factors as rotate, scale, rotate. rotates input space to align with the data's principal axes, stretches each axis independently (possibly flattening some to zero), and rotates to output space. This decomposition is why SVD is so powerful: it reveals the intrinsic geometric action of any matrix.
Singular values relate to eigenvalues: the are the square roots of the eigenvalues of (or of ). The columns of are the corresponding eigenvectors of (right singular vectors); the columns of are the eigenvectors of (left singular vectors). For symmetric matrices, SVD and eigendecomposition coincide up to sign.
Many matrix diagnostics are read directly off the singular values. The rank of equals the number of non-zero singular values. The condition number measures numerical sensitivity — a large condition number means small input errors blow up. The spectral norm is , and the Frobenius norm is .
Worked example — SVD of a 2×2 matrix: For (already diagonal, positive), the SVD is trivial: , , . Singular values ; both are the identity. Any diagonal matrix with non-negative entries is its own SVD.
Worked example — singular values of a rectangular matrix: For (2×3), compute . Eigenvalues are 1 and 4. So singular values are . Rank = 2 (two non-zero singular values), matching that has full row rank.
SVD is the universal ML tool. The Moore–Penrose pseudo-inverse is — the best-effort inverse for rectangular/singular matrices, used in least-squares regression. PCA on a data matrix is literally the SVD of (centered) . Latent Semantic Analysis, recommender systems, model compression, and low-rank adaptation all reduce to truncating the SVD to keep only the top singular values.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.