Skip to content
VidiMaster it, module by module
Module 5/Singular Value Decomposition

The Singular Value Decomposition

The Spectral Theorem factors a symmetric matrix as A=SDSTA=SDS^T, but it is confined to square — indeed symmetric — matrices. The singular value decomposition lifts that restriction: every matrix, square or rectangular, factors as A=UΣVTA=U\Sigma V^T with UU and VV orthogonal and Σ\Sigma a diagonal matrix of singular values σ1≥σ2≥⋯≥0\sigma_1\ge\sigma_2\ge\cdots\ge 0. This lesson builds the SVD from the eigenvectors of ATAA^TA, rewrites it as a sum of rank-one pieces A=∑iσi uiviTA=\sum_i\sigma_i\,u_iv_i^T, and reads off its geometry: AA sends the unit sphere to an ellipsoid whose semi-axes are the singular values.

Before you start — give these a try

Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.

A 4×34\times 3 matrix AA has ATAA^TA with eigenvalues 16, 9, 016,\ 9,\ 0. What is rank⁡(A)\operatorname{rank}(A)?

Find the matrix Σ\Sigma in an SVD of A=(1221)A=\begin{pmatrix}1&2\\2&1\end{pmatrix}. Put the singular values on the diagonal in decreasing order — Σ\Sigma is the part of the SVD that is uniquely determined.

What you’ll be able to do

  • Define the singular values of an n×mn\times m matrix as the square roots of the eigenvalues of the symmetric matrix ATAA^TA (Definition 9.2), using Lemma 9.3 to see those eigenvalues are nonnegative, and list them in decreasing order σ1≥⋯≥σm≥0\sigma_1\ge\cdots\ge\sigma_m\ge 0.
  • State the Singular Value Decomposition (Theorem 9.3): every n×mn\times m matrix factors as A=UΣVTA=U\Sigma V^T with UU an n×nn\times n orthogonal matrix, VV an m×mm\times m orthogonal matrix, and Σ\Sigma an n×mn\times m matrix carrying the singular values on its diagonal — and explain why this holds even when AA is not square.
  • Construct an SVD by hand: use an orthonormal eigenbasis v1,…,vmv_1,\dots,v_m of ATAA^TA as the columns of VV (Theorem 9.2), set σi=∥Avi∥\sigma_i=\|Av_i\|, and define ui=1σiAviu_i=\tfrac{1}{\sigma_i}Av_i as the first rr columns of UU.
  • Write the rank-one expansion A=σ1u1v1T+⋯+σrurvrTA=\sigma_1u_1v_1^T+\cdots+\sigma_ru_rv_r^T (Remark 9.4), identify r=rank⁡(A)r=\operatorname{rank}(A) with the number of nonzero singular values (Proposition 9.3), and compute ∥A∥=σ1\|A\|=\sigma_1 and ∥A∥F=σ12+⋯+σr2\|A\|_F=\sqrt{\sigma_1^2+\cdots+\sigma_r^2}.
  • Interpret the SVD geometrically — AA maps the unit sphere to an ellipsoid with semi-axes σi\sigma_i along the columns of UU — and explain how the SVD generalizes the Spectral Theorem to arbitrary matrices.

In your course

· MATH2015 · Linear Algebra & Probability
§9.2 The Singular Value Decomposition
  • Lemma 9.3Nonnegative eigenvalues of ATAA^TA
    For any n×mn\times m matrix AA, the symmetric m×mm\times m matrix ATAA^TA has nonnegative eigenvalues.
  • Definition 9.2Singular values
    The singular values of AA are the square roots of the eigenvalues of ATAA^TA, listed with multiplicity in decreasing order σ1≥⋯≥σm≥0\sigma_1\ge\cdots\ge\sigma_m\ge 0.
  • Theorem 9.2Orthonormal basis with orthogonal images
    There is an orthonormal basis v1,…,vmv_1,\dots,v_m of Rm\mathbb{R}^m with Av1,…,AvmAv_1,\dots,Av_m orthogonal and ∥Avi∥=σi\|Av_i\|=\sigma_i.
  • Proposition 9.3Singular values and rank
    rank⁡(A)\operatorname{rank}(A) equals the number of nonzero singular values: σ1,…,σr>0\sigma_1,\dots,\sigma_r>0 and σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0.
  • Theorem 9.3Singular Value Decomposition (SVD)
    Any n×mn\times m matrix factors as A=UΣVTA=U\Sigma V^T with UU (n×nn\times n) and VV (m×mm\times m) orthogonal and Σ\Sigma (n×mn\times m) carrying the singular values on its diagonal.
  • Remark 9.4Rank-one expansion
    A=σ1u1v1T+⋯+σrurvrTA=\sigma_1u_1v_1^T+\cdots+\sigma_ru_rv_r^T, a sum of rank-one matrices formed from the columns of UU and VV.
  • Example 9.1A worked SVD of a 2×32\times 3 matrix
