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

Singular Values of a Matrix

Diagonalization is reserved for square, symmetric matrices — yet every matrix AA has singular values. The trick is to pass to the symmetric matrix ATAA^TA, whose eigenvalues λi\lambda_i are always real and nonnegative (Lemma 9.3). Their square roots σi=λi\sigma_i=\sqrt{\lambda_i} are the singular values (Definition 9.2); an orthonormal eigenbasis vi\mathbf{v}_i of ATAA^TA sends the unit sphere to an ellipse with semi-axes σi\sigma_i, because ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i (Theorem 9.2); and the number of nonzero σi\sigma_i is exactly the rank of AA (Proposition 9.3).

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.

Find the singular values of A=(1221)A=\begin{pmatrix}1&2\\2&1\end{pmatrix}, listed in decreasing order.

A 4×34\times 3 matrix AA has singular values 5, 2, 05,\ 2,\ 0 (in decreasing order). What is rank⁡(A)\operatorname{rank}(A)?

What you’ll be able to do

  • Prove and use Lemma 9.3: for any n×mn\times m matrix AA, the m×mm\times m matrix ATAA^TA is symmetric with real, nonnegative eigenvalues, since for an eigenpair ATAv=λvA^TA\mathbf{v}=\lambda\mathbf{v} one has ∥Av∥2=vTATAv=λ∥v∥2≥0\|A\mathbf{v}\|^2=\mathbf{v}^TA^TA\mathbf{v}=\lambda\|\mathbf{v}\|^2\ge 0.
  • Apply Definition 9.2: the singular values of AA are σi=λi\sigma_i=\sqrt{\lambda_i}, the square roots of the eigenvalues of ATAA^TA listed with their algebraic multiplicities, conventionally ordered σ1≥σ2≥⋯≥σm≥0\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_m\ge 0.
  • Use Theorem 9.2: an orthonormal eigenbasis v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m of ATAA^TA makes the images Av1,…,AvmA\mathbf{v}_1,\dots,A\mathbf{v}_m orthogonal, with lengths ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i.
  • Apply Proposition 9.3: if AA has rank rr then σ1,…,σr\sigma_1,\dots,\sigma_r are nonzero while σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0, so rank⁡(A)\operatorname{rank}(A) is the number of nonzero singular values.
  • Compute ATAA^TA, its eigenvalues and the singular values of a small matrix; order them; read off the rank; and recognise that the largest singular value σ1\sigma_1 equals the operator norm ∥A∥\|A\| (the maximum stretch of the unit sphere).

In your course

· MATH2015 · Linear Algebra & Probability
§9.2 The Singular Value Decomposition
  • Lemma 9.3Nonnegative eigenvalues of ATAA^TA
    For an n×mn\times m matrix AA, the symmetric m×mm\times m matrix ATAA^TA has real, nonnegative eigenvalues (it is positive semidefinite).
  • Definition 9.2Singular values
    The singular values of AA are the square roots of the eigenvalues of ATAA^TA, listed with multiplicities and ordered σ1≥σ2≥⋯≥σm≥0\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_m\ge 0.
  • Theorem 9.2Orthonormal basis with orthogonal images
    There is an orthonormal basis v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m of Rm\mathbb{R}^m for which the images AviA\mathbf{v}_i are orthogonal and ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i.
  • Proposition 9.3Singular values and rank
    If rank⁡(A)=r\operatorname{rank}(A)=r then σ1,…,σr>0\sigma_1,\dots,\sigma_r>0 and σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0; the rank is the number of nonzero singular values.
Grounded in §9.2 (first half — singular values). The full factorisation A=UΣVTA=U\Sigma V^T (Theorem 9.3) and the unit-sphere picture of Example 9.1 belong to the companion SVD lesson. Auto-graded answers use only quantities that are unique — singular values in decreasing order, ATAA^TA, rank, norms and true/false facts — never the singular vectors vi\mathbf{v}_i, which are fixed only up to sign and rotations within repeated eigenspaces.
1

Why $A^TA$, and why its eigenvalues can't be negative

