| |

12: Orthogonal Diagonalization and the Spectral Theorem

Symmetric matrices have a special property: they can always be diagonalized using orthogonal eigenvectors. This means you can write A=QDQTA = QDQ^T where QQ has orthonormal columns. The โ€œorthogonalโ€ part is crucial,instead of computing a full matrix inverse (O(n3)O(n^3)), you just transpose (O(n2)O(n^2)). Geometrically, symmetric matrices can only stretch along perpendicular axes, never rotate. This is the Spectral Theorem, and itโ€™s why symmetric matrices are the friendliest matrices in linear algebra.

The Spectral Theorem

(Statement)

Any symmetric matrix AA (meaning AT=AA^T = A) can be orthogonally diagonalized:

A=QDQTA = QDQ^T

where:

  • DD is diagonal (eigenvalues on the diagonal)
  • QQ is orthogonal (columns are orthonormal eigenvectors)

Key property: Qโˆ’1=QTQ^{-1} = Q^T, so you transpose instead of inverting.


(Why This Matters)

Computational savings:

  • Matrix inverse: O(n3)O(n^3) operations
  • Matrix transpose: O(n2)O(n^2) operations

When Qโˆ’1=QTQ^{-1} = Q^T, all the expensive inversion work disappears.

Geometric meaning: Rotate to the eigenvector basis (via QTQ^T), scale along axes (via DD), rotate back (via QQ).

Symmetric matrices cannot rotate,they only stretch along orthogonal axes. Thatโ€™s why eigenvectors are automatically perpendicular.


Symmetric Matrices Are Special

(Why Eigenvectors Are Orthogonal)

Theorem: If AA is symmetric, eigenvectors from different eigenvalues are orthogonal.

Proof:

Let Av1=ฮป1v1A\mathbf{v}_1 = \lambda_1\mathbf{v}_1 and Av2=ฮป2v2A\mathbf{v}_2 = \lambda_2\mathbf{v}_2 where ฮป1โ‰ ฮป2\lambda_1 \neq \lambda_2.

ฮป1(v1โ‹…v2)=(ฮป1v1)โ‹…v2=(Av1)โ‹…v2\lambda_1(\mathbf{v}_1 \cdot \mathbf{v}_2) = (\lambda_1\mathbf{v}_1) \cdot \mathbf{v}_2 = (A\mathbf{v}_1) \cdot \mathbf{v}_2

Since AA is symmetric, (Av1)โ‹…v2=v1โ‹…(Av2)(A\mathbf{v}_1) \cdot \mathbf{v}_2 = \mathbf{v}_1 \cdot (A\mathbf{v}_2):

=v1โ‹…(ฮป2v2)=ฮป2(v1โ‹…v2)= \mathbf{v}_1 \cdot (\lambda_2\mathbf{v}_2) = \lambda_2(\mathbf{v}_1 \cdot \mathbf{v}_2)

So:

ฮป1(v1โ‹…v2)=ฮป2(v1โ‹…v2)\lambda_1(\mathbf{v}_1 \cdot \mathbf{v}_2) = \lambda_2(\mathbf{v}_1 \cdot \mathbf{v}_2)

Since ฮป1โ‰ ฮป2\lambda_1 \neq \lambda_2, we must have v1โ‹…v2=0\mathbf{v}_1 \cdot \mathbf{v}_2 = 0. โœ“


(Repeated Eigenvalues)

When eigenvalues repeat, the corresponding eigenspace might have dimension > 1. But you can always choose an orthonormal basis within that eigenspace using Gram-Schmidt.

Key insight: For symmetric matrices, thereโ€™s always enough โ€œroomโ€ to find orthogonal eigenvectors, even when eigenvalues repeat. This is why the Spectral Theorem holds for all symmetric matrices.


(Symmetric Matrices Have Real Eigenvalues)

Theorem: All eigenvalues of a real symmetric matrix are real.

This is crucial,complex eigenvalues would break the geometric interpretation. The proof uses the fact that A=ATA = A^T forces eigenvalues to equal their complex conjugates, making them real.


Orthogonal Matrices

(Definition)

A matrix QQ is orthogonal if:

QTQ=IQ^TQ = I

Equivalently: Qโˆ’1=QTQ^{-1} = Q^T (transpose equals inverse).

