Skip to content

Chapter 4 Exercises and Solutions

Twelve exercises, worked in full. Every eigenvalue, eigenvector and singular value below was checked against NumPy, and every eigenvector reported here satisfies Av=λv\mathbf{A}\mathbf{v} = \lambda\mathbf{v} to 0.0e+00 — exactly, not approximately, because they are all integer vectors.

The last two are proofs rather than computations. Both are stated as things to show, and both are used earlier in the chapter, so they are worth doing rather than skipping.

Try each exercise before reading on. The determinants (4.1, 4.2) are arithmetic drills. The eigenspace problems (4.3–4.7) are the bulk of the chapter and repay doing by hand — the point of each is a different way the count of eigenvectors can come up short. The SVDs (4.8, 4.9) follow §4.5.2’s three steps mechanically. 4.10 is one line once you have 4.8. And 4.11 and 4.12 are the two facts the chapter used without proving.

4.1 — Determinant by Laplace expansion and by Sarrus

Section titled “4.1 — Determinant by Laplace expansion and by Sarrus”

Compute the determinant using the Laplace expansion (using the first row) and the Sarrus rule for

A=[135246024]\mathbf{A} = \begin{bmatrix}1 & 3 & 5\\ 2 & 4 & 6\\ 0 & 2 & 4\end{bmatrix}

Laplace on the first row (Theorem 4.2):

det⁡A=1∣4624∣−3∣2604∣+5∣2402∣=1(16−12)−3(8−0)+5(4−0)=4−24+20=0\det\mathbf{A} = 1\begin{vmatrix}4&6\\2&4\end{vmatrix} - 3\begin{vmatrix}2&6\\0&4\end{vmatrix} + 5\begin{vmatrix}2&4\\0&2\end{vmatrix} = 1(16-12) - 3(8-0) + 5(4-0) = 4 - 24 + 20 = \boxed{0}

Sarrus (Equation 4.6) — the three down-right products minus the three down-left products:

det⁡A=(1⋅4⋅4+3⋅6⋅0+5⋅2⋅2)−(0⋅4⋅5+2⋅6⋅1+4⋅2⋅3)=(16+0+20)−(0+12+24)=36−36=0\det\mathbf{A} = (1\cdot4\cdot4 + 3\cdot6\cdot0 + 5\cdot2\cdot2) - (0\cdot4\cdot5 + 2\cdot6\cdot1 + 4\cdot2\cdot3) = (16 + 0 + 20) - (0 + 12 + 24) = 36 - 36 = 0

Both give 00, so the matrix is singular and has rank 22.

Why it is zero. There is an exact linear dependence among the rows:

r3=2r1−r2since2(1,3,5)−(2,4,6)=(0,2,4)\mathbf{r}_3 = 2\mathbf{r}_1 - \mathbf{r}_2 \quad\text{since}\quad 2(1,3,5) - (2,4,6) = (0,2,4)

That is the interesting part of the answer. A determinant of zero is not a computation that failed; it is the statement that one row carries no information the other two did not already have.

A=[201202−101101212−202−1220011]\mathbf{A} = \begin{bmatrix} 2 & 0 & 1 & 2 & 0\\ 2 & -1 & 0 & 1 & 1\\ 0 & 1 & 2 & 1 & 2\\ -2 & 0 & 2 & -1 & 2\\ 2 & 0 & 0 & 1 & 1 \end{bmatrix}

“Efficiently” is the whole exercise. Laplace expansion on a 5×55\times5 costs 5!=1205! = 120 terms; Gaussian elimination costs about 53/3≈425^3/3 \approx 42 multiplications. Use row operations, which leave the determinant unchanged (Theorem 4.3), and read off the product of the pivots.

The second column is the place to start: it has only two nonzero entries, so expanding there — or eliminating into it — is cheapest. Working the elimination through gives

det⁡A=6\det\mathbf{A} = \boxed{6}

Verified exactly, not just numerically: running Gaussian elimination in rational arithmetic with fractions.Fraction returns the integer 66 with no rounding anywhere, and np.linalg.det returns 6.00000000006.0000000000.

4.3 — Eigenspaces of two 2 by 2 matrices

Section titled “4.3 — Eigenspaces of two 2 by 2 matrices”

(a) [1011]\begin{bmatrix}1&0\\1&1\end{bmatrix}

det⁡(A−λI)=∣1−λ011−λ∣=(1−λ)2\det(\mathbf{A}-\lambda\mathbf{I}) = \begin{vmatrix}1-\lambda & 0\\ 1 & 1-\lambda\end{vmatrix} = (1-\lambda)^2

So λ=1\lambda = 1 with algebraic multiplicity 2. The eigenspace:

(A−I)x=[0010][x1x2]=0  ⟹  x1=0(\mathbf{A}-\mathbf{I})\mathbf{x} = \begin{bmatrix}0&0\\1&0\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix} = \mathbf{0} \implies x_1 = 0 E1=span{[01]},geometric multiplicity 1E_1 = \mathrm{span}\left\{\begin{bmatrix}0\\1\end{bmatrix}\right\}, \qquad \text{geometric multiplicity } 1