Section numbering follows the MATH2015 notes (§9.2). The matrices UU and VV are not unique — singular-vector pairs may flip sign, and repeated singular values allow rotations — so only Σ\Sigma (singular values in decreasing order), the rank, and the norms ∥A∥=σ1\|A\|=\sigma_1 and ∥A∥F\|A\|_F are uniquely determined and safe to grade.
1

From the Spectral Theorem to any matrix

The Spectral Theorem factors a symmetric n×nn\times n matrix as A=SDSTA=SDS^T, where DD holds the eigenvalues λi\lambda_i and the columns of SS are orthonormal eigenvectors, Aui=λiuiAu_i=\lambda_i u_i. A quiet but crucial consequence is that the image vectors Au1,…,AunAu_1,\dots,Au_n are mutually orthogonal, with ∥Aui∥=∥λiui∥=∣λi∣\|Au_i\|=\|\lambda_i u_i\|=|\lambda_i|. Finding an orthonormal basis of the domain whose images remain orthogonal is exactly the structure we want to keep — and the SVD shows it survives for any matrix AA, even a non-square one. The bridge is the matrix ATAA^TA: for an n×mn\times m matrix AA it is symmetric and m×mm\times m, and by Lemma 9.3 its eigenvalues are nonnegative, since ATAv=λvA^TAv=\lambda v gives ∥Av∥2=vTATAv=λ∥v∥2≥0\|Av\|^2=v^TA^TAv=\lambda\|v\|^2\ge 0, forcing λ≥0\lambda\ge 0. This lets us take square roots: the singular values of AA are σi=λi\sigma_i=\sqrt{\lambda_i} (Definition 9.2), listed in decreasing order σ1≥σ2≥⋯≥σm≥0\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_m\ge 0. Theorem 9.2 then delivers the key fact: there is an orthonormal basis v1,…,vmv_1,\dots,v_m of Rm\mathbb{R}^m — an eigenbasis of ATAA^TA — for which the images Av1,…,AvmAv_1,\dots,Av_m are orthogonal with lengths ∥Avi∥=σi\|Av_i\|=\sigma_i.

2

The decomposition $A=U\Sigma V^T$

Package the basis of Theorem 9.2 into matrices. Let V=[ v1 ⋯ vm ]V=[\,v_1\ \cdots\ v_m\,], an m×mm\times m orthogonal matrix whose columns are an orthonormal eigenbasis of ATAA^TA. For each nonzero singular value set ui=1σiAvi,i=1,…,r,u_i=\frac{1}{\sigma_i}Av_i,\qquad i=1,\dots,r, where r=rank⁡(A)r=\operatorname{rank}(A); these are orthonormal (the AviAv_i are orthogonal with length σi\sigma_i), and we complete them to an orthonormal basis u1,…,unu_1,\dots,u_n of Rn\mathbb{R}^n, giving an n×nn\times n orthogonal matrix U=[ u1 ⋯ un ]U=[\,u_1\ \cdots\ u_n\,]. Since Avi=σiuiAv_i=\sigma_i u_i for i≤ri\le r and Avi=0Av_i=0 otherwise, the relations collect into AV=UΣAV=U\Sigma; right-multiplying by VT=V−1V^T=V^{-1} gives the Singular Value Decomposition (Theorem 9.3), A=UΣVT.A=U\Sigma V^T. Here Σ\Sigma has the same shape as AA (n×mn\times m): its first rr diagonal entries are σ1,…,σr>0\sigma_1,\dots,\sigma_r>0 and every other entry is 00. Unlike diagonalization — which needs AA square, and symmetric to be orthogonal — the SVD exists for every matrix. By Proposition 9.3, the rank rr is exactly the number of nonzero singular values.

