Home › Matrix Math › Lesson 10

The Singular Value Decomposition

Lesson 10 of 12

Key idea of this section

A = U Σ V* = ∑i=1r σi ui vi*,     σ₁ ≥ σ₂ ≥ ⋯ ≥ σr > 0
minrank B ≤ k ‖A − B‖₂ = σk+1        minrank B ≤ k ‖A − B‖F = ( ∑i>k σi² )1/2

Existence

Theorem 10.1 (Singular value decomposition). Every A ∈ 𝔽m×n can be written A = UΣV* with U ∈ 𝔽m×m and V ∈ 𝔽n×n unitary and Σ ∈ ℝm×n diagonal with entries σ₁ ≥ σ₂ ≥ ⋯ ≥ σp ≥ 0, p = min(m, n). The singular values σi are uniquely determined by A: they are the square roots of the eigenvalues of A*A.

Proof. The matrix A*A is Hermitian and positive semidefinite, since x*A*Ax = ‖Ax‖² ≥ 0. By the spectral theorem it has an orthonormal eigenbasis v₁, …, vₙ with eigenvalues σ₁² ≥ ⋯ ≥ σₙ² ≥ 0, where σi ≥ 0. Let r be the number of positive σi. For i ≤ r put ui = Avi/σi. These are orthonormal: ui*uj = vi*A*Avj/(σiσj) = σj² vi*vj/(σiσj) = δij. Extend them to an orthonormal basis u₁, …, um of 𝔽m. For i > r, ‖Avi‖² = σi² = 0, so Avi = 0. Therefore Avi = σiui for all i ≤ p (with σi = 0 for i > r) and Avi = 0 for i > m, which is the matrix identity AV = UΣ. Uniqueness of the σi follows from A*A = VΣᵀΣV*. ∎

The SVD exposes everything at once: rank A = r; u₁, …, ur is an orthonormal basis of col(A) and vr+1, …, vₙ of null(A); ‖A‖₂ = σ₁; ‖A‖F² = ∑ σi²; for square A, |det A| = ∏ σi; and for Hermitian A the singular values are the absolute values of the eigenvalues. Geometrically, A maps the unit ball of 𝔽ⁿ onto a (possibly degenerate) solid ellipsoid in col(A) with semi-axes σiui. The compact form A = UrΣrVr* keeps only the first r columns of U and V.

Worked example: A = [ 3 0 ; 4 5 ] gives AᵀA = [ 25 20 ; 20 25 ] with eigenvalues 45 and 5 and eigenvectors v₁ = (1, 1)/√2, v₂ = (1, −1)/√2. So σ₁ = √45 = 3√5 and σ₂ = √5. Then u₁ = Av₁/σ₁ = (3, 9)/(√2 · 3√5) = (1, 3)/√10 and u₂ = Av₂/σ₂ = (3, −1)/√10. Checks: σ₁σ₂ = 15 = |det A| and σ₁² + σ₂² = 50 = 9 + 16 + 25 = ‖A‖F².

The pseudoinverse

The Moore–Penrose pseudoinverse is A⁺ = VΣ⁺U*, where Σ⁺ ∈ ℝn×m has diagonal entries 1/σi for i ≤ r and 0 otherwise. It is the unique X satisfying Penrose's four conditions AXA = A, XAX = X, (AX)* = AX and (XA)* = XA. For every b, the vector x = A⁺b minimizes ‖Ax − b‖, and among all minimizers it has the smallest norm; when A has full column rank, A⁺ = (A*A)⁻¹A*. E. H. Moore described the generalized inverse in 1920 and Roger Penrose rediscovered and characterized it in 1955.

Low-rank approximation

Truncating the dyadic expansion gives Ak = ∑i≤k σiuivi*, a matrix of rank k with ‖A − Ak‖₂ = σk+1 and ‖A − Ak‖F² = ∑i>k σi².

Theorem 10.2 (Eckart–Young–Mirsky). If rank B ≤ k, then ‖A − B‖₂ ≥ σk+1 and ‖A − B‖F ≥ (∑i>k σi²)1/2. Hence Ak is a best rank-k approximation in both norms.

Proof for the spectral norm. Since rank B ≤ k, dim null(B) ≥ n − k. The space spanned by v₁, …, vk+1 has dimension k + 1, so the two spaces share a unit vector x = ∑i≤k+1 civi with ∑|ci|² = 1. Then ‖(A − B)x‖² = ‖Ax‖² = ∑i≤k+1 σi²|ci|² ≥ σk+1², so ‖A − B‖₂ ≥ σk+1. The Frobenius statement is proved in Practice Problem 48. ∎

For the example above, the best rank-one approximation is A₁ = σ₁u₁v₁ᵀ = 3√5 · (1, 3)ᵀ(1, 1)/√20 = (3/2) [ 1 1 ; 3 3 ], and A − A₁ = [ 1.5 −1.5 ; −0.5 0.5 ] has Frobenius norm √(2.25 + 2.25 + 0.25 + 0.25) = √5 = σ₂, as the theorem predicts.

Low-rank approximation underlies principal component analysis (Pearson 1901, Hotelling 1933), where the ui of a centred data matrix are the principal directions (columns as observations; with rows as observations they are the vi); compression, since Ak is stored with k(m + n + 1) numbers instead of mn; latent semantic analysis of text; recommender systems; and the definition of numerical rank as the number of singular values above a tolerance. The SVD was discovered for square real matrices independently by Beltrami (1873) and Jordan (1874), extended by Sylvester (1889), Autonne (1915) and Eckart and Young (1936), and made computable by the Golub–Kahan (1965) and Golub–Reinsch (1970) algorithms. Mirsky (1960) proved that Ak is optimal in every unitarily invariant norm.

Exercise

  • (a)
    Find the singular values of [ 1 1 ; 1 1 ].
  • (b)
    Find the pseudoinverse of the column vector a = (1, 2, 2)ᵀ.
  • (c)
    A 3 × 3 matrix has singular values 4, 2 and 1/2. Find |det A|, ‖A‖F, ‖A‖₂ and the distance in the spectral norm from A to the nearest singular matrix.
Show solution

Answers: (a) AᵀA = [ 2 2 ; 2 2 ] has eigenvalues 4 and 0, so σ₁ = 2 and σ₂ = 0. (b) Here σ₁ = ‖a‖ = 3, u₁ = a/3, v₁ = 1, so a⁺ = v₁u₁ᵀ/σ₁ = aᵀ/9 = (1/9, 2/9, 2/9). (c) |det A| = 4 · 2 · (1/2) = 4, ‖A‖F = √(16 + 4 + 1/4) = √(81/4) = 9/2, ‖A‖₂ = 4, and the distance to the nearest singular matrix is σ₃ = 1/2.

V.3.1