In terms of columns: If Q=[q1โˆฃโ‹ฏโˆฃqn]Q = [\mathbf{q}_1 \mid \cdots \mid \mathbf{q}_n], then the columns form an orthonormal set:

qiโ‹…qj={1ifย i=j0ifย iโ‰ j\mathbf{q}_i \cdot \mathbf{q}_j = \begin{cases} 1 & \text{if } i = j \\ 0 & \text{if } i \neq j \end{cases}

(Properties of Orthogonal Matrices)

1. Preserve lengths:

โˆฅQvโˆฅ=โˆฅvโˆฅ\|Q\mathbf{v}\| = \|\mathbf{v}\|

Proof: โˆฅQvโˆฅ2=(Qv)T(Qv)=vTQTQv=vTv=โˆฅvโˆฅ2\|Q\mathbf{v}\|^2 = (Q\mathbf{v})^T(Q\mathbf{v}) = \mathbf{v}^TQ^TQ\mathbf{v} = \mathbf{v}^T\mathbf{v} = \|\mathbf{v}\|^2

2. Preserve angles:

(Qu)โ‹…(Qv)=uโ‹…v(Q\mathbf{u}) \cdot (Q\mathbf{v}) = \mathbf{u} \cdot \mathbf{v}

3. Preserve dot products: Same as preserving angles.

4. Determinant is ยฑ1\pm 1:

detโก(QTQ)=detโก(QT)detโก(Q)=(detโกQ)2=detโก(I)=1\det(Q^TQ) = \det(Q^T)\det(Q) = (\det Q)^2 = \det(I) = 1

So detโก(Q)=ยฑ1\det(Q) = \pm 1.


(Geometric Interpretation)

Orthogonal matrices represent:

  • Rotations: detโก(Q)=1\det(Q) = 1
  • Reflections: detโก(Q)=โˆ’1\det(Q) = -1
  • Combinations: Rotations and reflections preserve lengths and angles,thatโ€™s exactly what orthogonal matrices do

Key distinction: Transpose reverses rotations/reflections, but doesnโ€™t undo stretching. Thatโ€™s why QT=Qโˆ’1Q^T = Q^{-1} only works for orthogonal matrices (no stretching component).


The Spectral Decomposition

(The Formula)

For a symmetric matrix AA:

A=QDQT=โˆ‘i=1nฮปiqiqiTA = QDQ^T = \sum_{i=1}^{n} \lambda_i \mathbf{q}_i\mathbf{q}_i^T

where ฮปi\lambda_i are eigenvalues and qi\mathbf{q}_i are orthonormal eigenvectors.

Outer product form: Each term qiqiT\mathbf{q}_i\mathbf{q}_i^T is a rank-1 projection matrix. The spectral decomposition says:

A symmetric matrix is a weighted sum of projections onto its eigenvectors, with weights equal to the eigenvalues.


(Example: Spectral Decomposition)

A=[3113]A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix}

Find eigenvalues:

detโก(Aโˆ’ฮปI)=detโก[3โˆ’ฮป113โˆ’ฮป]=(3โˆ’ฮป)2โˆ’1=ฮป2โˆ’6ฮป+8\det(A - \lambda I) = \det\begin{bmatrix} 3-\lambda & 1 \\ 1 & 3-\lambda \end{bmatrix} = (3-\lambda)^2 - 1 = \lambda^2 - 6\lambda + 8 =(ฮปโˆ’4)(ฮปโˆ’2)=0= (\lambda - 4)(\lambda - 2) = 0

Eigenvalues: ฮป1=4\lambda_1 = 4, ฮป2=2\lambda_2 = 2.

Find eigenvectors:

For ฮป1=4\lambda_1 = 4:

(Aโˆ’4I)v=[โˆ’111โˆ’1]v=0(A - 4I)\mathbf{v} = \begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix}\mathbf{v} = \mathbf{0}

Eigenvector: v1=[11]\mathbf{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, normalize: q1=12[11]\mathbf{q}_1 = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ 1 \end{bmatrix}

For ฮป2=2\lambda_2 = 2:

(Aโˆ’2I)v=[1111]v=0(A - 2I)\mathbf{v} = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\mathbf{v} = \mathbf{0}

Eigenvector: v2=[1โˆ’1]\mathbf{v}_2 = \begin{bmatrix} 1 \\ -1 \end{bmatrix}, normalize: q2=12[1โˆ’1]\mathbf{q}_2 = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ -1 \end{bmatrix}

Build QQ and DD:

Q=12[111โˆ’1],D=[4002]Q = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}, \quad D = \begin{bmatrix} 4 & 0 \\ 0 & 2 \end{bmatrix}

