Skip to content

The singular value decomposition, explained

6 min read

Short answer

Every matrix factors as A=UΣVTA=U\Sigma V^T with orthogonal U,VU,V and a diagonal Σ\Sigma of singular values σ1≥σ2≥⋯≥0\sigma_1\ge\sigma_2\ge\cdots\ge0. Geometrically, AA rotates, stretches along perpendicular axes by the σi\sigma_i, then rotates again. The σi\sigma_i are the square roots of the eigenvalues of ATAA^TA.

Steps1Form AᵀA and find its eigenvalues λᵢ andeigenvectors (the columns of V)2Singular values σᵢ = √λᵢ goon the diagonal of Σ3Columns of U: uᵢ = A vᵢ / σᵢ4Keep only the largest k terms forthe best rank-k approximationEckart–Young: truncating the SVD gives the closest rank-k matrix.
The SVD exists for every matrix, square or not.

What it tells you

The number of non-zero singular values is the rank. The ratio σ1/σn\sigma_1/\sigma_n is the 2-norm condition number. Small singular values mark directions the matrix almost kills, which is where fragility lives.

Applications

Compression: keep the top kk terms ∑i≤kσiuiviT\sum_{i\le k}\sigma_i\mathbf u_i\mathbf v_i^T to approximate an image or data matrix. PCA is the SVD of centered data. Pseudoinverse and least squares use A+=VΣ+UTA^+=V\Sigma^+U^T.

Worked example

Find the singular values of A=(3045)A=\begin{pmatrix}3&0\\4&5\end{pmatrix}.

ATA=(25202025)A^TA=\begin{pmatrix}25&20\\20&25\end{pmatrix} with eigenvalues 4545 and 55. So σ1=45≈6.708\sigma_1=\sqrt{45}\approx6.708 and σ2=5≈2.236\sigma_2=\sqrt5\approx2.236. Check: σ1σ2=225=15=∣det⁡A∣\sigma_1\sigma_2=\sqrt{225}=15=|\det A|. ✓

Try it yourself

A 100×100100\times100 image matrix has singular values that fall off very quickly. Why is a low-rank truncation a good compression?

Show the answer

The discarded terms have small σi\sigma_i, so they contribute little. Rank kk needs only k(100+100+1)k(100+100+1) numbers instead of 10 00010\,000, and by Eckart–Young it is the best rank-kk approximation.

Keep going with practice

Vidi's linear algebra lessons end with orthogonal matrices and projections, the two ingredients of the SVD.