Skip to content

The spectral theorem for symmetric matrices

8 min read

Short answer

If AA is a real symmetric matrix (A=ATA=A^T), then it has real eigenvalues, eigenvectors for different eigenvalues are orthogonal, and A=QΛQTA=Q\Lambda Q^T with QQ orthogonal and Λ\Lambda diagonal. A symmetric matrix is a pure stretch along perpendicular axes, with no twisting.

Diagramλ = 3λ = 1
For A = [[2,1],[1,2]] the eigen-directions (1,1) and (1,−1) are perpendicular, and A stretches by 3 along the first and by 1 along the second.

Why eigenvectors are perpendicular

Suppose Av1=λ1v1A\mathbf{v}_1=\lambda_1\mathbf{v}_1 and Av2=λ2v2A\mathbf{v}_2=\lambda_2\mathbf{v}_2 with λ1≠λ2\lambda_1\neq\lambda_2. Because AA is symmetric, (Av1)⋅v2=v1⋅(Av2)(A\mathbf{v}_1)\cdot\mathbf{v}_2=\mathbf{v}_1\cdot(A\mathbf{v}_2). Then

λ1 v1⋅v2=λ2 v1⋅v2 ⟹ (λ1−λ2) v1⋅v2=0.\lambda_1\,\mathbf{v}_1\cdot\mathbf{v}_2=\lambda_2\,\mathbf{v}_1\cdot\mathbf{v}_2\ \Longrightarrow\ (\lambda_1-\lambda_2)\,\mathbf{v}_1\cdot\mathbf{v}_2=0.

Since λ1≠λ2\lambda_1\neq\lambda_2, we get v1⋅v2=0\mathbf{v}_1\cdot\mathbf{v}_2=0. Symmetry is exactly what lets AA move from one side of a dot product to the other.

Why the eigenvalues are real

A rotation has complex eigenvalues because it twists. A symmetric matrix cannot twist. Formally, if Av=λvA\mathbf{v}=\lambda\mathbf{v} with v\mathbf{v} possibly complex, compute vˉTAv\bar{\mathbf{v}}^TA\mathbf{v} two ways. It equals λ vˉTv\lambda\,\bar{\mathbf{v}}^T\mathbf{v} and also λ‾ vˉTv\overline{\lambda}\,\bar{\mathbf{v}}^T\mathbf{v} (using A=ATA=A^T with real entries). Since vˉTv>0\bar{\mathbf{v}}^T\mathbf{v}>0, we get λ=λ‾\lambda=\overline{\lambda}, so λ\lambda is real.

The remaining step, that there are enough eigenvectors even for repeated eigenvalues, comes from peeling off one eigenvector at a time and repeating inside its perpendicular complement.

The decomposition and why it matters

Normalizing the eigenvectors into columns of QQ gives A=QΛQT=∑iλi qiqiTA=Q\Lambda Q^T=\sum_i\lambda_i\,\mathbf{q}_i\mathbf{q}_i^T: a sum of rank-one projections, each scaled by its eigenvalue.

  • Quadratic forms. In eigen-coordinates xTAx=∑λiyi2\mathbf{x}^TA\mathbf{x}=\sum\lambda_iy_i^2, so the signs of the eigenvalues decide whether a critical point is a minimum, maximum or saddle.
  • PCA. The covariance matrix is symmetric, so its eigenvectors are perpendicular directions of variance, ordered by eigenvalue.
  • Easy inverse. A−1=QΛ−1QTA^{-1}=Q\Lambda^{-1}Q^T because Q−1=QTQ^{-1}=Q^T.

Worked example

Write A=(2112)A=\begin{pmatrix}2&1\\1&2\end{pmatrix} in the form ∑λiqiqiT\sum\lambda_i\mathbf{q}_i\mathbf{q}_i^T.

det⁡(A−λI)=(2−λ)2−1=0\det(A-\lambda I)=(2-\lambda)^2-1=0 gives λ=3\lambda=3 and λ=1\lambda=1. Eigenvectors: (1,1)(1,1) for 33 and (1,−1)(1,-1) for 11, already perpendicular. Normalize: q1=12(1,1)\mathbf{q}_1=\tfrac{1}{\sqrt2}(1,1), q2=12(1,−1)\mathbf{q}_2=\tfrac{1}{\sqrt2}(1,-1).

3 q1q1T+1 q2q2T=32(1111)+12(1−1−11)=(2112). ✓3\,\mathbf{q}_1\mathbf{q}_1^T+1\,\mathbf{q}_2\mathbf{q}_2^T=\tfrac32\begin{pmatrix}1&1\\1&1\end{pmatrix}+\tfrac12\begin{pmatrix}1&-1\\-1&1\end{pmatrix}=\begin{pmatrix}2&1\\1&2\end{pmatrix}.\ \checkmark

Try it yourself

For A=(1221)A=\begin{pmatrix}1&2\\2&1\end{pmatrix} find the eigenvalues and eigenvectors and confirm the eigenvectors are perpendicular.

Show the answer

(1−λ)2−4=0(1-\lambda)^2-4=0 gives λ=3\lambda=3 with eigenvector (1,1)(1,1), and λ=−1\lambda=-1 with eigenvector (1,−1)(1,-1). Their dot product is 1−1=01-1=0, so they are perpendicular.

Keep going with practice

Vidi's diagonalization lessons note when the orthogonal shortcut for symmetric matrices applies.