3

The rank-one expansion

Multiplying out A=UΣVTA=U\Sigma V^T column by column turns the SVD into a sum of simple pieces (Remark 9.4): A=σ1u1v1T+σ2u2v2T+⋯+σrurvrT,A=\sigma_1 u_1 v_1^T+\sigma_2 u_2 v_2^T+\cdots+\sigma_r u_r v_r^T, where ui,viu_i,v_i are the columns of U,VU,V. Each outer product uiviTu_i v_i^T is an n×mn\times m matrix of rank one — a single 'mode' of AA — and σi\sigma_i weights how strongly that mode contributes. Because the weights are ordered σ1≥σ2≥⋯\sigma_1\ge\sigma_2\ge\cdots, the leading terms carry most of AA; keeping only the largest kk terms yields the best rank-kk approximation of AA, the engine behind image compression, principal component analysis, and latent-factor models. Two norms read straight off the singular values: the operator (spectral) norm ∥A∥=σ1\|A\|=\sigma_1, the largest stretch factor, and the Frobenius norm ∥A∥F=σ12+⋯+σr2\|A\|_F=\sqrt{\sigma_1^2+\cdots+\sigma_r^2}.

4

Geometry and the link to the Spectral Theorem

Read A=UΣVTA=U\Sigma V^T from right to left as three motions: VTV^T rotates or reflects Rm\mathbb{R}^m (orthogonal maps preserve lengths and angles), Σ\Sigma stretches along the coordinate axes by the factors σi\sigma_i, and UU rotates or reflects the result inside Rn\mathbb{R}^n. So AA carries the unit sphere of Rm\mathbb{R}^m to an ellipsoid in Rn\mathbb{R}^n whose semi-axes have lengths σ1,…,σr\sigma_1,\dots,\sigma_r and point along the columns u1,…,uru_1,\dots,u_r of UU. When some σi=0\sigma_i=0 the ellipsoid is flattened into a lower dimension — in Example 9.1 the unit sphere of R3\mathbb{R}^3 maps onto a filled ellipse in R2\mathbb{R}^2 because σ3=0\sigma_3=0 (Figure 9.1). The SVD also generalizes the Spectral Theorem: for a symmetric A=SDSTA=SDS^T the singular values are the absolute eigenvalues σi=∣λi∣\sigma_i=|\lambda_i|, and any negative sign of λi\lambda_i is absorbed by flipping the matching singular vector, so UU and VV differ from SS only by signs. The SVD thus does for arbitrary matrices what orthogonal diagonalization does for symmetric ones.

Theorem 9.3 — Singular Value Decomposition (SVD)

Any n×mn\times m matrix AA can be written as A=UΣVTA=U\Sigma V^T, where UU is an orthogonal n×nn\times n matrix, VV is an orthogonal m×mm\times m matrix, and Σ\Sigma is an n×mn\times m matrix whose first r=rank⁡(A)r=\operatorname{rank}(A) diagonal entries are the nonzero singular values σ1≥⋯≥σr>0\sigma_1\ge\cdots\ge\sigma_r>0 of AA, while all other entries are zero.

Intuition. Take an orthonormal eigenbasis v1,…,vmv_1,\dots,v_m of the symmetric matrix ATAA^TA as the columns of VV; by Theorem 9.2 the images AviAv_i are orthogonal with ∥Avi∥=σi\|Av_i\|=\sigma_i. Normalizing the nonzero ones, ui=1σiAviu_i=\tfrac1{\sigma_i}Av_i, and completing to an orthonormal basis of Rn\mathbb{R}^n gives UU. The relations Avi=σiuiAv_i=\sigma_i u_i bundle into AV=UΣAV=U\Sigma; right-multiplying by VT=V−1V^T=V^{-1} yields A=UΣVTA=U\Sigma V^T.
Theorem 9.2 — Orthonormal basis with orthogonal images