One eigenvector for a 2×22\times2 matrix, so this matrix is defective and not diagonalizable. Note det⁡A=1≠0\det\mathbf{A} = 1 \neq 0, so it is nevertheless invertible — this is 4.5’s point in miniature.

(b) [−2221]\begin{bmatrix}-2&2\\2&1\end{bmatrix}

det⁡(A−λI)=(−2−λ)(1−λ)−4=λ2+λ−6=(λ−2)(λ+3)\det(\mathbf{A}-\lambda\mathbf{I}) = (-2-\lambda)(1-\lambda) - 4 = \lambda^2 + \lambda - 6 = (\lambda-2)(\lambda+3)

so λ1=2\lambda_1 = 2, λ2=−3\lambda_2 = -3. Check against Equations 4.23–4.24: trace =−1=2+(−3)= -1 = 2 + (-3) ✓, and det⁡=−6=2⋅(−3)\det = -6 = 2\cdot(-3) ✓.

E2=span{[12]},E−3=span{[2−1]}E_2 = \mathrm{span}\left\{\begin{bmatrix}1\\2\end{bmatrix}\right\}, \qquad E_{-3} = \mathrm{span}\left\{\begin{bmatrix}2\\-1\end{bmatrix}\right\}

Distinct eigenvalues, so by Theorem 4.12 the eigenvectors are independent: diagonalizable. And the matrix is symmetric, so the spectral theorem promises the eigenvectors are orthogonal — check (1,2)⋅(2,−1)=0(1,2)\cdot(2,-1) = 0 ✓.

A=[0−111−11−232−1001−110]\mathbf{A} = \begin{bmatrix}0&-1&1&1\\ -1&1&-2&3\\ 2&-1&0&0\\ 1&-1&1&0\end{bmatrix}

det⁡A=2\det\mathbf{A} = 2 and tr A=1\mathrm{tr}\,\mathbf{A} = 1. The spectrum is

λ\lambdaalgebraicgeometriceigenspace
2211span{(1,0,1,1)⊤}\mathrm{span}\{(1,0,1,1)^\top\}
1111span{(1,1,1,1)⊤}\mathrm{span}\{(1,1,1,1)^\top\}
−1-121span{(0,1,1,0)⊤}\mathrm{span}\{(0,1,1,0)^\top\}

Sanity checks: the eigenvalues sum to 2+1−1−1=1=tr A2 + 1 - 1 - 1 = 1 = \mathrm{tr}\,\mathbf{A} ✓ and multiply to 2⋅1⋅(−1)⋅(−1)=2=det⁡A2\cdot1\cdot(-1)\cdot(-1) = 2 = \det\mathbf{A} ✓ (Theorems 4.16, 4.17).

Geometric multiplicities sum to 3<43 < 4, so A\mathbf{A} is defective. The culprit is λ=−1\lambda = -1, which appears twice as a root but contributes only a one-dimensional eigenspace.

All three eigenvectors are exact integer vectors — each satisfies Av=λv\mathbf{A}\mathbf{v} = \lambda\mathbf{v} to 0.0e+00.

4.5 — Diagonalizability is unrelated to invertibility

Section titled “4.5 — Diagonalizability is unrelated to invertibility”

Determine for the following four matrices whether they are diagonalizable and/or invertible:

[1001],[1000],[1101],[0100]\begin{bmatrix}1&0\\0&1\end{bmatrix},\quad \begin{bmatrix}1&0\\0&0\end{bmatrix},\quad \begin{bmatrix}1&1\\0&1\end{bmatrix},\quad \begin{bmatrix}0&1\\0&0\end{bmatrix}

This is the exercise that makes §4.7’s warning concrete. All four combinations occur, one per matrix, in exactly this order:

matrixdet⁡\detspectrum∑\sum geometricinvertiblediagonalizable
[1001]\begin{bmatrix}1&0\\0&1\end{bmatrix}11λ=1\lambda=1, algebraic 22, geometric 2222yesyes
[1000]\begin{bmatrix}1&0\\0&0\end{bmatrix}00λ=1,0\lambda = 1, 0, each geometric 1122noyes
[1101]\begin{bmatrix}1&1\\0&1\end{bmatrix}11λ=1\lambda=1, algebraic 22, geometric 1111yesno
[0100]\begin{bmatrix}0&1\\0&0\end{bmatrix}00λ=0\lambda=0, algebraic 22, geometric 1111nono

Read the last two columns: yes yes, no yes, yes no, no no. A 2×22\times2 example for each cell of a 2×22\times2 table.

The mechanism differs in the two “no” rows for diagonalizability, though: both are Jordan blocks with a repeated eigenvalue and a deficient eigenspace. And note that the second matrix is diagonal, hence trivially diagonalizable, while being singular — a zero eigenvalue is still an eigenvalue, with a perfectly good eigenvector.

4.6 — Eigenspaces, and diagonalizability

Section titled “4.6 — Eigenspaces, and diagonalizability”

(a) A=[230143001]\mathbf{A} = \begin{bmatrix}2&3&0\\1&4&3\\0&0&1\end{bmatrix}

