Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Use the special directions as your rulers
In A2.3-1 you found the special directions a matrix only stretches. Now here’s the trick: use those directions as your measuring rulers. In those rulers, the complicated machine is just “stretch this way by 3, stretch that way by 1”. Nothing gets mixed up any more. Rewriting a matrix like this is called diagonalization.
Why it’s handy: applying the machine 10 times is now easy. Just stretch by one way and the other way.
Mirror-shaped tables are extra friendly
For a symmetric matrix (one that matches its own mirror image, A2.2-3), the special directions always exist, are always real, and always meet at right angles. Pick the “Symmetric” preset in the demo and look at the two green bands. Then try the “Non-symmetric” one: its bands aren’t perpendicular.
- 1. A machine stretches one direction by 2 and another by 3. Applied twice, the first direction is stretched by…
- 2. For a symmetric matrix, the special directions meet at…
- 3. In 2D, how many independent stretches describe a diagonalizable machine?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.The factorization
If has independent eigenvectors, put them in the columns of and the eigenvalues on the diagonal of :
Read it right to left: change into eigen-coordinates (), stretch each coordinate (), and change back ().
Powers become easy
Example. has eigenvalues 3 and 1, with eigenvectors and . So stretches by and leaves alone. That gives .
- 1. diag(2, 3)¹⁰ has (1,1) entry…
- 2. In A = PDP⁻¹, the columns of P are…
- 3. The eigenvectors (1,1) and (1,−1) of [[2,1],[1,2]] have dot product…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.When can you diagonalize?
is diagonalizable iff it has linearly independent eigenvectors. Sufficient conditions:
- distinct eigenvalues (A2.3-1);
- is symmetric (the spectral theorem, below).
Counter-example: the shear has only one eigen-direction, so it can’t be diagonalized. (Defective matrices need the Jordan form, a topic for advanced texts.)
The spectral theorem
If , then all eigenvalues are real, and there is an orthonormal basis of eigenvectors:
There’s no inverse to compute, because . Each term is a stretched projection onto one axis. Symmetric matrices are everywhere: covariance matrices, Hessians, graph Laplacians, kernel matrices, and inertia tensors.
What diagonalization buys you
| Task | In eigen-coordinates |
|---|---|
| Powers | |
| Long-run behaviour of | dominated by the largest |
| Differential equations | : each mode decays or grows like |
| Fibonacci, recurrences | closed forms such as |
| Quadratic forms | : a bowl, a saddle or a dome (A2.3-3) |
The covariance matrix of a dataset is symmetric, so . The columns of are the principal directions, and the eigenvalues are the variances along them. Keeping the top few is PCA (D9).
- 1. Which matrix is guaranteed diagonalizable with orthogonal eigenvectors?
- 2. For symmetric S = QΛQᵀ, S⁻¹ = ?
- 3. Is the shear [[1, 1], [0, 1]] diagonalizable?
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Proof that symmetric eigenvalues are real
A real symmetric matrix has only real eigenvalues, and eigenvectors for different eigenvalues are orthogonal.
Proof. Let , with possibly complex. Then . Taking the conjugate transpose of the left side and using real gives the same number with . Since , we get .
For orthogonality: if and , then . So , and since , . ∎
The full theorem, which says an orthonormal eigenbasis exists even with repeated eigenvalues, follows by induction. Take one eigenvector . Then maps the orthogonal complement into itself, so repeat inside that smaller space.
The Rayleigh quotient and extreme eigenvalues
For symmetric , , with equality at the corresponding eigenvectors.
Proof. In eigen-coordinates , the quotient is , a weighted average of the eigenvalues. ∎ So “maximize the variance in a direction” (PCA) and “find the top eigenvector” are the same problem. The min–max version (the Courant–Fischer theorem) characterizes every eigenvalue this way.
Functions of a matrix
For diagonalizable , any function defined on the eigenvalues extends to the matrix: . Examples are (dynamics), (the square root of a covariance, used to sample Gaussians), and .
Exercise 3.1: Compute e^A for A = diag(0, ln 2)
, with trace 3. Note that . ✓
- 1. Max of xᵀSx/xᵀx for S = [[2,1],[1,2]]?
- 2. How many mutually orthogonal eigenvectors can a symmetric 4 × 4 matrix have?
- 3. det(e^A) equals…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Modes of dynamical systems
For linear dynamics , diagonalizing splits the motion into independent modes: . A damped spring with oscillates at about 1.98 rad/s while decaying like . In robotics and aerospace this is modal analysis: the vibration modes of a flexible arm, a solar panel or a launch vehicle are the eigenvectors of the structure’s mass and stiffness matrices. Controllers are designed so they don’t excite the dangerous ones.
Spectral methods in ML research
- Graph signal processing and spectral GNNs. Diagonalizing a graph Laplacian, , gives a “Fourier transform” on graphs (). Spectral graph convolutions (Bruna et al., 2014; Defferrard et al., 2016) filter signals by reweighting eigenvalues, the ancestor of GCNs (E14).
- Neural tangent kernel. In the infinite-width limit, training follows . Along each eigenvector of the NTK , the error decays like , so directions with large eigenvalues are learned first. This “spectral bias” explains why networks fit smooth functions before high-frequency detail (B4, J2).
- Diagonal state-space models. Modern sequence models such as S4D and Mamba parameterize their recurrence with a diagonal . They work in an eigenbasis from the start, so long sequences can be processed fast (E17).
References
- A.-L. Cauchy (1829). (Reality of eigenvalues of symmetric matrices.)
- R. Courant and D. Hilbert (1924). Methoden der mathematischen Physik. (Min–max principle.)
- J. Bruna, W. Zaremba, A. Szlam, Y. LeCun (2014). “Spectral networks and locally connected networks on graphs.” ICLR.
- M. Defferrard, X. Bresson, P. Vandergheynst (2016). “Convolutional neural networks on graphs with fast localized spectral filtering.” NeurIPS.
- A. Jacot, F. Gabriel, C. Hongler (2018). “Neural tangent kernel: Convergence and generalization in neural networks.” NeurIPS.
- A. Gu, K. Goel, A. Gupta, C. Ré (2022). “On the parameterization and initialization of diagonal state space models.” NeurIPS.
- G. Strang (2016). Introduction to Linear Algebra, 5th ed. Chapter 6.