TheoremComplete

Spectral Theorem

The Spectral Theorem states that every real symmetric (or complex Hermitian) matrix is orthogonally (unitarily) diagonalizable. The eigenvectors form an orthonormal basis, and the eigenvalues are all real. This is one of the most important theorems in linear algebra, with applications ranging from quantum mechanics to principal component analysis.


Statement

Theorem8.5Spectral Theorem (real case)

Let AMn×n(R)A \in M_{n \times n}(\mathbb{R}) be a symmetric matrix (AT=AA^T = A). Then:

  1. All eigenvalues of AA are real.
  2. Eigenvectors corresponding to distinct eigenvalues are orthogonal.
  3. AA is orthogonally diagonalizable: there exists an orthogonal matrix QQ (QTQ=IQ^TQ = I) such that QTAQ=Λ=diag(λ1,,λn)Q^TAQ = \Lambda = \operatorname{diag}(\lambda_1, \ldots, \lambda_n).

Equivalently, A=QΛQT=i=1nλiqiqiTA = Q\Lambda Q^T = \sum_{i=1}^n \lambda_i q_i q_i^T, where qiq_i are the orthonormal eigenvectors.

Theorem8.6Spectral Theorem (complex case)

Let AMn×n(C)A \in M_{n \times n}(\mathbb{C}) be Hermitian (A=AA^* = A). Then all eigenvalues are real, and there exists a unitary matrix UU (UU=IU^*U = I) such that UAU=Λ=diag(λ1,,λn)U^*AU = \Lambda = \operatorname{diag}(\lambda_1, \ldots, \lambda_n).

More generally, for normal matrices (AA=AAA^*A = AA^*), unitarily diagonalizable with possibly complex eigenvalues.


Examples

ExampleSpectral theorem for a 2x2 symmetric matrix

A=(3113)A = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix}.

Eigenvalues: λ1=4\lambda_1 = 4, λ2=2\lambda_2 = 2.

Eigenvectors: v1=12(1,1)v_1 = \frac{1}{\sqrt{2}}(1, 1), v2=12(1,1)v_2 = \frac{1}{\sqrt{2}}(1, -1).

Q=12(1111)Q = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, QTAQ=(4002)Q^TAQ = \begin{pmatrix} 4 & 0 \\ 0 & 2 \end{pmatrix}.

Spectral decomposition: A=412(11)(1,1)+212(11)(1,1)=2(1111)+(1111)=(3113)A = 4 \cdot \frac{1}{2}\begin{pmatrix} 1 \\ 1 \end{pmatrix}(1, 1) + 2 \cdot \frac{1}{2}\begin{pmatrix} 1 \\ -1 \end{pmatrix}(1, -1) = 2\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix} + \begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix} = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} ✓.

ExampleSpectral theorem for a 3x3 symmetric matrix