det⁡A=5\det\mathbf{A} = 5, tr A=7\mathrm{tr}\,\mathbf{A} = 7. The last row makes the characteristic polynomial factor immediately:

det⁡(A−λI)=(1−λ)[(2−λ)(4−λ)−3]=(1−λ)(λ2−6λ+5)=(1−λ)(λ−1)(λ−5)\det(\mathbf{A}-\lambda\mathbf{I}) = (1-\lambda)\bigl[(2-\lambda)(4-\lambda) - 3\bigr] = (1-\lambda)(\lambda^2 - 6\lambda + 5) = (1-\lambda)(\lambda-1)(\lambda-5)

so λ=5\lambda = 5 once and λ=1\lambda = 1 twice. Check: 5+1+1=75 + 1 + 1 = 7 ✓ and 5⋅1⋅1=55\cdot1\cdot1 = 5 ✓.

E5=span{[110]},E1=span{[3−10]}E_5 = \mathrm{span}\left\{\begin{bmatrix}1\\1\\0\end{bmatrix}\right\},\qquad E_1 = \mathrm{span}\left\{\begin{bmatrix}3\\-1\\0\end{bmatrix}\right\}

1+1=2<31 + 1 = 2 < 3: defective, not diagonalizable. Both eigenvectors have a zero third component, so the whole eigenspace picture lives in the x1x2x_1x_2 plane and nothing reaches the third dimension.

(b) A=[1100000000000000]\mathbf{A} = \begin{bmatrix}1&1&0&0\\0&0&0&0\\0&0&0&0\\0&0&0&0\end{bmatrix}

Rank 11, so the kernel is three-dimensional. The characteristic polynomial is −λ3(1−λ)-\lambda^3(1-\lambda): λ=1\lambda = 1 once and λ=0\lambda = 0 three times.

E1=span{(1,0,0,0)⊤},E0=span{(1,−1,0,0)⊤, (0,0,1,0)⊤, (0,0,0,1)⊤}E_1 = \mathrm{span}\left\{(1,0,0,0)^\top\right\},\qquad E_0 = \mathrm{span}\left\{(1,-1,0,0)^\top,\ (0,0,1,0)^\top,\ (0,0,0,1)^\top\right\}

Geometric multiplicities 1+3=41 + 3 = 4: diagonalizable, with D=diag(1,0,0,0)\mathbf{D} = \mathrm{diag}(1,0,0,0).

This is the pair to compare. (a) has a repeated eigenvalue and is defective; (b) has an eigenvalue repeated three times and is perfectly diagonalizable. A repeated eigenvalue is a warning, not a verdict — what matters is whether dim⁡ker⁡(A−λI)\dim\ker(\mathbf{A}-\lambda\mathbf{I}) keeps up.

4.7 — Diagonalizable? Give the diagonal form and a basis

Section titled “4.7 — Diagonalizable? Give the diagonal form and a basis”

(a) A=[01−84]\mathbf{A} = \begin{bmatrix}0&1\\-8&4\end{bmatrix}

det⁡(A−λI)=−λ(4−λ)+8=λ2−4λ+8\det(\mathbf{A}-\lambda\mathbf{I}) = -\lambda(4-\lambda) + 8 = \lambda^2 - 4\lambda + 8

Discriminant 16−32=−16<016 - 32 = -16 < 0, so λ=2±2i\lambda = 2 \pm 2i.

Not diagonalizable over R\mathbb{R} — there is no real eigenvector, because a real matrix with complex eigenvalues has no invariant line. Over C\mathbb{C} it is diagonalizable: two distinct eigenvalues, hence two independent eigenvectors, with D=diag(2+2i, 2−2i)\mathbf{D} = \mathrm{diag}(2+2i,\ 2-2i).

This is the answer the book’s §4.7 warning is pointing at. det⁡A=8≠0\det\mathbf{A} = 8 \neq 0, so the matrix is invertible; invertibility and diagonalizability are simply different questions.

(b) A=[111111111]\mathbf{A} = \begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}

Rank 11: every row is the same. So λ=0\lambda = 0 has algebraic multiplicity 22 and — since dim⁡ker⁡A=3−1=2\dim\ker\mathbf{A} = 3 - 1 = 2 — geometric multiplicity 22 as well. The remaining eigenvalue is the trace, 33.

D=[300000000],P=[1111−1010−1]\mathbf{D} = \begin{bmatrix}3&0&0\\0&0&0\\0&0&0\end{bmatrix},\qquad \mathbf{P} = \begin{bmatrix}1 & 1 & 1\\ 1 & -1 & 0\\ 1 & 0 & -1\end{bmatrix}

Diagonalizable. The matrix is symmetric, so the spectral theorem guarantees it — and an orthonormal basis exists too: normalise (1,1,1)(1,1,1) and replace the two kernel vectors with an orthonormal pair inside that plane, for instance (1,−1,0)/2(1,-1,0)/\sqrt2 and (1,1,−2)/6(1,1,-2)/\sqrt6.

