Every Matrix Tells the Same Story

The Singular Value Decomposition says that every matrix A∈Rm×nA \in \mathbb{R}^{m \times n} can be written as:

A=UΣVTA = U \Sigma V^T

where UU is m×mm \times m orthogonal, VV is n×nn \times n orthogonal, and Σ\Sigma is diagonal with non-negative entries σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0.

In words: every linear transformation is a rotation, followed by a scaling along coordinate axes, followed by another rotation. No matter how tangled the matrix looks, its action decomposes into these three clean steps.

1. The Geometry: Ellipsoids From Spheres

Apply AA to the unit sphere {x:∥x∥=1}\{x : \|x\| = 1\} in Rn\mathbb{R}^n. The image is an ellipsoid in Rm\mathbb{R}^m.

  • The directions of the ellipsoid’s axes are the left singular vectors (columns of UU).
  • The lengths of the semi-axes are the singular values σi\sigma_i.
  • The orientations on the input sphere that map to these axes are the right singular vectors (columns of VV).

The rank of AA is the number of nonzero singular values—the dimension of the ellipsoid. The condition number σ1/σr\sigma_1 / \sigma_r measures its eccentricity: a large condition number means the ellipsoid is extremely elongated, and the linear system Ax=bAx = b is sensitive to perturbations along the thin directions.

2. Eckart-Young: Optimal Compression

Theorem: The best rank-kk approximation to AA in both Frobenius and operator norm is:

Ak=∑i=1kσi uiviTA_k = \sum_{i=1}^{k} \sigma_i \, u_i v_i^T

“Best” means minimizing ∥A−B∥\|A - B\| over all matrices BB with rank⁡(B)≤k\operatorname{rank}(B) \leq k. The SVD solves this by keeping the kk largest singular values and discarding the rest.

Why this matters: The fraction of “energy” captured by rank kk is:

∑i=1kσi2∑i=1rσi2\frac{\sum_{i=1}^k \sigma_i^2}{\sum_{i=1}^r \sigma_i^2}

If the singular values decay rapidly, a few components capture most of the structure. This is not a heuristic—it is the provably optimal low-rank approximation.

Connection to projection: just as conditional expectation projects YY onto the subspace generated by XX (keeping the “explained” component and discarding orthogonal noise), the truncated SVD projects the data matrix onto its kk-dimensional principal subspace.

3. PCA Is SVD in Disguise

Given a data matrix X∈Rn×dX \in \mathbb{R}^{n \times d} (rows = samples, columns = features), centered so each column has mean zero. The sample covariance is C=1n−1XTXC = \frac{1}{n-1}X^TX.

The eigendecomposition of C=VΛVTC = V \Lambda V^T gives the principal components. But C=1n−1(XTX)C = \frac{1}{n-1}(X^TX), and if X=UΣVTX = U\Sigma V^T, then XTX=VΣ2VTX^TX = V\Sigma^2 V^T.

So the right singular vectors of XX are the principal components, and the singular values of XX determine the explained variance: λi=σi2/(n−1)\lambda_i = \sigma_i^2/(n-1).

In practice, you never form the d×dd \times d covariance matrix. You compute the SVD of XX directly—which is numerically more stable and works even when d>nd > n.

4. The Four Fundamental Subspaces

The SVD reveals the complete anatomy of a linear map A:Rn→RmA: \mathbb{R}^n \to \mathbb{R}^m.

Let r=rank⁡(A)r = \operatorname{rank}(A). The singular vectors split the domain and codomain into orthogonal complements:

Rn=Row⁡(A)⏟r-dim⊕Null⁡(A)⏟(n−r)-dim\mathbb{R}^n = \underbrace{\operatorname{Row}(A)}_{r\text{-dim}} \oplus \underbrace{\operatorname{Null}(A)}_{(n-r)\text{-dim}} Rm=Col⁡(A)⏟r-dim⊕Null⁡(AT)⏟(m−r)-dim\mathbb{R}^m = \underbrace{\operatorname{Col}(A)}_{r\text{-dim}} \oplus \underbrace{\operatorname{Null}(A^T)}_{(m-r)\text{-dim}}

AA is an isomorphism from Row(A)(A) to Col(A)(A)—it maps viv_i to σiui\sigma_i u_i. On Null(A)(A), it annihilates. On Null(AT)(A^T), nothing lands. The SVD makes this perfectly explicit: VV provides the basis for domain, UU for codomain, and Σ\Sigma governs the stretching between them.

5. Pseudoinverse and Least Squares

When Ax=bAx = b has no solution (overdetermined system), the least squares solution minimizes ∥Ax−b∥2\|Ax - b\|^2. The SVD gives it directly:

x+=A+b=VΣ+UTbx^+ = A^+ b = V \Sigma^+ U^T b

where Σ+\Sigma^+ inverts the nonzero singular values and zeros out the rest. This is the Moore-Penrose pseudoinverse.

The geometry: project bb onto Col(A)(A) (via UUTUU^T), then invert the map on the row space. If bb has components in Null(AT)(A^T), those are silently discarded. If the system is underdetermined, the pseudoinverse chooses the minimum-norm solution.

The pseudoinverse is the SVD’s answer to the question: “What is the best you can do with an imperfect linear system?”

Why SVD Is Universal

The SVD is not one algorithm—it is the structural theorem behind:

ApplicationWhat SVD reveals
PCAPrincipal directions of variance
Least SquaresMinimum-norm projection
Low-rank approximationOptimal compression (Eckart-Young)
Condition numberSensitivity to perturbation
PseudoinverseBest “undo” for a non-invertible map
Matrix norms∥A∥2=σ1\|A\|_2 = \sigma_1, ∥A∥F=∑σi2\|A\|_F = \sqrt{\sum \sigma_i^2}

Any time you have a matrix and need to understand its geometry—what it stretches, what it kills, and what subspace captures the action—the SVD is the answer.