A=(210121012)A = \begin{pmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 \end{pmatrix} (the tridiagonal matrix from the discrete Laplacian).

Eigenvalues: λk=22coskπ4\lambda_k = 2 - 2\cos\frac{k\pi}{4} for k=1,2,3k = 1, 2, 3: λ1=22\lambda_1 = 2 - \sqrt{2}, λ2=2\lambda_2 = 2, λ3=2+2\lambda_3 = 2 + \sqrt{2}.

All eigenvalues are real and positive (so AA is positive definite). The eigenvectors are orthogonal and can be normalized to form an orthonormal basis.

ExampleDiagonal matrices are trivially spectral

A=diag(λ1,,λn)A = \operatorname{diag}(\lambda_1, \ldots, \lambda_n) is already in spectral form with Q=IQ = I.

The spectral decomposition A=λieieiTA = \sum \lambda_i e_i e_i^T is just writing the diagonal matrix as a sum of rank-11 projections.


The spectral decomposition

Definition8.12Spectral decomposition

The spectral decomposition of a symmetric matrix AA is:

A=λ1P1+λ2P2++λkPk,A = \lambda_1 P_1 + \lambda_2 P_2 + \cdots + \lambda_k P_k,

where λ1<λ2<<λk\lambda_1 < \lambda_2 < \cdots < \lambda_k are the distinct eigenvalues and PiP_i is the orthogonal projection onto the eigenspace EλiE_{\lambda_i}. The projections satisfy PiPj=0P_i P_j = 0 for iji \neq j and P1++Pk=IP_1 + \cdots + P_k = I.

ExampleSpectral decomposition in detail

A=(5222)A = \begin{pmatrix} 5 & 2 \\ 2 & 2 \end{pmatrix}. Eigenvalues: λ1=1\lambda_1 = 1, λ2=6\lambda_2 = 6.

Eigenvectors: v1=15(1,2)v_1 = \frac{1}{\sqrt{5}}(-1, 2), v2=15(2,1)v_2 = \frac{1}{\sqrt{5}}(2, 1).

P1=v1v1T=15(1224)P_1 = v_1 v_1^T = \frac{1}{5}\begin{pmatrix} 1 & -2 \\ -2 & 4 \end{pmatrix}, P2=v2v2T=15(4221)P_2 = v_2 v_2^T = \frac{1}{5}\begin{pmatrix} 4 & 2 \\ 2 & 1 \end{pmatrix}.

A=1P1+6P2=15(1224)+65(4221)=15(25101010)=(5222)A = 1 \cdot P_1 + 6 \cdot P_2 = \frac{1}{5}\begin{pmatrix} 1 & -2 \\ -2 & 4 \end{pmatrix} + \frac{6}{5}\begin{pmatrix} 4 & 2 \\ 2 & 1 \end{pmatrix} = \frac{1}{5}\begin{pmatrix} 25 & 10 \\ 10 & 10 \end{pmatrix} = \begin{pmatrix} 5 & 2 \\ 2 & 2 \end{pmatrix} ✓.


Why eigenvalues are real

ProofEigenvalues of symmetric matrices are real

Let Av=λvAv = \lambda v with v0v \neq 0, A=ATA = A^T. Consider vˉTAv\bar{v}^T Av:

vˉTAv=λvˉTv=λv2\bar{v}^T Av = \lambda \bar{v}^T v = \lambda \|v\|^2.

Also, vˉTAv=vˉTATv=(Av)Tvˉ\bar{v}^T Av = \bar{v}^T A^T v = (Av)^T \bar{v}... wait. More carefully (working over C\mathbb{C}):

λv2=λv2=vAv=(Av)v=(Av)...\overline{\lambda} \|v\|^2 = \overline{\lambda \|v\|^2} = \overline{v^* Av} = (Av)^* v = (A^*v)^*...

Cleanly: vAv=vλv=λv2v^* Av = v^* \lambda v = \lambda \|v\|^2. Also vAv=vAv=(Av)v=λvv=λv2v^* Av = v^* A^* v = (Av)^* v = \overline{\lambda} v^* v = \overline{\lambda}\|v\|^2.

So λv2=λv2\lambda \|v\|^2 = \overline{\lambda}\|v\|^2. Since v2>0\|v\|^2 > 0, λ=λ\lambda = \overline{\lambda}, meaning λR\lambda \in \mathbb{R}. \blacksquare


Why eigenvectors for distinct eigenvalues are orthogonal

ProofOrthogonality of eigenvectors

Let Av1=λ1v1Av_1 = \lambda_1 v_1 and Av2=λ2v2Av_2 = \lambda_2 v_2 with λ1λ2\lambda_1 \neq \lambda_2 and A=ATA = A^T.

λ1v1,v2=Av1,v2=v1,ATv2=v1,Av2=λ2v1,v2\lambda_1 \langle v_1, v_2 \rangle = \langle Av_1, v_2 \rangle = \langle v_1, A^Tv_2 \rangle = \langle v_1, Av_2 \rangle = \lambda_2 \langle v_1, v_2 \rangle.

So (λ1λ2)v1,v2=0(\lambda_1 - \lambda_2)\langle v_1, v_2 \rangle = 0. Since λ1λ2\lambda_1 \neq \lambda_2: v1,v2=0\langle v_1, v_2 \rangle = 0. \blacksquare

ExampleOrthogonality verified

A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, eigenvalues 3,13, 1, eigenvectors (1,1)(1, 1) and (1,1)(1, -1).

(1,1)(1,1)=11=0(1, 1) \cdot (1, -1) = 1 - 1 = 0 ✓ (orthogonal as guaranteed by the theorem).


Applications

ExamplePrincipal Component Analysis (PCA)

Given data points in Rn\mathbb{R}^n, the covariance matrix Σ=1mXTX\Sigma = \frac{1}{m}X^TX is symmetric positive semi-definite. The spectral theorem gives Σ=QΛQT\Sigma = Q\Lambda Q^T.

The eigenvectors (columns of QQ) are the principal components -- the directions of maximum variance. The eigenvalues measure the variance along each direction.

For data in R2\mathbb{R}^2 with Σ=(4223)\Sigma = \begin{pmatrix} 4 & 2 \\ 2 & 3 \end{pmatrix}: eigenvalues 5,25, 2, eigenvectors (2,1)/5(2, 1)/\sqrt{5} and (1,2)/5(-1, 2)/\sqrt{5}. The first principal component captures 5/(5+2)71%5/(5+2) \approx 71\% of the variance.

ExampleDiagonalizing a quadratic form

Q(x,y)=5x2+4xy+2y2Q(x, y) = 5x^2 + 4xy + 2y^2. Matrix: M=(5222)M = \begin{pmatrix} 5 & 2 \\ 2 & 2 \end{pmatrix}.

By the spectral theorem: eigenvalues 6,16, 1, so in the eigenbasis Q=6u2+v2Q = 6u^2 + v^2.

The level set Q=1Q = 1 is an ellipse with semi-axes 1/61/\sqrt{6} and 11, rotated to align with the eigenvectors.

ExampleMatrix functions via spectral theorem

For symmetric A=QΛQTA = Q\Lambda Q^T, any function ff can be applied:

f(A)=Qf(Λ)QT=Qdiag(f(λ1),,f(λn))QT.f(A) = Q f(\Lambda) Q^T = Q \operatorname{diag}(f(\lambda_1), \ldots, f(\lambda_n)) Q^T.

  • Square root: A=QΛQT\sqrt{A} = Q\sqrt{\Lambda}Q^T (requires AA positive semi-definite).
  • Inverse: A1=QΛ1QTA^{-1} = Q\Lambda^{-1}Q^T (requires AA invertible).
  • Exponential: eA=QeΛQTe^A = Qe^{\Lambda}Q^T.
  • Logarithm: logA=QlogΛQT\log A = Q\log\Lambda Q^T (requires AA positive definite).

For A=(3113)A = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix}, eigenvalues 4,24, 2: A=Qdiag(2,2)QT\sqrt{A} = Q\operatorname{diag}(2, \sqrt{2})Q^T.