(c) A=[542101−1−1−1−13011−12]\mathbf{A} = \begin{bmatrix}5&4&2&1\\ 0&1&-1&-1\\ -1&-1&3&0\\ 1&1&-1&2\end{bmatrix}

det⁡A=32\det\mathbf{A} = 32, tr A=11\mathrm{tr}\,\mathbf{A} = 11.

λ\lambdaalgebraicgeometriceigenvector
4421(1,0,−1,1)⊤(1,0,-1,1)^\top
2211(1,−1,0,1)⊤(1,-1,0,1)^\top
1111(1,−1,0,0)⊤(1,-1,0,0)^\top

Check: 4+4+2+1=114 + 4 + 2 + 1 = 11 ✓ and 4⋅4⋅2⋅1=324\cdot4\cdot2\cdot1 = 32 ✓.

Geometric multiplicities sum to 3<43 < 4: not diagonalizable, because λ=4\lambda = 4 is a double root with only a one-dimensional eigenspace.

(d) A=[5−6−6−1423−6−4]\mathbf{A} = \begin{bmatrix}5&-6&-6\\ -1&4&2\\ 3&-6&-4\end{bmatrix}

det⁡A=4\det\mathbf{A} = 4, tr A=5\mathrm{tr}\,\mathbf{A} = 5. Spectrum: λ=2\lambda = 2 twice and λ=1\lambda = 1 once. Check 2+2+1=52 + 2 + 1 = 5 ✓ and 2⋅2⋅1=42\cdot2\cdot1 = 4 ✓.

For λ=2\lambda = 2:

A−2I=[3−6−6−1223−6−6]\mathbf{A} - 2\mathbf{I} = \begin{bmatrix}3&-6&-6\\ -1&2&2\\ 3&-6&-6\end{bmatrix}

Every row is a multiple of (1,−2,−2)(1,-2,-2), so the matrix has rank 11 and the eigenspace is the plane x1−2x2−2x3=0x_1 - 2x_2 - 2x_3 = 0, which is two-dimensional:

E2=span{[210], [201]},E1=span{[3−13]}E_2 = \mathrm{span}\left\{\begin{bmatrix}2\\1\\0\end{bmatrix},\ \begin{bmatrix}2\\0\\1\end{bmatrix}\right\}, \qquad E_1 = \mathrm{span}\left\{\begin{bmatrix}3\\-1\\3\end{bmatrix}\right\}

2+1=32 + 1 = 3: diagonalizable, with

D=[200020001],P=[22310−1013]\mathbf{D} = \begin{bmatrix}2&0&0\\0&2&0\\0&0&1\end{bmatrix},\qquad \mathbf{P} = \begin{bmatrix}2&2&3\\ 1&0&-1\\ 0&1&3\end{bmatrix}

Compare (c) and (d). Both have a double eigenvalue; in (c) the rank of A−λI\mathbf{A}-\lambda\mathbf{I} is 33, leaving nullity 11; in (d) it is 11, leaving nullity 22. That single number is the difference between defective and diagonalizable.

A=[32223−2]\mathbf{A} = \begin{bmatrix}3&2&2\\ 2&3&-2\end{bmatrix}

Step 1 — the smaller Gram matrix. Here AA⊤\mathbf{A}\mathbf{A}^\top is 2×22\times2 and A⊤A\mathbf{A}^\top\mathbf{A} is 3×33\times3, so start with the small one:

AA⊤=[178817]\mathbf{A}\mathbf{A}^\top = \begin{bmatrix}17 & 8\\ 8 & 17\end{bmatrix}

Its eigenvalues are 17±817 \pm 8, that is 2525 and 99, with eigenvectors (1,1)(1,1) and (1,−1)(1,-1) — a 2×22\times2 matrix of the form [abba]\begin{bmatrix}a&b\\b&a\end{bmatrix} always has those. So

σ1=25=5,σ2=9=3,u1=12[11],u2=12[1−1]\sigma_1 = \sqrt{25} = 5,\qquad \sigma_2 = \sqrt{9} = 3,\qquad \mathbf{u}_1 = \tfrac{1}{\sqrt2}\begin{bmatrix}1\\1\end{bmatrix},\qquad \mathbf{u}_2 = \tfrac{1}{\sqrt2}\begin{bmatrix}1\\-1\end{bmatrix}

Step 2 — the right-singular vectors from vi=A⊤ui/σi\mathbf{v}_i = \mathbf{A}^\top\mathbf{u}_i/\sigma_i:

v1=12[110],v2=118[1−14],v3=13[2−2−1]\mathbf{v}_1 = \tfrac{1}{\sqrt2}\begin{bmatrix}1\\1\\0\end{bmatrix},\qquad \mathbf{v}_2 = \tfrac{1}{\sqrt{18}}\begin{bmatrix}1\\-1\\4\end{bmatrix},\qquad \mathbf{v}_3 = \tfrac{1}{3}\begin{bmatrix}2\\-2\\-1\end{bmatrix}

v3\mathbf{v}_3 comes from the kernel: σ3=0\sigma_3 = 0 and Av3=0\mathbf{A}\mathbf{v}_3 = \mathbf{0}.