Diagonalization A=SDSTA=SDS^T requires AA to be square and symmetric. To reach every matrix we take a detour through ATAA^TA. For any n×mn\times m matrix AA, the product ATAA^TA is an m×mm\times m symmetric matrix, since (ATA)T=AT(AT)T=ATA(A^TA)^T=A^T(A^T)^T=A^TA. By the spectral theorem of the previous section, a symmetric matrix has real eigenvalues and an orthonormal eigenbasis. Lemma 9.3 adds the crucial fact that these eigenvalues are never negative. The proof is one line: if ATAv=λvA^TA\mathbf{v}=\lambda\mathbf{v} with v≠0\mathbf{v}\neq\mathbf{0}, then ∥Av∥2=(Av)⋅(Av)=(Av)T(Av)=vTATAv=vT(λv)=λ ∥v∥2.\|A\mathbf{v}\|^2=(A\mathbf{v})\cdot(A\mathbf{v})=(A\mathbf{v})^T(A\mathbf{v})=\mathbf{v}^TA^TA\mathbf{v}=\mathbf{v}^T(\lambda\mathbf{v})=\lambda\,\|\mathbf{v}\|^2. The left-hand side is a squared length, so it is ≥0\ge 0, and ∥v∥2>0\|\mathbf{v}\|^2>0; dividing gives λ=∥Av∥2/∥v∥2≥0\lambda=\|A\mathbf{v}\|^2/\|\mathbf{v}\|^2\ge 0. In other words ATAA^TA is positive semidefinite — which is exactly what makes it legal to take square roots in the next definition.

2

Defining the singular values

By Definition 9.2, the singular values of an n×mn\times m matrix AA are the square roots σi=λi\sigma_i=\sqrt{\lambda_i} of the eigenvalues λi\lambda_i of the symmetric matrix ATAA^TA, listed with their algebraic multiplicities (a doubled eigenvalue gives a doubled singular value). Lemma 9.3 is what guarantees each λi\sqrt{\lambda_i} is a real number. By convention we order them decreasingly, σ1≥σ2≥⋯≥σm≥0,\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_m\ge 0, which makes the list unique even though the eigenvectors behind it are not. Note there are always mm singular values — one per eigenvalue of the m×mm\times m matrix ATAA^TA — no matter how many rows AA has. (This echoes the symmetric case: if AA is symmetric with eigenpairs Aui=λiuiA\mathbf{u}_i=\lambda_i\mathbf{u}_i and ∥ui∥=1\|\mathbf{u}_i\|=1, then ∥Aui∥=∣λi∣\|A\mathbf{u}_i\|=|\lambda_i|, previewing ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i.) For example, A=(011110)A=\begin{pmatrix}0&1&1\\1&1&0\end{pmatrix} gives ATAA^TA with eigenvalues 3,1,03,1,0, so σ1=3, σ2=1, σ3=0\sigma_1=\sqrt3,\ \sigma_2=1,\ \sigma_3=0.

3

The geometric heart: an orthonormal basis with orthogonal images

For a symmetric matrix the orthonormal eigenvectors already have orthogonal images, Aui=λiuiA\mathbf{u}_i=\lambda_i\mathbf{u}_i. Theorem 9.2 says this good behaviour survives for any matrix provided we use the eigenvectors of ATAA^TA. Pick an orthonormal eigenbasis v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m of Rm\mathbb{R}^m with ATAvi=λiviA^TA\mathbf{v}_i=\lambda_i\mathbf{v}_i and λi=σi2\lambda_i=\sigma_i^2. Then two things hold. First the images are orthogonal: for i≠ji\neq j, (Avi)⋅(Avj)=vjTATAvi=vjT(λivi)=λi(vi⋅vj)=0.(A\mathbf{v}_i)\cdot(A\mathbf{v}_j)=\mathbf{v}_j^TA^TA\mathbf{v}_i=\mathbf{v}_j^T(\lambda_i\mathbf{v}_i)=\lambda_i(\mathbf{v}_i\cdot\mathbf{v}_j)=0. Second their lengths are the singular values: taking i=ji=j in the same calculation gives ∥Avi∥2=λi\|A\mathbf{v}_i\|^2=\lambda_i, so ∥Avi∥=λi=σi\|A\mathbf{v}_i\|=\sqrt{\lambda_i}=\sigma_i. Geometrically, AA carries the unit sphere {c1v1+⋯+cmvm:∑ci2=1}\{c_1\mathbf{v}_1+\cdots+c_m\mathbf{v}_m:\sum c_i^2=1\} to an ellipse whose semi-axes are the nonzero σi\sigma_i, pointing along the directions AviA\mathbf{v}_i. In the notes' Example 9.1 the unit sphere of R3\mathbb{R}^3 is squashed onto a filled ellipse in R2\mathbb{R}^2.