For any n×mn\times m matrix AA there is an orthonormal basis v1,…,vmv_1,\dots,v_m of Rm\mathbb{R}^m such that (1) the vectors Av1,…,AvmAv_1,\dots,Av_m are orthogonal, and (2) their lengths are the singular values, ∥Avi∥=σi\|Av_i\|=\sigma_i.

Intuition. Diagonalize the symmetric matrix ATAA^TA with an orthonormal eigenbasis v1,…,vmv_1,\dots,v_m, so ATAvi=λiviA^TAv_i=\lambda_i v_i with λi=σi2\lambda_i=\sigma_i^2. Then for i≠ji\ne j, (Avi)⋅(Avj)=vjTATAvi=λi (vi⋅vj)=0(Av_i)\cdot(Av_j)=v_j^T A^TA v_i=\lambda_i\,(v_i\cdot v_j)=0 (orthogonal images), and ∥Avi∥2=viTATAvi=λi\|Av_i\|^2=v_i^TA^TAv_i=\lambda_i, so ∥Avi∥=λi=σi\|Av_i\|=\sqrt{\lambda_i}=\sigma_i. This is the heart of the SVD.
Proposition 9.3 — Singular values and rank

If AA is an n×mn\times m matrix of rank rr, then its singular values satisfy σ1≥⋯≥σr>0\sigma_1\ge\cdots\ge\sigma_r>0 and σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0; equivalently, rank⁡(A)\operatorname{rank}(A) equals the number of nonzero singular values.

Intuition. The nonzero images among Av1,…,AvmAv_1,\dots,Av_m are orthogonal, hence linearly independent, and they span the image of AA (every AvAv is a combination of them). A vector gives Avi=0Av_i=0 exactly when ∥Avi∥=σi=0\|Av_i\|=\sigma_i=0. So the count of nonzero singular values is dim⁡(im⁡A)=rank⁡(A)\dim(\operatorname{im}A)=\operatorname{rank}(A).
Remark 9.4 — Rank-one expansion

The SVD can be written as a sum of rank-one matrices, A=σ1u1v1T+⋯+σrurvrTA=\sigma_1 u_1 v_1^T+\cdots+\sigma_r u_r v_r^T, where uiu_i and viv_i are the columns of UU and VV respectively.

Intuition. Expanding the product UΣVTU\Sigma V^T, only the first rr diagonal entries of Σ\Sigma survive, each pairing column uiu_i of UU with row viTv_i^T of VTV^T. The outer product uiviTu_iv_i^T is a rank-one matrix scaled by σi\sigma_i; since σ1≥σ2≥⋯\sigma_1\ge\sigma_2\ge\cdots, the leading terms capture most of AA, which is what makes truncation a good low-rank approximation.

Worked examples

Example 1