ExampleConnection to Singular Value Decomposition

For any m×nm \times n matrix AA, the matrices ATAA^TA and AATAA^T are symmetric positive semi-definite. By the spectral theorem:

ATA=VΣ2VTA^TA = V\Sigma^2 V^T, AAT=UΣ2UTAA^T = U\Sigma^2 U^T.

This leads to the SVD: A=UΣVTA = U\Sigma V^T, where σi=λi\sigma_i = \sqrt{\lambda_i} are the singular values.

ExampleObservables in quantum mechanics

In quantum mechanics, observables are represented by Hermitian operators on a Hilbert space. The spectral theorem guarantees:

  • Measurement outcomes (eigenvalues) are real numbers.
  • Eigenstates for different outcomes are orthogonal.
  • Any state can be expanded in the eigenbasis: ψ=cii|\psi\rangle = \sum c_i |i\rangle.

The probability of measuring eigenvalue λi\lambda_i is ci2=iψ2|c_i|^2 = |\langle i | \psi \rangle|^2.

ExampleTesting positive definiteness via eigenvalues

A symmetric matrix is positive definite iff all eigenvalues are positive (by the spectral theorem, Q(v)=vTAv=λi(qiTv)2Q(v) = v^T A v = \sum \lambda_i (q_i^T v)^2, which is positive for all v0v \neq 0 iff all λi>0\lambda_i > 0).

A=(2112)A = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}: eigenvalues 3,13, 1. Both positive, so AA is positive definite.

A=(1221)A = \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}: eigenvalues 3,13, -1. One negative, so AA is indefinite.


Spectral theorem for normal matrices

Theorem8.7Spectral theorem for normal matrices

A complex matrix AA is unitarily diagonalizable (A=UΛUA = U\Lambda U^*) if and only if AA is normal (AA=AAA^*A = AA^*).

Normal matrices include: Hermitian (A=AA^* = A), skew-Hermitian (A=AA^* = -A), unitary (AA=IA^*A = I), and their real analogues.

ExampleExamples of normal matrices
  • Symmetric: A=ATA = A^T. Real eigenvalues.
  • Skew-symmetric: A=ATA = -A^T. Purely imaginary eigenvalues.
  • Orthogonal: ATA=IA^TA = I. Eigenvalues on the unit circle (λ=1|\lambda| = 1).
  • Rotation: Rθ=(cosθsinθsinθcosθ)R_\theta = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}. Normal (it is orthogonal). Over C\mathbb{C}, unitarily diagonalizable with eigenvalues e±iθe^{\pm i\theta}.

Summary

RemarkThe spectral theorem as the central theorem

The Spectral Theorem is one of the most powerful results in linear algebra:

  • Symmetric matrices have real eigenvalues and orthogonal eigenvectors.
  • Every symmetric matrix has an orthonormal basis of eigenvectors -- orthogonal diagonalization always works.
  • The spectral decomposition A=λiPiA = \sum \lambda_i P_i represents AA as a linear combination of orthogonal projections.
  • It enables matrix functions (A\sqrt{A}, eAe^A, logA\log A) via the functional calculus.
  • It underlies PCA, SVD, quantum mechanics, and the classification of quadratic forms.
  • The generalization to normal operators on Hilbert spaces is the foundation of functional analysis and quantum theory.