4

Counting rank, and the biggest stretch

Because ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i, the image AviA\mathbf{v}_i is the zero vector exactly when σi=0\sigma_i=0. Order the basis so that σ1≥⋯≥σr>0\sigma_1\ge\cdots\ge\sigma_r>0 and σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0. The surviving images Av1,…,AvrA\mathbf{v}_1,\dots,A\mathbf{v}_r are orthogonal and nonzero, hence linearly independent, and they span the image because any Av=A(c1v1+⋯+cmvm)=c1Av1+⋯+crAvrA\mathbf{v}=A(c_1\mathbf{v}_1+\cdots+c_m\mathbf{v}_m)=c_1A\mathbf{v}_1+\cdots+c_rA\mathbf{v}_r. So they form a basis of im⁡(A)\operatorname{im}(A), giving Proposition 9.3: rank⁡(A)=r=#{nonzero singular values}.\operatorname{rank}(A)=r=\#\{\text{nonzero singular values}\}. This is a numerically stable way to find rank. A second payoff: the largest singular value σ1\sigma_1 is the operator norm ∥A∥=max⁡∥x∥=1∥Ax∥\|A\|=\max_{\|\mathbf{x}\|=1}\|A\mathbf{x}\|, the longest semi-axis of the image ellipse, while the smallest σm\sigma_m measures the shortest.

Lemma 9.3 — $A^TA$ has nonnegative eigenvalues

For any n×mn\times m matrix AA, the m×mm\times m matrix ATAA^TA is symmetric and all of its eigenvalues are real and nonnegative; that is, ATAA^TA is positive semidefinite.

Intuition. Symmetry, (ATA)T=ATA(A^TA)^T=A^TA, forces the eigenvalues to be real. For an eigenpair ATAv=λvA^TA\mathbf{v}=\lambda\mathbf{v} with v≠0\mathbf{v}\neq\mathbf{0}, compute ∥Av∥2=(Av)T(Av)=vTATAv=vT(λv)=λ∥v∥2\|A\mathbf{v}\|^2=(A\mathbf{v})^T(A\mathbf{v})=\mathbf{v}^TA^TA\mathbf{v}=\mathbf{v}^T(\lambda\mathbf{v})=\lambda\|\mathbf{v}\|^2. The left side is a squared length (≥0\ge 0) and ∥v∥2>0\|\mathbf{v}\|^2>0, so λ=∥Av∥2/∥v∥2≥0\lambda=\|A\mathbf{v}\|^2/\|\mathbf{v}\|^2\ge 0.
Definition 9.2 — Singular values

The singular values of an n×mn\times m matrix AA are the square roots σi=λi\sigma_i=\sqrt{\lambda_i} of the eigenvalues λi\lambda_i of ATAA^TA, listed with their algebraic multiplicities and conventionally ordered σ1≥σ2≥⋯≥σm≥0\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_m\ge 0.

Intuition. Taking square roots is legitimate precisely because Lemma 9.3 makes every λi≥0\lambda_i\ge 0. There are mm singular values — one for each eigenvalue of the m×mm\times m matrix ATAA^TA — independent of the number of rows of AA. Listing them in decreasing order makes the list unique, so σ1\sigma_1 is unambiguously the largest; the singular vectors behind them, however, are not unique.
Theorem 9.2 — Orthonormal basis with orthogonal images

For any n×mn\times m matrix AA there exists an orthonormal basis v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m of Rm\mathbb{R}^m such that (1) the images Av1,…,AvmA\mathbf{v}_1,\dots,A\mathbf{v}_m are mutually orthogonal, and (2) their lengths are the singular values, ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i.