The decomposition.

A=12[111−1]⏟U[500030]⏟Σ[12120118−11841823−23−13]⏟V⊤\mathbf{A} = \underbrace{\frac{1}{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix}}_{\mathbf{U}} \underbrace{\begin{bmatrix}5&0&0\\0&3&0\end{bmatrix}}_{\boldsymbol{\Sigma}} \underbrace{\begin{bmatrix} \tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt2} & 0\\[2pt] \tfrac{1}{\sqrt{18}} & -\tfrac{1}{\sqrt{18}} & \tfrac{4}{\sqrt{18}}\\[2pt] \tfrac{2}{3} & -\tfrac{2}{3} & -\tfrac{1}{3} \end{bmatrix}}_{\mathbf{V}^\top}

Verified from these exact vectors: ∥Av1∥=5.000000\lVert\mathbf{A}\mathbf{v}_1\rVert = 5.000000, ∥Av2∥=3.000000\lVert\mathbf{A}\mathbf{v}_2\rVert = 3.000000, ∥Av3∥=1.11×10−16\lVert\mathbf{A}\mathbf{v}_3\rVert = 1.11\times10^{-16}, V\mathbf{V} orthogonal to 2.22×10−162.22\times10^{-16}, and the reconstruction UΣV⊤\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^\top differing from A\mathbf{A} by 4.44×10−164.44\times10^{-16}.

A=[22−11]\mathbf{A} = \begin{bmatrix}2&2\\ -1&1\end{bmatrix} A⊤A=[5335]\mathbf{A}^\top\mathbf{A} = \begin{bmatrix}5&3\\3&5\end{bmatrix}

Again of the form [abba]\begin{bmatrix}a&b\\b&a\end{bmatrix}, so eigenvalues 5±3=8,25\pm3 = 8, 2 with eigenvectors (1,1)(1,1) and (−1,1)(-1,1). Hence

σ1=8=22≈2.828427,σ2=2≈1.414214\sigma_1 = \sqrt8 = 2\sqrt2 \approx 2.828427,\qquad \sigma_2 = \sqrt2 \approx 1.414214 v1=12[11],v2=12[−11]\mathbf{v}_1 = \tfrac{1}{\sqrt2}\begin{bmatrix}1\\1\end{bmatrix},\qquad \mathbf{v}_2 = \tfrac{1}{\sqrt2}\begin{bmatrix}-1\\1\end{bmatrix}

Now the left-singular vectors, and they come out remarkably clean:

u1=Av1σ1=122[220]=[10],u2=Av2σ2=12[02]=[01]\mathbf{u}_1 = \frac{\mathbf{A}\mathbf{v}_1}{\sigma_1} = \frac{1}{2\sqrt2}\begin{bmatrix}2\sqrt2\\0\end{bmatrix} = \begin{bmatrix}1\\0\end{bmatrix}, \qquad \mathbf{u}_2 = \frac{\mathbf{A}\mathbf{v}_2}{\sigma_2} = \frac{1}{\sqrt2}\begin{bmatrix}0\\\sqrt2\end{bmatrix} = \begin{bmatrix}0\\1\end{bmatrix}

So U=I\mathbf{U} = \mathbf{I} and

A=I[22002]12[11−11]\mathbf{A} = \mathbf{I}\begin{bmatrix}2\sqrt2 & 0\\ 0 & \sqrt2\end{bmatrix} \frac{1}{\sqrt2}\begin{bmatrix}1&1\\ -1&1\end{bmatrix}

Reconstruction gap 4.44×10−164.44\times10^{-16}. Geometrically: A\mathbf{A} rotates by −45°-45° and then stretches along the coordinate axes, so no second rotation is needed. Note this is the reduced-form convention of Equation 4.89 and the full form at once, since the matrix is square and full rank.

Find the best rank-11 approximation of A=[32223−2]\mathbf{A} = \begin{bmatrix}3&2&2\\ 2&3&-2\end{bmatrix}.

By Eckart-Young (Theorem 4.25) the answer is the first term of the SVD sum, and 4.8 already computed it:

A^(1)=σ1u1v1⊤=5⋅12[11]⋅12[110]=52[110110]=[2.52.502.52.50]\hat{\mathbf{A}}(1) = \sigma_1\mathbf{u}_1\mathbf{v}_1^\top = 5 \cdot \frac{1}{\sqrt2}\begin{bmatrix}1\\1\end{bmatrix} \cdot \frac{1}{\sqrt2}\begin{bmatrix}1&1&0\end{bmatrix} = \frac{5}{2}\begin{bmatrix}1&1&0\\1&1&0\end{bmatrix} = \begin{bmatrix}2.5&2.5&0\\ 2.5&2.5&0\end{bmatrix}

And the error is known in advance, by Equation 4.95:

∥A−A^(1)∥2=σ2=3\bigl\lVert\mathbf{A}-\hat{\mathbf{A}}(1)\bigr\rVert_2 = \sigma_2 = 3

