What the quiz covers.
- Chapter 4, orthogonality: \(Q^\top Q = I\), projections, least squares, Gram–Schmidt.
- Chapter 5, determinants: Properties 1–10, the big formula, cofactors, the inverse formula.
- Sections 6.1–6.2: eigenvalues and eigenvectors, \(A = S\Lambda S^{-1}\), powers \(A^k\).
- Not covered: differential equations (Section 6.3), which go on Quiz 3.
Format. As in Lecture 13, Strang works through problems from old exams, mainly 1984 and 1992.
Problem 1: Projection onto a line, then iterating it (1984)
Setup. \(a = (2, 1, 2)\). Find \(P\), the projection matrix onto the line through \(a\).
(a) The projection matrix
For a single column, the general formula \(A(A^\top A)^{-1}A^\top\) reduces to \(\dfrac{aa^\top}{a^\top a}\). Here \(a^\top a = 9\):
(b) Rank, column space, eigenvalues
- Rank: 1.
- Column space: the line through \(a\).
- \(\lambda = 0\), repeated twice. \(P\) has rank 1, so its nullspace is 2-dimensional. That gives two independent eigenvectors with \(\lambda = 0\).
- \(\lambda = 1\). Two ways to see it:
- The trace is \(9/9 = 1\), and the other two eigenvalues are 0.
- \(Pa = a\), because the projection leaves \(a\) in place. So \(a\) is the eigenvector for \(\lambda = 1\).
(c) Solve \(u_{k+1} = Pu_k\) with \(u_0 = (9, 9, 0)\)
First step:
All later steps. \(u_1\) already lies on the line, and \(P^2 = P\), so projecting again changes nothing:
For a general matrix, not a projection, use the full method:
For this \(P\), two eigenvalues are 0, so those terms vanish after one step. The remaining term is \(c_3(1)^kx_3\), which stays constant.
Problem 2: Least squares and Gram–Schmidt (1984)
(a) Best line through the origin
Data. \((t, y) = (1, 4),\ (2, 5),\ (3, 8)\). The model is \(y = Dt\), with one unknown \(D\).
The equations we'd like to solve:
Normal equation. \(A^\top A\hat{D} = A^\top b\), with \(A^\top A = 14\) and \(A^\top b = 4 + 10 + 24 = 38\):
(b) Which vector is projected onto which line?
Strang stresses that least squares has two different pictures.
Picture 1: the \(t\)–\(y\) plane. It shows the three data points and the fitted line. There is no projection in this picture. The points are not being projected onto the line.
Picture 2: \(\mathbb{R}^3\). The vector \(b = (4, 5, 8)\) is projected onto the line through \((1, 2, 3)\), which is \(C(A)\). \(\hat{D}\) is the multiple of \((1,2,3)\) that gives the projection.
(c) Gram–Schmidt
Setup. Make \(a_1 = (1, 2, 3)\) and \(a_2 = (1, 1, 1)\) orthogonal, staying in the plane they span.
Keep \(a_1\). Then subtract from \(a_2\) its projection onto \(a_1\):
Finishing the arithmetic (my computation):
No square roots. Only orthogonality was asked for, so there is no need to normalize.
Not unique. Any rotation of this orthogonal pair within the same plane would also work.
Problem 3: Eigenvalue facts (1984)
\(A\) is \(4\times4\) with eigenvalues \(\lambda_1, \lambda_2, \lambda_3, \lambda_4\).
| Question | Answer | Reason |
|---|---|---|
| When is \(A\) invertible? | No \(\lambda_i = 0\) | \(\lambda = 0\) means a nonzero vector in the nullspace |
| \(\det(A^{-1})\)? | \(\dfrac{1}{\lambda_1\lambda_2\lambda_3\lambda_4}\) | The eigenvalues of \(A^{-1}\) are \(1/\lambda_i\), and det = product of eigenvalues |
| \(\text{trace}(A + I)\)? | \(\lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 + 4\) | Adding \(I\) shifts every eigenvalue by 1 |
Problem 4: Tridiagonal determinants and period 6 (1984)
The family. \(A_n\) has 1s on the main diagonal and on the diagonals just above and below. Write \(D_n = \det A_n\).
(a) Recurrence by cofactors
Expand along row 1:
- The \((1,1)\) entry contributes \(1 \cdot D_{n-1}\).
- The \((1,2)\) entry sits in a minus position. Its minor has a single 1 at the top of its first column, so expanding down that column gives \(D_{n-2}\). The contribution is \(-D_{n-2}\).
This is the same result as in Lecture 19.
(b) Write it as a first-order system
Use the vector unknown \((D_n, D_{n-1})\), as with Fibonacci:
(c) Eigenvalues
This is not Fibonacci. The sign change in the recurrence makes the eigenvalues complex.
Magnitude.
(d) What happens to \(D_n\)?
Sixth power. \(\lambda^6 = e^{\pm 2\pi i} = 1\).
So \(A^6 = I\). The two eigenvalues are distinct, so \(A\) is diagonalizable. Then
Behavior. The sequence neither decays nor blows up. It cycles with period 6: \(1, 0, -1, -1, 0, 1, \dots\)
Problem 5: A family of matrices from the 1992 final
The family. \(A_n\) is symmetric and tridiagonal, with zeros on the diagonal and off-diagonal entries \(1, 2, 3, \dots\) For example:
(a) Is \(A_3\) singular? What is the projection onto \(C(A_3)\)?
Singular. Column 3 is \(2 \times\) column 1. So \(C(A_3)\) is a plane, and \(P\) is \(3\times3\).
The projection. Strang says to use \(A(A^\top A)^{-1}A^\top\), and hints that a quicker route exists.
The quicker route (my computation). The pivot columns \((0,1,0)\) and \((1,0,2)\) are already orthogonal. So \(P\) is just the sum of the two one-dimensional projections:
(b) Eigenvalues of \(A_3\)
Expand with the big formula:
- The down-right products give \(-\lambda^3\).
- The down-left products give \(-(-\lambda - 4\lambda) = +5\lambda\).
Eigenvalues: \(\lambda = 0,\; \sqrt5,\; -\sqrt5\).
Strang's habit: check the trace. The eigenvalues sum to 0, matching the trace of 0. He also notes the limitation of this check: it would not have caught an error that changed \(5\lambda\) to \(4\lambda\), since that still gives eigenvalues summing to 0.
(c) Projection onto \(C(A_4)\)
The exam said this is "not difficult". Strang wonders aloud whether that comment was meant to be helpful or insulting.
The trick. If \(A_4\) is invertible, then \(C(A_4) = \mathbb{R}^4\), and the projection is \(P = I\).
Check invertibility with cofactors.
- Row 1 has a single nonzero entry, \(a_{12} = 1\), in a minus position.
- Its minor has a single nonzero entry in its first column, a 1, and its own minor is \(\begin{vmatrix} 0 & 3 \\ 3 & 0 \end{vmatrix} = -9\).
- Tracking the signs gives:
So \(A_4\) is invertible and \(P = I\).
Strang's guess. Odd-numbered members of the family are singular, and even-numbered ones are invertible.
Confirming the guess (my addition).
- Odd \(n\) is always singular. The eigenvalues of a zero-diagonal symmetric tridiagonal matrix come in \(\pm\) pairs. With an odd count, one of them must be 0.
- Even \(n\) is always invertible. The determinant is \(\pm(b_1b_3b_5\cdots)^2\), where \(b_1, b_3, \dots\) are the 1st, 3rd, 5th, … off-diagonal entries. For \(n = 4\) this is \((1 \cdot 3)^2 = 9\). Since every \(b_i \neq 0\), the determinant is never zero.
Quick review checklist
- Projection onto a line: \(P = aa^\top/a^\top a\). It has rank 1, eigenvalues \(1, 0, \dots, 0\), and \(Pa = a\).
- Projections are idempotent: \(P^k = P\), so \(u_{k+1} = Pu_k\) stops changing after one step.
- Least squares: solve \(A^\top A\hat{x} = A^\top b\). The geometric picture is \(b\) projected onto \(C(A)\) in \(\mathbb{R}^m\), not points projected onto the fitted line.
- Gram–Schmidt: \(B = a_2 - \dfrac{a_1^\top a_2}{a_1^\top a_1}a_1\).
- Eigenvalue shortcuts:
- \(\det = \prod\lambda_i\) and \(\text{trace} = \sum\lambda_i\).
- \(A^{-1}\) has eigenvalues \(1/\lambda_i\).
- \(A + cI\) has eigenvalues \(\lambda_i + c\).
- Recurrences: convert to \(u_{k+1} = Au_k\). Then \(|\lambda| > 1\) grows, \(|\lambda| < 1\) decays, and \(|\lambda| = 1\) oscillates. For example, \(e^{\pm i\pi/3}\) gives period 6.
- Invertible means \(C(A)\) is the whole space, so the projection onto it is \(I\).