Twelve exercises, worked in full. Every eigenvalue, eigenvector and singular value below was checked
against NumPy, and every eigenvector reported here satisfies Av=λ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
Both give 0, so the matrix is singular and has rank 2.
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)
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.
“Efficiently” is the whole exercise. Laplace expansion on a 5×5 costs 5!=120 terms; Gaussian
elimination costs about 53/3≈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
detA=6
Verified exactly, not just numerically: running Gaussian elimination in rational arithmetic with
fractions.Fraction returns the integer 6 with no rounding anywhere, and np.linalg.det returns
6.0000000000.
One eigenvector for a 2×2 matrix, so this matrix is defective and not diagonalizable. Note
detA=1=0, so it is nevertheless invertible — this is 4.5’s point in miniature.
(b)[−2221]
det(A−λI)=(−2−λ)(1−λ)−4=λ2+λ−6=(λ−2)(λ+3)
so λ1=2, λ2=−3. Check against Equations 4.23–4.24: trace =−1=2+(−3) ✓, and
det=−6=2⋅(−3) ✓.
E2=span{[12]},E−3=span{[2−1]}
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 ✓.
Sanity checks: the eigenvalues sum to 2+1−1−1=1=trA ✓ and multiply to
2⋅1⋅(−1)⋅(−1)=2=detA ✓ (Theorems 4.16, 4.17).
Geometric multiplicities sum to 3<4, so A is defective. The culprit is λ=−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 to 0.0e+00.
4.5 — Diagonalizability is unrelated to invertibility
Determine for the following four matrices whether they are diagonalizable and/or invertible:
[1001],[1000],[1011],[0010]
This is the exercise that makes §4.7’s warning concrete. All four combinations occur, one per matrix, in
exactly this order:
matrix
det
spectrum
∑ geometric
invertible
diagonalizable
[1001]
1
λ=1, algebraic 2, geometric 2
2
yes
yes
[1000]
0
λ=1,0, each geometric 1
2
no
yes
[1011]
1
λ=1, algebraic 2, geometric 1
1
yes
no
[0010]
0
λ=0, algebraic 2, geometric 1
1
no
no
Read the last two columns: yes yes, no yes, yes no, no no. A 2×2 example for each cell of a
2×2 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.
so λ=5 once and λ=1twice. Check: 5+1+1=7 ✓ and 5⋅1⋅1=5 ✓.
E5=span⎩⎨⎧110⎭⎬⎫,E1=span⎩⎨⎧3−10⎭⎬⎫
1+1=2<3: defective, not diagonalizable. Both eigenvectors have a zero third component, so the
whole eigenspace picture lives in the x1x2 plane and nothing reaches the third dimension.
(b)A=1000100000000000
Rank 1, so the kernel is three-dimensional. The characteristic polynomial is −λ3(1−λ):
λ=1 once and λ=0 three times.
Geometric multiplicities 1+3=4: diagonalizable, with D=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 dimker(A−λI) keeps up.
4.7 — Diagonalizable? Give the diagonal form and a basis
Not diagonalizable over R — there is no real eigenvector, because a real matrix with
complex eigenvalues has no invariant line. Over C it is diagonalizable: two distinct
eigenvalues, hence two independent eigenvectors, with
D=diag(2+2i,2−2i).
This is the answer the book’s §4.7 warning is pointing at. detA=8=0, so the matrix is
invertible; invertibility and diagonalizability are simply different questions.
(b)A=111111111
Rank 1: every row is the same. So λ=0 has algebraic multiplicity 2 and — since
dimkerA=3−1=2 — geometric multiplicity 2 as well. The remaining eigenvalue is the
trace, 3.
D=300000000,P=1111−1010−1
Diagonalizable. The matrix is symmetric, so the spectral theorem guarantees it — and an orthonormal
basis exists too: normalise (1,1,1) and replace the two kernel vectors with an orthonormal pair inside
that plane, for instance (1,−1,0)/2 and (1,1,−2)/6.
(c)A=50−1141−112−13−11−102
detA=32, trA=11.
λ
algebraic
geometric
eigenvector
4
2
1
(1,0,−1,1)⊤
2
1
1
(1,−1,0,1)⊤
1
1
1
(1,−1,0,0)⊤
Check: 4+4+2+1=11 ✓ and 4⋅4⋅2⋅1=32 ✓.
Geometric multiplicities sum to 3<4: not diagonalizable, because λ=4 is a double root
with only a one-dimensional eigenspace.
(d)A=5−13−64−6−62−4
detA=4, trA=5. Spectrum: λ=2 twice and λ=1
once. Check 2+2+1=5 ✓ and 2⋅2⋅1=4 ✓.
For λ=2:
A−2I=3−13−62−6−62−6
Every row is a multiple of (1,−2,−2), so the matrix has rank 1 and the eigenspace is the plane
x1−2x2−2x3=0, which is two-dimensional:
Compare (c) and (d). Both have a double eigenvalue; in (c) the rank of
A−λI is 3, leaving nullity 1; in (d) it is 1, leaving nullity 2. That
single number is the difference between defective and diagonalizable.
Verified from these exact vectors: ∥Av1∥=5.000000,
∥Av2∥=3.000000,
∥Av3∥=1.11×10−16, V orthogonal to
2.22×10−16, and the reconstruction
UΣV⊤ differing from A by
4.44×10−16.
Reconstruction gap 4.44×10−16. Geometrically: A rotates by −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.
And the error is known in advance, by Equation 4.95:
A−A^(1)2=σ2=3
Measured: 3.000000 in both the spectral and the Frobenius norm. They agree here because the
residual A−A^(1) has only one nonzero singular value, and for a rank-1 matrix
the two norms coincide.
The third column of A^(1) is zero, which is worth a moment: v1 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
Show that for any A∈Rm×n the matrices A⊤A and
AA⊤ possess the same nonzero eigenvalues.
Proof. Let λ=0 be an eigenvalue of A⊤A with eigenvector
v=0:
A⊤Av=λv
Multiply on the left by A:
AA⊤(Av)=λ(Av)
So Av is an eigenvector of AA⊤ with the same eigenvalue
λ — provided Av=0. And it is nonzero, because
∥Av∥2=v⊤A⊤Av=λ∥v∥2=0
using λ=0 and v=0. So every nonzero eigenvalue of
A⊤A is one of AA⊤. Swapping the roles of A and
A⊤ gives the converse, and the two sets are equal. ■
Where λ=0 is essential. The zero eigenvalues need not match in multiplicity: for a
5×3 matrix of rank 3, A⊤A is 3×3 with no zero eigenvalues at all
while AA⊤ is 5×5 with two. The counts differ by exactly ∣m−n∣
plus the rank deficiency, and the map v↦Av collapses precisely on
the kernel.
Measured. Over 4000 random rectangular matrices with shapes drawn from 2×2 up to
7×7, the worst disagreement between the top min(m,n) eigenvalues of the two Gram matrices was
4.97×10−14. Over 2000 deliberately rank-deficient matrices the worst relative disagreement
was 2.11×10−15.
This is the fact §4.5.2 used without proof to argue that both Gram matrices produce the same
Σ.
4.12 — The spectral norm is the largest singular value
Proof. The ratio is scale-invariant, so restrict to ∥x∥2=1. Substitute the
SVD:
∥Ax∥2=∥UΣV⊤x∥2=∥ΣV⊤x∥2
because U is orthogonal and orthogonal matrices preserve the Euclidean norm (§3.4). Write
y=V⊤x; since V⊤ is also orthogonal,
∥y∥2=∥x∥2=1, and as x ranges over the unit
sphere so does y. So the problem becomes
∥y∥2=1max∥Σy∥2=∥y∥2=1maxi∑σi2yi2
Since σ1≥σi for every i and ∑iyi2=1,
i∑σi2yi2≤σ12i∑yi2=σ12
so the ratio never exceeds σ1. And the bound is attained: take y=e1,
that is x=v1, giving ∥Av1∥2=σ1. A maximum
that is both an upper bound and achieved is the maximum. ■
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,000 random unit vectors across 300 random matrices: the ratio
∥Ax∥/∥x∥exceeded σ1 exactly 0 times. And
for exercise 4.8’s matrix, ∥Av1∥=5.000000=σ1 exactly.
(a) complex 2±2i: no over R; (b) yes, D=diag(3,0,0); (c) λ=4 doubled, geometric 1 → no; (d) yes, D=diag(2,2,1)
4.8
SVD of a 2×3
σ=5,3; U=21[111−1]
4.9
SVD of a 2×2
σ=22,2; U=I
4.10
best rank-1
25[111100], error 3=σ2
4.11
the two Gram matrices
same nonzero eigenvalues; the zero ones need not match in count
4.12
max∥Ax∥/∥x∥
σ1, attained at x=v1
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.quizTagCheck your understanding
Exercises 4.6a and 4.6b both have a repeated eigenvalue. Why is one defective and the other not?
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.
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.
In 4.8, why start from A A-transpose rather than A-transpose A?
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.
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.
The proof of 4.11 needs lambda nonzero at one specific step. Which, and what breaks without it?
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.
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.
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?
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.
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.
Exercise 4.10's answer has a zero third column. Is that a coincidence?
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.
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.
4.1: the determinant is 0 because r3=2r1−r2; Laplace and Sarrus agree, and rank is 2.
4.2: the 5×5 determinant is exactly 6 — computed by elimination, about 42 multiplications against Laplace’s 120 terms.
4.3: (a) λ=1 with algebraic 2 and geometric 1, so defective despite being invertible; (b) λ=2,−3 with orthogonal eigenvectors, since the matrix is symmetric.
4.4: λ=2,1,−1 with −1 doubled but geometric 1 — defective, 3 of 4. Trace and 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 a doubled λ=1; (b) has λ=0tripled and is still diagonalizable. A repeated eigenvalue is a warning, not a verdict.
4.7: (a) complex 2±2i, so not diagonalizable over the reals though invertible; (b) and (d) diagonalizable; (c) defective because λ=4 is doubled with a one-dimensional eigenspace.
4.8: σ=5,3 — start from the 2×2AA⊤, whose eigenvalues 17±8 you can read off, then get V from A⊤ui/σi.
4.9: σ=22,2 and U=I — the matrix rotates then stretches along the coordinate axes.
4.10: the best rank-1 is 25[111100] with error exactly σ2=3; its third column is zero because v1‘s third component is.
4.11: multiply A⊤Av=λv by A; the step that needs λ=0 is showing Av=0. The zero eigenvalues differ in count — 0 against 2 for a 5×3 of rank 3.
4.12: orthogonal factors preserve length, so the problem reduces to maximising a diagonal stretch; the bound σ1 is attained at x=v1. Sampling verifies the inequality but never the attainment.
Next:Chapter 4 Formula Sheet — every definition, theorem and equation
from the chapter on one page.