The spectral theorem, the SVD, Jordan form, and the bridge to algebra.
9 chapters written · 40 definitions · 38 theorems · builds on Unit 2
The story
Unit 2 asked whether a matrix can be diagonalized. This unit answers it. Symmetric matrices always can, with perpendicular eigenvectors (3.1, the spectral theorem), and that one theorem explains quadratic forms and the shape of conics (3.2) and the geometry of rotations and reflections (3.3).
Every matrix, symmetric or not, has a singular value decomposition (3.4): a rotation, a stretch along axes, another rotation. It is behind PCA, image compression and low-rank approximation, and it measures how badly a computation can go wrong (3.5: conditioning). Matrices that cannot be diagonalized have the next best form, Jordan form (3.6).
The unit ends with three bridges: dual and quotient spaces (3.7, toward MATH 540), matrix calculus and backpropagation (3.8, toward machine learning), and groups, rings and fields (3.9, toward MATH 541).
Every theorem in the unit, in the order it is proved. Each one is used by the ones after it. The label says whether it is on the 375/376 exams (T), an Apostol extra (A), or beyond both (B).
Theorem · ASpectral theorem Every real symmetric matrix is orthogonally diagonalizable: A=QΛQT, with real eigenvalues and an orthonormal basis of eigenvectors.
Theorem · BEckart–Young theorem The truncated SVD A_k is the best rank-k approximation of A; its error is the first discarded singular value σ_{k+1} (in the operator norm).
Proposition · BFunctionals on R^n are rows Every linear functional on Rn is φ(x)=a1x1+⋯+anxn with ai=φ(ei), which is the row [a1⋯an] times the column x; and every such row gives a functional.
Theorem · BThe dual basis is a basis If φ₁,…,φₙ is the dual basis of a basis v₁,…,vₙ of V, it is a basis of V*. In particular dim V* = dim V, and every functional is φ = φ(v₁)φ₁ + … + φ(vₙ)φₙ.
Theorem · BCosets are the classes modulo a subspace Define v ∼ w when v − w ∈ U. This is an equivalence relation whose class of v is exactly the coset v + U. So v + U = w + U iff v − w ∈ U, and any two cosets are equal or disjoint.
Theorem · BThe quotient space is a vector space The sum and scalar multiple on V/U are well defined, V/U is a vector space with zero vector O + U = U, and v ↦ v + U is a linear map from V onto V/U whose null space is U.
Theorem · BConsequences of the group axioms In any group: the identity is unique; each element has exactly one inverse; (ab)⁻¹ = b⁻¹a⁻¹; ab = ac implies b = c (and ba = ca implies b = c); and ax = b has the unique solution x = a⁻¹b.
Proposition · BSubgroup test A non-empty subset H of a group G is a subgroup as soon as ab⁻¹ is in H whenever a and b are in H.
Theorem · BLagrange's theorem If H is a subgroup of a finite group G, then the order of H divides the order of G: |G| = [G : H] · |H|.
Corollary · BConsequences of Lagrange's theorem In a finite group G: the order of every element divides |G|, so g^|G| = e; a group of prime order p is cyclic; and, for the group of invertible classes mod n, a^φ(n) ≡ 1 (Euler), in particular a^(p−1) ≡ 1 for prime p (Fermat).
Proposition · BHomomorphisms preserve identity and inverses A homomorphism sends the identity to the identity and inverses to inverses: φ(e) = e and φ(a⁻¹) = φ(a)⁻¹. Its kernel is a subgroup, and φ is one-to-one iff the kernel contains only the identity.
Theorem · BThe sign is a homomorphism For permutations σ and τ of {1,…,n}, sgn(τ∘σ) = sgn(τ)·sgn(σ). So sgn: Sₙ → ({1, −1}, ×) is a homomorphism, whose kernel is the group Aₙ of even permutations.
A mixed set of 12 quick checks drawn at random from the 68 in this unit's chapters. Each one says which chapter it comes from, so a miss tells you what to reread. Press "New set" for another mix.
Quick checkWhich real matrices can be orthogonally diagonalized (that is, A=QΛQT with Q orthogonal)?
Symmetric implies orthogonally diagonalizable by the spectral theorem, and the converse is the transpose computation in the example above. The matrix [1023] has real eigenvalues and is diagonalizable, but is not symmetric, so its eigenlines are not perpendicular.
Quick checkA real 5×5 symmetric matrix has eigenvalues 2,2,2,7,7. How many independent eigenvectors does it have?
The spectral theorem guarantees an orthonormal eigenbasis for every symmetric matrix, repeated eigenvalues included. The shear's failure (2.8) cannot happen for symmetric matrices.
A=[1−3−31] has eigenvalues 4 and −2. Opposite signs mean 4y12−2y22=1, a hyperbola. The signs of the x2 and y2 coefficients alone can mislead when there is a cross term.
A=[1−1−11] has eigenvalues 0 and 2. In principal axes the equation is 2y12=1, so y1=±21: two parallel lines. (Indeed x2−2xy+y2=(x−y)2.) A zero eigenvalue is neither ellipse nor hyperbola.
The first has eigenvalues 3 and 1. The second has all positive entries but eigenvalues 3 and −1 (determinant 1−4<0). The third has a negative diagonal entry, and x=(0,1) gives xTAx=−1. Positive entries are not the test.
Quick checkIf A is positive definite, what can you say about its diagonal entries aii?
Test the form on the standard basis vector ei: eiTAei=aii, and this must be positive. The converse fails: [1221] has positive diagonal and is not positive definite.
Quick checkIs [0.60.80.8−0.6] a rotation or a reflection?
The columns have length 0.36+0.64=1 and dot product 0.48−0.48=0, so it is orthogonal. The determinant is −1, so it reverses orientation. Rotations have the form [cs−sc], with the minus sign in the top right.
Quick checkA 3×3 matrix is orthogonal with determinant −1. Which is guaranteed?
−Q is a rotation, so by Euler's theorem it fixes a direction v, and then Qv=−v. A matrix with determinant −1 is not a rotation. The other two eigenvalues can be a complex pair e±iθ.
Quick checkWhich of these could be an eigenvalue of a real orthogonal matrix?
Eigenvalues of orthogonal matrices have absolute value 1. −1 occurs for a reflection (the direction across the mirror flips). 2 or 21 would mean some direction is stretched or shrunk.
Quick checkWhy is a singular value of a matrix never negative, even when A has a negative eigenvalue?
ATA is positive semidefinite, so its eigenvalues are ≥0 and so are their square roots. For diag(2,−3) the singular values are 3 and 2, and the −1 is absorbed into a singular vector.
Your answerHow many numbers store a rank-k approximation of an m×n matrix? Give the answer for m=768, n=768, k=8 (a LoRA-style update).
k(m+n+1)=8⋅1537=12,296, against 7682=589,824 for the full matrix: about 48 times fewer. (LoRA stores the two thin factors and folds σ into them, giving k(m+n)=12,288.)
Your answerIn the four-point example the eigenvalues of XTX are 18 and 2. What fraction of the total variance lies along the first principal component? Give a decimal.
Divide the first eigenvalue by the sum of both.
The variance along vi is N−1σi2, so the fractions are 2018 and 202. The first is 0.9.
Quick checkThe shear [1011] has eigenvalues 1,1. What are its singular values?
ATA=[1112] has eigenvalues 23±5≈2.618,0.382, whose square roots are 1.618 and 0.618. Singular values come from ATA, not from the eigenvalues of A. Their product is 1=∣detA∣.
Quick checkWhy must you center the data before PCA?
Without centering, ∥Xw∥2 is dominated by how far the cloud is from the origin, so v1 points at the mean. The SVD always exists; it answers a different question.
Your answerA system has κ(A)=106 and b is known to 8 significant digits (relative error 10−8). At most how large can the relative error in x be? Give it as a power of 10, e.g. 1e-5.
κ×10−8=106×10−8=10−2. You can only trust about 2 significant digits of x, even though b had 8.
Quick checkA solver returns an answer with a tiny residual ∥Ax−b∥, but κ(A)=1012. What can you conclude about the error in x?
The bound ∥x∥∥δx∥≤κ∥b∥∥δb∥ also applies with δb = the residual. With κ=1012 a residual of 10−16 (relative) can still hide an error of 10−4 in x. A small residual is not proof of an accurate x.
Quick checkFor least squares, why is solving the normal equations ATAx^=ATb risky on real data?
The singular values of ATA are σi2, so its condition number is squared. With κ(A)=108, the normal equations face 1016 and lose everything; QR (2.10) works with κ(A) itself.
The first has eigenvalue 3 twice but A−3I=[0010] has rank 1, so only one eigenvector line. The second is 3I, already diagonal despite the repeated eigenvalue. The third has distinct eigenvalues.
Your answerA 5×5 matrix has the single eigenvalue 4 and dimN(A−4I)=2. How many Jordan blocks does it have?
The number of blocks for an eigenvalue equals the number of independent eigenvectors, dimN(A−λI). Here 2 blocks, whose sizes add to 5 (so sizes 4+1 or 3+2; dimN(A−4I)2 would decide which).
Quick checkIn a Schur decomposition A=UTU∗, what does the diagonal of T list?
A is similar to T, and a triangular matrix has its eigenvalues on the diagonal. The singular values are generally different numbers: the shear has eigenvalues 1,1 but singular values 1.618,0.618 (3.4).
Quick checkLet V be the space of polynomials of degree at most 3. What is dimV∗?
dimV=4 (basis 1,x,x2,x3), and the dual basis theorem gives dimV∗=dimV=4. There are infinitely many functionals as individual objects, just as there are infinitely many vectors, but dimension counts independent directions.
Quick checkLet U be the x-axis in R2. Which coset equals (1,1)+U?
Two cosets are equal when the difference of representatives lies in U. (5,1)−(1,1)=(4,0) is on the x-axis. (1,5)−(1,1)=(0,4) is not, and (0,0)−(1,1)=(−1,−1) is not. The cosets of the x-axis are the horizontal lines, labelled by their height.
Quick checkIs the coset (1,1)+U for U the x-axis a subspace of R2?
The coset is the line y=1, which does not pass through the origin, so it is not a subspace. Only the coset O+U=U is a subspace. A coset is a subspace exactly when its representative is in U.
Quick checkFor U the x-axis in R2, someone defines g:R2/U→R by g(v+U)=∥v∥, the length of the representative. Is g well defined?
A rule on cosets must give the same answer for every representative. The representatives (0,1) and (5,1) name the same coset (the line y=1), but ∥(0,1)∥=1 and ∥(5,1)∥=26. By contrast v+U↦ the y-coordinate of v is well defined.
Quick checkA layer computes z=Wh with W of size 4×7. What is the shape of ∂W∂ℓ?
The derivative of a scalar loss with respect to a matrix has one entry per entry of that matrix. The formula ghT is (4×1)(1×7)=4×7. A 7×4 answer means a transpose is missing.
Quick checkFor a scalar function f:Rn→R, the Jacobian Jf and the gradient ∇f are related by:
The Jacobian is 1×n (one output, n inputs) and the gradient is the n×1 column of the same partial derivatives. A Jacobian of a scalar function is not square, so it has no inverse.
Quick checkIn a network, a ReLU unit has z<0 for the current input. What gradient reaches the weights that feed it?
The ReLU's derivative is 0 for z<0, and the backward pass multiplies by it. Everything upstream gets a factor of zero, so those weights do not move for this input (a 'dead' unit).
Quick checkWhy is backpropagation (reverse mode) used for training instead of computing each weight's derivative separately?
Separately, each of n weights would need its own pass: n times the work. Reverse mode multiplies the Jacobian product starting from the single-row end, so the whole gradient costs a small constant times one forward pass.
In (Z,×) the number 2 has no inverse. In (N,+) the number 1 has no negative in N. In Z7∖{0} every element has an inverse because 7 is prime (0.5), and products of non-zero classes stay non-zero.
Quick checkIn a group, which of these is always equal to (ab)−1?
Undo the last move first: (ab)(b−1a−1)=e. The expression a−1b−1 equals (ab)−1 only when ab=ba. Example in the next worked example: with A=[1011] and B=[1101] the two expressions are different matrices.
Keep adding 8 and subtract 12 whenever you pass it, until you land on 0.
Add 8 to itself until you reach 0 mod 12: 8,16≡4,24≡0. That takes 3 steps, matching 12/gcd(8,12)=12/4=3. It is not 12: 8 is not a generator since gcd(8,12)=4=1.