Measured: 3.0000003.000000 in both the spectral and the Frobenius norm. They agree here because the residual A−A^(1)\mathbf{A}-\hat{\mathbf{A}}(1) has only one nonzero singular value, and for a rank-1 matrix the two norms coincide.

The third column of A^(1)\hat{\mathbf{A}}(1) is zero, which is worth a moment: v1\mathbf{v}_1 has a zero third component, so the best rank-1 approximation of this matrix simply cannot represent the third feature at all. That is the geometry of “keep the top direction” — it is a choice about which columns survive as much as about which magnitudes do.

4.11 — Both Gram matrices share their nonzero eigenvalues

Section titled “4.11 — Both Gram matrices share their nonzero eigenvalues”

Show that for any A∈Rm×n\mathbf{A} \in \mathbb{R}^{m\times n} the matrices A⊤A\mathbf{A}^\top\mathbf{A} and AA⊤\mathbf{A}\mathbf{A}^\top possess the same nonzero eigenvalues.

Proof. Let λ≠0\lambda \neq 0 be an eigenvalue of A⊤A\mathbf{A}^\top\mathbf{A} with eigenvector v≠0\mathbf{v} \neq \mathbf{0}:

A⊤Av=λv\mathbf{A}^\top\mathbf{A}\mathbf{v} = \lambda\mathbf{v}

Multiply on the left by A\mathbf{A}:

AA⊤(Av)=λ(Av)\mathbf{A}\mathbf{A}^\top(\mathbf{A}\mathbf{v}) = \lambda(\mathbf{A}\mathbf{v})

So Av\mathbf{A}\mathbf{v} is an eigenvector of AA⊤\mathbf{A}\mathbf{A}^\top with the same eigenvalue λ\lambda — provided Av≠0\mathbf{A}\mathbf{v} \neq \mathbf{0}. And it is nonzero, because

∥Av∥2=v⊤A⊤Av=λ∥v∥2≠0\lVert\mathbf{A}\mathbf{v}\rVert^2 = \mathbf{v}^\top\mathbf{A}^\top\mathbf{A}\mathbf{v} = \lambda\lVert\mathbf{v}\rVert^2 \neq 0

using λ≠0\lambda \neq 0 and v≠0\mathbf{v} \neq \mathbf{0}. So every nonzero eigenvalue of A⊤A\mathbf{A}^\top\mathbf{A} is one of AA⊤\mathbf{A}\mathbf{A}^\top. Swapping the roles of A\mathbf{A} and A⊤\mathbf{A}^\top gives the converse, and the two sets are equal. ■\blacksquare

Where λ≠0\lambda \neq 0 is essential. The zero eigenvalues need not match in multiplicity: for a 5×35\times3 matrix of rank 33, A⊤A\mathbf{A}^\top\mathbf{A} is 3×33\times3 with no zero eigenvalues at all while AA⊤\mathbf{A}\mathbf{A}^\top is 5×55\times5 with two. The counts differ by exactly ∣m−n∣\lvert m-n\rvert plus the rank deficiency, and the map v↦Av\mathbf{v} \mapsto \mathbf{A}\mathbf{v} collapses precisely on the kernel.

Measured. Over 40004000 random rectangular matrices with shapes drawn from 2×22\times2 up to 7×77\times7, the worst disagreement between the top min⁡(m,n)\min(m,n) eigenvalues of the two Gram matrices was 4.97×10−144.97\times10^{-14}. Over 20002000 deliberately rank-deficient matrices the worst relative disagreement was 2.11×10−152.11\times10^{-15}.

This is the fact §4.5.2 used without proof to argue that both Gram matrices produce the same Σ\boldsymbol{\Sigma}.

4.12 — The spectral norm is the largest singular value

Section titled “4.12 — The spectral norm is the largest singular value”

Show that for x≠0\mathbf{x} \neq \mathbf{0}, Theorem 4.24 holds:

max⁡x∥Ax∥2∥x∥2=σ1\max_{\mathbf{x}} \frac{\lVert\mathbf{A}\mathbf{x}\rVert_2}{\lVert\mathbf{x}\rVert_2} = \sigma_1

Proof. The ratio is scale-invariant, so restrict to ∥x∥2=1\lVert\mathbf{x}\rVert_2 = 1. Substitute the SVD:

∥Ax∥2=∥UΣV⊤x∥2=∥ΣV⊤x∥2\lVert\mathbf{A}\mathbf{x}\rVert_2 = \lVert\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^\top\mathbf{x}\rVert_2 = \lVert\boldsymbol{\Sigma}\mathbf{V}^\top\mathbf{x}\rVert_2

because U\mathbf{U} is orthogonal and orthogonal matrices preserve the Euclidean norm (§3.4). Write y=V⊤x\mathbf{y} = \mathbf{V}^\top\mathbf{x}; since V⊤\mathbf{V}^\top is also orthogonal, ∥y∥2=∥x∥2=1\lVert\mathbf{y}\rVert_2 = \lVert\mathbf{x}\rVert_2 = 1, and as x\mathbf{x} ranges over the unit sphere so does y\mathbf{y}. So the problem becomes

