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
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.
How to use this page
Section titled “How to use this page”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
Laplace on the first row (Theorem 4.2):
Sarrus (Equation 4.6) — the three down-right products minus the three down-left products:
Both give , so the matrix is singular and has rank .
Why it is zero. There is an exact linear dependence among the rows:
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.
4.2 — A 5 by 5 determinant, efficiently
Section titled “4.2 — A 5 by 5 determinant, efficiently”“Efficiently” is the whole exercise. Laplace expansion on a costs terms; Gaussian elimination costs about 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
Verified exactly, not just numerically: running Gaussian elimination in rational arithmetic with
fractions.Fraction returns the integer with no rounding anywhere, and np.linalg.det returns
.
4.3 — Eigenspaces of two 2 by 2 matrices
Section titled “4.3 — Eigenspaces of two 2 by 2 matrices”(a)
So with algebraic multiplicity 2. The eigenspace:
One eigenvector for a matrix, so this matrix is defective and not diagonalizable. Note , so it is nevertheless invertible — this is 4.5’s point in miniature.
(b)
so , . Check against Equations 4.23–4.24: trace ✓, and ✓.
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 ✓.
4.4 — All eigenspaces of a 4 by 4
Section titled “4.4 — All eigenspaces of a 4 by 4”and . The spectrum is
| algebraic | geometric | eigenspace | |
|---|---|---|---|
| 1 | 1 | ||
| 1 | 1 | ||
| 2 | 1 |
Sanity checks: the eigenvalues sum to ✓ and multiply to ✓ (Theorems 4.16, 4.17).
Geometric multiplicities sum to , so is defective. The culprit is , which appears twice as a root but contributes only a one-dimensional eigenspace.
All three eigenvectors are exact integer vectors — each satisfies
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:
This is the exercise that makes §4.7’s warning concrete. All four combinations occur, one per matrix, in exactly this order:
| matrix | spectrum | geometric | invertible | diagonalizable | |
|---|---|---|---|---|---|
| , algebraic , geometric | yes | yes | |||
| , each geometric | no | yes | |||
| , algebraic , geometric | yes | no | |||
| , algebraic , geometric | no | no |
Read the last two columns: yes yes, no yes, yes no, no no. A example for each cell of a
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)
, . The last row makes the characteristic polynomial factor immediately:
so once and twice. Check: ✓ and ✓.
: defective, not diagonalizable. Both eigenvectors have a zero third component, so the whole eigenspace picture lives in the plane and nothing reaches the third dimension.
(b)
Rank , so the kernel is three-dimensional. The characteristic polynomial is : once and three times.
Geometric multiplicities : diagonalizable, with .
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 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)
Discriminant , so .
Not diagonalizable over — there is no real eigenvector, because a real matrix with complex eigenvalues has no invariant line. Over it is diagonalizable: two distinct eigenvalues, hence two independent eigenvectors, with .
This is the answer the book’s §4.7 warning is pointing at. , so the matrix is invertible; invertibility and diagonalizability are simply different questions.
(b)
Rank : every row is the same. So has algebraic multiplicity and — since — geometric multiplicity as well. The remaining eigenvalue is the trace, .
Diagonalizable. The matrix is symmetric, so the spectral theorem guarantees it — and an orthonormal basis exists too: normalise and replace the two kernel vectors with an orthonormal pair inside that plane, for instance and .
(c)
, .
| algebraic | geometric | eigenvector | |
|---|---|---|---|
| 2 | 1 | ||
| 1 | 1 | ||
| 1 | 1 |
Check: ✓ and ✓.
Geometric multiplicities sum to : not diagonalizable, because is a double root with only a one-dimensional eigenspace.
(d)
, . Spectrum: twice and once. Check ✓ and ✓.
For :
Every row is a multiple of , so the matrix has rank and the eigenspace is the plane , which is two-dimensional:
: diagonalizable, with
Compare (c) and (d). Both have a double eigenvalue; in (c) the rank of is , leaving nullity ; in (d) it is , leaving nullity . That single number is the difference between defective and diagonalizable.
4.8 — Find the SVD of a 2 by 3
Section titled “4.8 — Find the SVD of a 2 by 3”Step 1 — the smaller Gram matrix. Here is and is , so start with the small one:
Its eigenvalues are , that is and , with eigenvectors and — a matrix of the form always has those. So
Step 2 — the right-singular vectors from :
comes from the kernel: and .
The decomposition.
Verified from these exact vectors: , , , orthogonal to , and the reconstruction differing from by .
4.9 — Find the SVD of a 2 by 2
Section titled “4.9 — Find the SVD of a 2 by 2”Again of the form , so eigenvalues with eigenvectors and . Hence
Now the left-singular vectors, and they come out remarkably clean:
So and
Reconstruction gap . Geometrically: rotates by 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.
4.10 — The best rank-1 approximation
Section titled “4.10 — The best rank-1 approximation”Find the best rank- approximation of .
By Eckart-Young (Theorem 4.25) the answer is the first term of the SVD sum, and 4.8 already computed it:
And the error is known in advance, by Equation 4.95:
Measured: in both the spectral and the Frobenius norm. They agree here because the residual has only one nonzero singular value, and for a rank-1 matrix the two norms coincide.
The third column of is zero, which is worth a moment: 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 the matrices and possess the same nonzero eigenvalues.
Proof. Let be an eigenvalue of with eigenvector :
Multiply on the left by :
So is an eigenvector of with the same eigenvalue — provided . And it is nonzero, because
using and . So every nonzero eigenvalue of is one of . Swapping the roles of and gives the converse, and the two sets are equal.
Where is essential. The zero eigenvalues need not match in multiplicity: for a matrix of rank , is with no zero eigenvalues at all while is with two. The counts differ by exactly plus the rank deficiency, and the map collapses precisely on the kernel.
Measured. Over random rectangular matrices with shapes drawn from up to , the worst disagreement between the top eigenvalues of the two Gram matrices was . Over deliberately rank-deficient matrices the worst relative disagreement was .
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
Section titled “4.12 — The spectral norm is the largest singular value”Show that for , Theorem 4.24 holds:
Proof. The ratio is scale-invariant, so restrict to . Substitute the SVD:
because is orthogonal and orthogonal matrices preserve the Euclidean norm (§3.4). Write ; since is also orthogonal, , and as ranges over the unit sphere so does . So the problem becomes
Since for every and ,
so the ratio never exceeds . And the bound is attained: take , that is , giving . 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. random unit vectors across random matrices: the ratio exceeded exactly times. And for exercise 4.8’s matrix, exactly.
The whole chapter, in one table
Section titled “The whole chapter, in one table”| # | question | answer |
|---|---|---|
| 4.1 | by Laplace and Sarrus | ; singular, rank , because |
| 4.2 | a determinant | , exactly, by elimination rather than expansion |
| 4.3 | two sets of eigenspaces | (a) , algebraic , geometric → defective; (b) → diagonalizable and orthogonal |
| 4.4 | all eigenspaces of a | with doubled but geometric → defective |
| 4.5 | diagonalizable vs invertible | all four combinations occur, one per matrix |
| 4.6 | eigenspaces; diagonalizable? | (a) geometric → defective; (b) geometric → diagonalizable |
| 4.7 | four diagonalizability questions | (a) complex : no over ; (b) yes, ; (c) doubled, geometric → no; (d) yes, |
| 4.8 | SVD of a | ; |
| 4.9 | SVD of a | ; |
| 4.10 | best rank-1 | , error |
| 4.11 | the two Gram matrices | same nonzero eigenvalues; the zero ones need not match in count |
| 4.12 | , attained at |
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.
-
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.
🧪 Try It Yourself
Section titled “🧪 Try It Yourself”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”Exercise 5 – 4.11 and 4.12, tested
Section titled “Exercise 5 – 4.11 and 4.12, tested”Recall card
Section titled “Recall card”- 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.coffeeCtapch.feedbackHeading
pch.feedbackSubheading