Verify:

QDQT=12[111โˆ’1][4002]12[11โˆ’11]QDQ^T = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 4 & 0 \\ 0 & 2 \end{bmatrix}\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} =12[424โˆ’2][11โˆ’11]=12[6226]=[3113]=Aโœ“= \frac{1}{2}\begin{bmatrix} 4 & 2 \\ 4 & -2 \end{bmatrix}\begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} = \frac{1}{2}\begin{bmatrix} 6 & 2 \\ 2 & 6 \end{bmatrix} = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix} = A \quad โœ“

Quadratic Forms and Principal Axes

(Quadratic Forms)

A quadratic form is an expression:

Q(x)=xTAxQ(\mathbf{x}) = \mathbf{x}^TA\mathbf{x}

where AA is a symmetric matrix.

Example in R2\mathbb{R}^2:

Q(x,y)=ax2+2bxy+cy2=[xy][abbc][xy]Q(x, y) = ax^2 + 2bxy + cy^2 = \begin{bmatrix} x & y \end{bmatrix}\begin{bmatrix} a & b \\ b & c \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix}

(Geometric Interpretation: Ellipsoids)

The level set xTAx=1\mathbf{x}^TA\mathbf{x} = 1 defines a quadric surface:

  • Ellipsoid if all eigenvalues are positive
  • Hyperboloid if eigenvalues have mixed signs
  • Degenerate if any eigenvalue is zero

The eigenvectors of AA are the principal axes of this quadric,they point along the directions of maximum and minimum stretching.


(Diagonalizing Quadratic Forms)

Using A=QDQTA = QDQ^T, substitute x=Qy\mathbf{x} = Q\mathbf{y}:

xTAx=(Qy)TQDQT(Qy)=yTQTQDQTQy=yTDy\mathbf{x}^TA\mathbf{x} = (Q\mathbf{y})^TQD Q^T(Q\mathbf{y}) = \mathbf{y}^TQ^TQ D Q^TQ\mathbf{y} = \mathbf{y}^TD\mathbf{y} =ฮป1y12+ฮป2y22+โ‹ฏ+ฮปnyn2= \lambda_1 y_1^2 + \lambda_2 y_2^2 + \cdots + \lambda_n y_n^2

In the eigenvector basis, the quadratic form has no cross terms,itโ€™s just a sum of squares with weights ฮปi\lambda_i.

Example: The ellipse 3x2+2xy+3y2=13x^2 + 2xy + 3y^2 = 1 (from our earlier AA) becomes 4u2+2v2=14u^2 + 2v^2 = 1 in the eigenvector coordinates, where axes are rotated by 45ยฐ45ยฐ.


Why Transpose โ‰  Inverse (Usually)

For a general matrix AA:

ATโ‰ Aโˆ’1A^T \neq A^{-1}

Why? Transpose reverses the direction of a transformation (rotations/reflections) but doesnโ€™t undo stretching.

If AA stretches by factor ฯƒ\sigma in some direction, then:

  • ATA^T still stretches by ฯƒ\sigma in the corresponding direction (transpose doesnโ€™t change singular values)
  • Aโˆ’1A^{-1} compresses by factor 1/ฯƒ1/\sigma (actually inverts the stretching)

When theyโ€™re equal: AT=Aโˆ’1A^T = A^{-1} precisely when AA has no stretching component,when itโ€™s a pure rotation or reflection. These are the orthogonal matrices.


Connection to SVD

(The Setup)

For a non-square matrix AA (mร—nm \times n), you canโ€™t do eigendecomposition directly. But the matrix ATAA^TA (nร—nn \times n) is symmetric, so it has orthonormal eigenvectors.

These eigenvectors of ATAA^TA are the right singular vectors of AA,the optimal input directions.


(Singular Values from ATAA^TA)

For an eigenvector v\mathbf{v} of ATAA^TA with eigenvalue ฮป\lambda:

โˆฅAvโˆฅ2=(Av)T(Av)=vTATAv=vT(ฮปv)=ฮปโˆฅvโˆฅ2\|A\mathbf{v}\|^2 = (A\mathbf{v})^T(A\mathbf{v}) = \mathbf{v}^TA^TA\mathbf{v} = \mathbf{v}^T(\lambda\mathbf{v}) = \lambda\|\mathbf{v}\|^2

If v\mathbf{v} is normalized (โˆฅvโˆฅ=1\|\mathbf{v}\| = 1):

โˆฅAvโˆฅ=ฮป\|A\mathbf{v}\| = \sqrt{\lambda}

The singular values ฯƒi\sigma_i are defined as:

ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i}

where ฮปi\lambda_i are the eigenvalues of ATAA^TA.


(SVD Mechanics)

To build the Singular Value Decomposition A=UฮฃVTA = U\Sigma V^T:

  1. Compute ATAA^TA (symmetric, nร—nn \times n)
  2. Find eigenvalues ฮป1,โ€ฆ,ฮปr\lambda_1, \ldots, \lambda_r (rank rr)
  3. Compute singular values: ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i}
  4. Find eigenvectors of ATAA^TA โ†’ normalize โ†’ columns of VV
  5. Apply AA to eigenvectors: ui=1ฯƒiAvi\mathbf{u}_i = \frac{1}{\sigma_i}A\mathbf{v}_i โ†’ columns of UU
  6. Assemble: A=UฮฃVTA = U\Sigma V^T

Key formulas:

uโ‹…v=uTv(dotย productย asย matrixย multiplication)\mathbf{u} \cdot \mathbf{v} = \mathbf{u}^T\mathbf{v} \quad \text{(dot product as matrix multiplication)} (Av)T=vTAT(transposeย distributesย inย reverse)(A\mathbf{v})^T = \mathbf{v}^TA^T \quad \text{(transpose distributes in reverse)} โˆฅAvโˆฅ2=vTATAv(lengthย viaย ATA)\|A\mathbf{v}\|^2 = \mathbf{v}^TA^TA\mathbf{v} \quad \text{(length via } A^TA \text{)}

Special Matrices

(Involutions: A2=IA^2 = I)

Matrices satisfying A2=IA^2 = I are called involutions,applying them twice returns to the original.

Examples:

  • Reflections across a line or plane
  • Swap matrices (permutations that swap pairs)

For symmetric involutions, eigenvalues are ยฑ1\pm 1.


(Finite Order: An=IA^n = I)

Matrices where An=IA^n = I for some integer nn have finite order.

Examples:

  • Rotation by 360ยฐ/n360ยฐ/n (order nn)
  • Cyclic permutations

Eigenvalues are nn-th roots of unity: e2ฯ€ik/ne^{2\pi i k / n} for k=0,1,โ€ฆ,nโˆ’1k = 0, 1, \ldots, n-1.


Applications

(Principal Component Analysis)

PCA finds the directions of maximum variance in data. Given a covariance matrix CC (symmetric!), the eigenvectors are the principal components, and eigenvalues measure variance along each component.

The spectral decomposition directly gives you the optimal low-rank approximation.


(Vibrational Modes)

In physics, symmetric matrices appear as stiffness or inertia matrices. Eigenvectors represent vibrational modes (standing waves), and eigenvalues give frequencies.


(Stability Analysis)

For the system dxdt=Ax\frac{d\mathbf{x}}{dt} = A\mathbf{x} where AA is symmetric:

  • Negative eigenvalues โ†’ stable (exponential decay)
  • Positive eigenvalues โ†’ unstable (exponential growth)
  • Zero eigenvalue โ†’ neutral stability

The orthogonal eigenvectors decouple the system into independent modes.


Summary: Why Symmetric Matrices Are Perfect

Symmetric matrices are the gold standard because:

  1. Always diagonalizable (Spectral Theorem)
  2. Real eigenvalues (no complex numbers)
  3. Orthogonal eigenvectors (automatic perpendicularity)
  4. Efficient inversion (QTQ^T instead of Qโˆ’1Q^{-1})
  5. Geometric clarity (stretch along perpendicular axes, no rotation)
  6. Numerical stability (orthogonal transformations preserve conditioning)

The Spectral Theorem says symmetric matrices live in the simplest possible world: theyโ€™re diagonal in the right coordinate system, and finding that system is straightforward. Whenever you see A=ATA = A^T, you know the geometry is clean, the computation is efficient, and the eigenvectors will behave.