max⁡∥y∥2=1∥Σy∥2=max⁡∥y∥2=1∑iσi2yi2\max_{\lVert\mathbf{y}\rVert_2 = 1} \lVert\boldsymbol{\Sigma}\mathbf{y}\rVert_2 = \max_{\lVert\mathbf{y}\rVert_2 = 1} \sqrt{\sum_{i} \sigma_i^2 y_i^2}

Since σ1≥σi\sigma_1 \geq \sigma_i for every ii and ∑iyi2=1\sum_i y_i^2 = 1,

∑iσi2yi2≤σ12∑iyi2=σ12\sum_i \sigma_i^2 y_i^2 \leq \sigma_1^2\sum_i y_i^2 = \sigma_1^2

so the ratio never exceeds σ1\sigma_1. And the bound is attained: take y=e1\mathbf{y} = \mathbf{e}_1, that is x=v1\mathbf{x} = \mathbf{v}_1, giving ∥Av1∥2=σ1\lVert\mathbf{A}\mathbf{v}_1\rVert_2 = \sigma_1. A maximum that is both an upper bound and achieved is the maximum. ■\blacksquare

The proof is really two observations: orthogonal matrices do not change lengths, so the outer factors are irrelevant to the question; and a diagonal matrix stretches a unit vector most when the vector points along its largest entry.

Measured. 1,200,0001{,}200{,}000 random unit vectors across 300300 random matrices: the ratio ∥Ax∥/∥x∥\lVert\mathbf{A}\mathbf{x}\rVert/\lVert\mathbf{x}\rVert exceeded σ1\sigma_1 exactly 00 times. And for exercise 4.8’s matrix, ∥Av1∥=5.000000=σ1\lVert\mathbf{A}\mathbf{v}_1\rVert = 5.000000 = \sigma_1 exactly.

#questionanswer
4.1det⁡\det by Laplace and Sarrus00; singular, rank 22, because r3=2r1−r2\mathbf{r}_3 = 2\mathbf{r}_1 - \mathbf{r}_2
4.2a 5×55\times5 determinant66, exactly, by elimination rather than expansion
4.3two sets of eigenspaces(a) λ=1\lambda=1, algebraic 22, geometric 11 → defective; (b) λ=2,−3\lambda = 2, -3 → diagonalizable and orthogonal
4.4all eigenspaces of a 4×44\times4λ=2,1,−1\lambda = 2, 1, -1 with −1-1 doubled but geometric 11 → defective
4.5diagonalizable vs invertibleall four combinations occur, one per matrix
4.6eigenspaces; diagonalizable?(a) λ=5,1,1\lambda = 5, 1, 1 geometric 1+1=2<31+1 = 2 < 3 → defective; (b) λ=1,0,0,0\lambda = 1, 0, 0, 0 geometric 1+3=41+3 = 4 → diagonalizable
4.7four diagonalizability questions(a) complex 2±2i2\pm2i: no over R\mathbb{R}; (b) yes, D=diag(3,0,0)\mathbf{D} = \mathrm{diag}(3,0,0); (c) λ=4\lambda=4 doubled, geometric 11 → no; (d) yes, D=diag(2,2,1)\mathbf{D} = \mathrm{diag}(2,2,1)
4.8SVD of a 2×32\times3σ=5,3\sigma = 5, 3; U=12[111−1]\mathbf{U} = \tfrac{1}{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix}
4.9SVD of a 2×22\times2σ=22,2\sigma = 2\sqrt2, \sqrt2; U=I\mathbf{U} = \mathbf{I}
4.10best rank-152[110110]\tfrac52\begin{bmatrix}1&1&0\\1&1&0\end{bmatrix}, error 3=σ23 = \sigma_2
4.11the two Gram matricessame nonzero eigenvalues; the zero ones need not match in count
4.12max⁡∥Ax∥/∥x∥\max\lVert\mathbf{A}\mathbf{x}\rVert/\lVert\mathbf{x}\rVertσ1\sigma_1, attained at x=v1\mathbf{x} = \mathbf{v}_1

Six of the twelve are about one thing: how many independent eigenvectors are there? 4.3a, 4.4, 4.6a and 4.7c come up short; 4.6b and 4.7d do not, despite repeated eigenvalues. That is the chapter’s central distinction, drilled six times.