Find a singular value decomposition A=UΣVTA=U\Sigma V^T of A=(011110)A=\begin{pmatrix}0&1&1\\1&1&0\end{pmatrix}, and write its rank-one expansion (reproducing Example 9.1).

  1. 1

    Form ATAA^TA (a 3×33\times 3 symmetric matrix): ATA=(110121011)A^TA=\begin{pmatrix}1&1&0\\1&2&1\\0&1&1\end{pmatrix}. Its eigenvalues are λ1=3, λ2=1, λ3=0\lambda_1=3,\ \lambda_2=1,\ \lambda_3=0.

  2. 2

    Singular values (Definition 9.2) are the square roots in decreasing order: σ1=3, σ2=1=1, σ3=0=0\sigma_1=\sqrt3,\ \sigma_2=\sqrt1=1,\ \sigma_3=\sqrt0=0. Two are nonzero, so rank⁡(A)=2\operatorname{rank}(A)=2 (Proposition 9.3).

  3. 3

    Orthonormal eigenbasis of ATAA^TA gives the columns of VV: v1=16(1,2,1)Tv_1=\tfrac{1}{\sqrt6}(1,2,1)^T (for λ=3\lambda=3), v2=12(1,0,−1)Tv_2=\tfrac{1}{\sqrt2}(1,0,-1)^T (for λ=1\lambda=1), v3=13(1,−1,1)Tv_3=\tfrac{1}{\sqrt3}(1,-1,1)^T (for λ=0\lambda=0).

  4. 4

    Check Theorem 9.2: Av1=16(3,3)TAv_1=\tfrac{1}{\sqrt6}(3,3)^T, Av2=12(−1,1)TAv_2=\tfrac{1}{\sqrt2}(-1,1)^T, Av3=(0,0)TAv_3=(0,0)^T. These are orthogonal, with ∥Av1∥=3=σ1\|Av_1\|=\sqrt3=\sigma_1, ∥Av2∥=1=σ2\|Av_2\|=1=\sigma_2, ∥Av3∥=0=σ3\|Av_3\|=0=\sigma_3.

  5. 5

    Columns of UU come from the nonzero images, ui=1σiAviu_i=\tfrac1{\sigma_i}Av_i: u1=13⋅16(3,3)T=12(1,1)Tu_1=\tfrac1{\sqrt3}\cdot\tfrac1{\sqrt6}(3,3)^T=\tfrac1{\sqrt2}(1,1)^T and u2=11⋅12(−1,1)T=12(−1,1)Tu_2=\tfrac11\cdot\tfrac1{\sqrt2}(-1,1)^T=\tfrac1{\sqrt2}(-1,1)^T. Since {u1,u2}\{u_1,u_2\} is already an orthonormal basis of R2\mathbb{R}^2, U=12(1−111)U=\tfrac1{\sqrt2}\begin{pmatrix}1&-1\\1&1\end{pmatrix}.

  6. 6

    Assemble A=UΣVTA=U\Sigma V^T with Σ=(300010)\Sigma=\begin{pmatrix}\sqrt3&0&0\\0&1&0\end{pmatrix} and V=(1/61/21/32/60−1/31/6−1/21/3)V=\begin{pmatrix}1/\sqrt6&1/\sqrt2&1/\sqrt3\\2/\sqrt6&0&-1/\sqrt3\\1/\sqrt6&-1/\sqrt2&1/\sqrt3\end{pmatrix}; carrying out the product returns AA.

Answer. A=UΣVTA=U\Sigma V^T with U=12(1−111)U=\tfrac1{\sqrt2}\begin{pmatrix}1&-1\\1&1\end{pmatrix}, Σ=(300010)\Sigma=\begin{pmatrix}\sqrt3&0&0\\0&1&0\end{pmatrix}, and V=(1/61/21/32/60−1/31/6−1/21/3)V=\begin{pmatrix}1/\sqrt6&1/\sqrt2&1/\sqrt3\\2/\sqrt6&0&-1/\sqrt3\\1/\sqrt6&-1/\sqrt2&1/\sqrt3\end{pmatrix}. Rank-one form (Remark 9.4): A=3 u1v1T+1⋅u2v2TA=\sqrt3\,u_1v_1^T+1\cdot u_2v_2^T, i.e. A=3 12(1,1)T 16(1,2,1)+12(−1,1)T 12(1,0,−1)A=\sqrt3\,\tfrac1{\sqrt2}(1,1)^T\,\tfrac1{\sqrt6}(1,2,1)+\tfrac1{\sqrt2}(-1,1)^T\,\tfrac1{\sqrt2}(1,0,-1).
Example 2

Show how the SVD of the symmetric matrix A=(1221)A=\begin{pmatrix}1&2\\2&1\end{pmatrix} relates to its spectral (orthogonal) diagonalization, and give U,Σ,VU,\Sigma,V.

Example 3

Using the SVD, describe the image of the unit circle under A=(3002)A=\begin{pmatrix}3&0\\0&2\end{pmatrix} and find the area it encloses. Then explain what changes when a singular value is 00.