Intuition. Take v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m to be an orthonormal eigenbasis of ATAA^TA (it exists by the spectral theorem), with ATAvi=λiviA^TA\mathbf{v}_i=\lambda_i\mathbf{v}_i and λi=σi2\lambda_i=\sigma_i^2. Then (Avi)⋅(Avj)=vjTATAvi=λi(vi⋅vj)(A\mathbf{v}_i)\cdot(A\mathbf{v}_j)=\mathbf{v}_j^TA^TA\mathbf{v}_i=\lambda_i(\mathbf{v}_i\cdot\mathbf{v}_j), which is 00 for i≠ji\neq j (orthogonality) and λi\lambda_i for i=ji=j, giving ∥Avi∥=λi=σi\|A\mathbf{v}_i\|=\sqrt{\lambda_i}=\sigma_i. Thus AA maps the unit sphere to an ellipse with semi-axes the nonzero σi\sigma_i.
Proposition 9.3 — Singular values and rank

If AA is an n×mn\times m matrix of rank rr, then σ1,…,σr\sigma_1,\dots,\sigma_r are nonzero while σr+1=⋯=σm=0\sigma_{r+1}=\cdots=\sigma_m=0. Equivalently, rank⁡(A)\operatorname{rank}(A) equals the number of nonzero singular values of AA.

Intuition. Since ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i, we have Avi=0A\mathbf{v}_i=\mathbf{0} exactly when σi=0\sigma_i=0. The surviving images Av1,…,AvrA\mathbf{v}_1,\dots,A\mathbf{v}_r (those with σi>0\sigma_i>0) are orthogonal and nonzero, hence linearly independent, and they span im⁡(A)\operatorname{im}(A) because A(c1v1+⋯+cmvm)=c1Av1+⋯+crAvrA(c_1\mathbf{v}_1+\cdots+c_m\mathbf{v}_m)=c_1A\mathbf{v}_1+\cdots+c_rA\mathbf{v}_r. So they are a basis of the image and r=dim⁡im⁡(A)=rank⁡(A)r=\dim\operatorname{im}(A)=\operatorname{rank}(A).

Worked examples

Example 1

Find the singular values of A=(011110)A=\begin{pmatrix}0&1&1\\1&1&0\end{pmatrix} (a 2×32\times 3 matrix).

  1. 1

    Form the symmetric 3×33\times 3 matrix ATAA^TA. With AT=(011110)A^T=\begin{pmatrix}0&1\\1&1\\1&0\end{pmatrix}, we get ATA=(110121011)A^TA=\begin{pmatrix}1&1&0\\1&2&1\\0&1&1\end{pmatrix}.

  2. 2

    Find its eigenvalues from det⁡(ATA−λI)=0\det(A^TA-\lambda I)=0. The characteristic polynomial gives λ1=3, λ2=1, λ3=0\lambda_1=3,\ \lambda_2=1,\ \lambda_3=0 — all nonnegative, as Lemma 9.3 promises.

  3. 3

    Take square roots (Definition 9.2): σ1=3,σ2=1=1,σ3=0=0.\sigma_1=\sqrt{3},\quad \sigma_2=\sqrt{1}=1,\quad \sigma_3=\sqrt{0}=0.

  4. 4

    List them in decreasing order: σ1=3≈1.732 ≥ σ2=1 ≥ σ3=0\sigma_1=\sqrt{3}\approx 1.732\ \ge\ \sigma_2=1\ \ge\ \sigma_3=0. There are m=3m=3 singular values, one per eigenvalue of the 3×33\times 3 matrix ATAA^TA.

Answer. σ1=3≈1.732,  σ2=1,  σ3=0\sigma_1=\sqrt{3}\approx 1.732,\ \ \sigma_2=1,\ \ \sigma_3=0. Two are nonzero, so rank⁡(A)=2\operatorname{rank}(A)=2.
Example 2

For A=(0230)A=\begin{pmatrix}0&2\\3&0\end{pmatrix}, find the singular values and an orthonormal basis v1,v2\mathbf{v}_1,\mathbf{v}_2 of R2\mathbb{R}^2 for which Av1,Av2A\mathbf{v}_1,A\mathbf{v}_2 are orthogonal with ∥Avi∥=σi\|A\mathbf{v}_i\|=\sigma_i (Theorem 9.2).

Example 3

Find the singular values of A=(2142)A=\begin{pmatrix}2&1\\4&2\end{pmatrix} and use them to determine rank⁡(A)\operatorname{rank}(A) (Proposition 9.3).