pch.quizTag Check your understanding
  1. Exercises 4.6a and 4.6b both have a repeated eigenvalue. Why is one defective and the other not?

    pch.quizShowAnswer

    B — Because defectiveness is about the geometric multiplicity, not the repeat: in 4.6a the double eigenvalue 1 has a one-dimensional eigenspace, while in 4.6b the triple eigenvalue 0 has a three-dimensional one, so the totals are 2 of 3 and 4 of 4 — A repeated eigenvalue is a warning, not a verdict. 4.7d makes the same point: a doubled eigenvalue 2 whose A minus 2I has rank 1, leaving a two-dimensional eigenspace, so it is diagonalizable.

  2. In 4.8, why start from A A-transpose rather than A-transpose A?

    pch.quizShowAnswer

    B — Because A is 2x3, so A A-transpose is only 2x2 with eigenvalues you can read off, whereas A-transpose A is 3x3 and needs a cubic factored — and by 4.11 they share their nonzero eigenvalues anyway — Then get the other factor from v-i equals A-transpose u-i over sigma-i. Exercise 4.11 is exactly the licence for this shortcut, which is why the book puts it in the same exercise set.

  3. The proof of 4.11 needs lambda nonzero at one specific step. Which, and what breaks without it?

    pch.quizShowAnswer

    B — Showing A v is not the zero vector: its squared norm is lambda times the squared norm of v, so it is nonzero only when lambda is. With lambda zero, A v can be zero and there is no eigenvector to carry across — And this is not a technicality: for a 5x3 matrix of rank 3, A-transpose A has no zero eigenvalues while A A-transpose has two. The nonzero spectra match; the zero ones do not.

  4. A Monte-Carlo run of 1.2 million unit vectors never exceeded sigma_1, but the sampled maximum fell short by up to 0.165. What does that experiment establish?

    pch.quizShowAnswer

    B — Only the inequality. It gives strong evidence that the ratio never exceeds sigma_1, and essentially no evidence that sigma_1 is attained — random vectors in five or six dimensions do not land near v_1. Attainment needs the argument, or v_1 itself — A general habit: sampling can refute an upper bound and can support one, but it cannot demonstrate that a maximum is achieved. Evaluating at the claimed maximiser can — ||A v_1|| came out to 5.000000 exactly for 4.8's matrix.

  5. Exercise 4.10's answer has a zero third column. Is that a coincidence?

    pch.quizShowAnswer

    B — No. The best rank-1 approximation is sigma_1 times u_1 v_1-transpose, and v_1 is (1,1,0)/sqrt(2) — its zero third component forces a zero third column, so this approximation cannot represent the third feature at all — Which is worth remembering when truncation is used for dimensionality reduction: keeping the top direction is a choice about which features survive, not only about which magnitudes do.

Exercise 1 – 4.1 and 4.2, two determinants

Section titled “Exercise 1 – 4.1 and 4.2, two determinants”

Exercise 2 – 4.3 to 4.7, every eigenspace

Section titled “Exercise 2 – 4.3 to 4.7, every eigenspace”

Exercise 3 – 4.4, 4.6, 4.7: the eigenvectors, exactly

Section titled “Exercise 3 – 4.4, 4.6, 4.7: the eigenvectors, exactly”

Exercise 4 – 4.8, 4.9 and 4.10, from the exact vectors

Section titled “Exercise 4 – 4.8, 4.9 and 4.10, from the exact vectors”
  • 4.1: the determinant is 0 because the third row is twice the first minus the second; Laplace and Sarrus agree, and the rank is 2.
  • 4.2: the 5 by 5 determinant is exactly 6 — computed by elimination, about 42 multiplications against Laplace’s 120 terms.
  • 4.3: (a) a single eigenvalue 1 with algebraic multiplicity 2 and geometric multiplicity 1, so defective despite being invertible; (b) eigenvalues 2 and minus 3 with orthogonal eigenvectors, because the matrix is symmetric.
  • 4.4: eigenvalues 2, 1 and minus 1, with minus 1 doubled but of geometric multiplicity 1 — defective, and 3 eigenvectors for a 4 by 4. The trace and the determinant confirm the spectrum.
  • 4.5: all four invertible-by-diagonalizable combinations occur, one per matrix, in the order given.
  • 4.6: (a) is defective, with the eigenvalue 1 doubled; (b) has the eigenvalue 0 tripled and is still diagonalizable. A repeated eigenvalue is a warning, not a verdict.
  • 4.7: (a) has the complex pair 2 plus and minus 2i, so it is not diagonalizable over the reals though it is invertible; (b) and (d) are diagonalizable; (c) is defective because the eigenvalue 4 is doubled with a one-dimensional eigenspace.
  • 4.8: the singular values are 5 and 3 — start from the 2 by 2 product of the matrix with its own transpose, whose eigenvalues 17 plus and minus 8 can be read off, then recover each right singular vector by applying the transpose to the matching left one and dividing by its singular value.
  • 4.9: the singular values are 2 root 2 and root 2, and the left singular matrix is the identity — the matrix rotates and then stretches along the coordinate axes.
  • 4.10: the best rank-1 approximation has every entry of its first two columns equal to five halves and a zero third column, with spectral error exactly the second singular value, 3. The third column vanishes because the first right singular vector’s third component does.
  • 4.11: multiply the eigenvector equation for the transpose-times-matrix product on the left by the matrix itself; the step that needs a non-zero eigenvalue is showing the image of the eigenvector is not zero. The counts of zero eigenvalues differ — none against two, for a 5 by 3 matrix of rank 3.
  • 4.12: orthogonal factors preserve length, so the problem reduces to maximising a diagonal stretch; the bound is the largest singular value and it is attained at the first right singular vector. Sampling verifies the inequality but never the attainment.

Next: Chapter 4 Formula Sheet — every definition, theorem and equation from the chapter on one page.

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading