4.3 The Real Spectral Theorem: Why Symmetric Covariance Matrices Have Orthogonal Eigenvectors

Why are the principal components of a dataset guaranteed to be mutually perpendicular (orthogonal)? After all, we saw in Chapter 3 that a general asymmetric matrix like [1102]\begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix} has non-orthogonal eigenvectors. What makes a covariance matrix special?

The answer is symmetry: CT=CC^T = C. The Real Spectral Theorem proves that every real symmetric matrix has exclusively real eigenvalues and admits an orthonormal basis of eigenvectors. Better yet, the proof of orthogonality takes just four lines of elementary dot-product algebra.

In this Article

1. The Self-Adjoint Property: Moving C Across a Dot Product

For any two vectors u,v∈Rd\mathbf{u}, \mathbf{v} \in \mathbb{R}^d and any matrix AA, the dot product between AuA\mathbf{u} and v\mathbf{v} satisfies (Au)⋅v=(Au)Tv=uTATv(A\mathbf{u}) \cdot \mathbf{v} = (A\mathbf{u})^T \mathbf{v} = \mathbf{u}^T A^T \mathbf{v}. When CC is symmetric (CT=CC^T = C), CC can move freely from one side of the dot product to the other:

(Cu)Tv=uTCTv=uT(Cv)(C\mathbf{u})^T \mathbf{v} = \mathbf{u}^T C^T \mathbf{v} = \mathbf{u}^T (C\mathbf{v})

2. The Four-Line Proof That Distinct Eigenvectors Are Orthogonal

Suppose u1\mathbf{u}_1 and u2\mathbf{u}_2 are eigenvectors of a symmetric matrix CC with distinct eigenvalues λ1≠λ2\lambda_1 \neq \lambda_2, so Cu1=λ1u1C\mathbf{u}_1 = \lambda_1 \mathbf{u}_1 and Cu2=λ2u2C\mathbf{u}_2 = \lambda_2 \mathbf{u}_2. Let us compute u1TCu2\mathbf{u}_1^T C \mathbf{u}_2 in two ways:

  1. Act with CC on the right: u1T(Cu2)=u1T(λ2u2)=λ2(u1Tu2)\mathbf{u}_1^T (C \mathbf{u}_2) = \mathbf{u}_1^T (\lambda_2 \mathbf{u}_2) = \lambda_2 (\mathbf{u}_1^T \mathbf{u}_2).
  2. Act with CC on the left (using CT=CC^T = C): (Cu1)Tu2=(λ1u1)Tu2=λ1(u1Tu2)(C\mathbf{u}_1)^T \mathbf{u}_2 = (\lambda_1 \mathbf{u}_1)^T \mathbf{u}_2 = \lambda_1 (\mathbf{u}_1^T \mathbf{u}_2).
  3. Subtract the two equal expressions: (λ1−λ2)(u1Tu2)=0(\lambda_1 - \lambda_2)(\mathbf{u}_1^T \mathbf{u}_2) = 0.
  4. Conclude orthogonality: Since λ1≠λ2\lambda_1 \neq \lambda_2, we cannot have λ1−λ2=0\lambda_1 - \lambda_2 = 0, which forces u1Tu2=0\mathbf{u}_1^T \mathbf{u}_2 = 0!

3. Spectral Decomposition C = QΛQᵀ: Rotate, Stretch, Rotate Back

Stacking the orthonormal eigenvectors u1,…,ud\mathbf{u}_1, \dots, \mathbf{u}_d as columns of an orthogonal matrix QQ (so QTQ=QQT=IQ^T Q = Q Q^T = I) and placing λ1,…,λd\lambda_1, \dots, \lambda_d on the diagonal of Λ\Lambda yields the Spectral Decomposition:

C=QΛQT=∑j=1dλjujujTC = Q \Lambda Q^T = \sum_{j=1}^d \lambda_j \mathbf{u}_j \mathbf{u}_j^T

   Action of C = Q * Lambda * Q^T on any vector v:
   [ Input v ] ---( Q^T )---> [ Rotate into Eigen-Axes ] ---( Lambda )---> [ Pure Axis Stretch ] ---( Q )---> [ Rotate Back ]

4. Worked Spectral Factorization Example

Take C=[5222]C = \begin{bmatrix} 5 & 2 \\ 2 & 2 \end{bmatrix}. From Chapter 3, its eigenvalues are λ1=6\lambda_1 = 6 and λ2=1\lambda_2 = 1 with eigenvectors v1=(2,1)T\mathbf{v}_1 = (2, 1)^T and v2=(−1,2)T\mathbf{v}_2 = (-1, 2)^T.

  1. Verify Orthogonality: v1Tv2=(2)(−1)+(1)(2)=0\mathbf{v}_1^T \mathbf{v}_2 = (2)(-1) + (1)(2) = 0.
  2. Normalize to Unit Vectors: u1=15[21]\mathbf{u}_1 = \frac{1}{\sqrt{5}}\begin{bmatrix} 2 \\ 1 \end{bmatrix} and u2=15[−12]\mathbf{u}_2 = \frac{1}{\sqrt{5}}\begin{bmatrix} -1 \\ 2 \end{bmatrix}.
  3. Verify Rank-1 Sum C=λ1u1u1T+λ2u2u2TC = \lambda_1 \mathbf{u}_1 \mathbf{u}_1^T + \lambda_2 \mathbf{u}_2 \mathbf{u}_2^T:

    6⋅15[4221]+1⋅15[1−2−24]=15[25101010]=[5222]=C6 \cdot \frac{1}{5}\begin{bmatrix} 4 & 2 \\ 2 & 1 \end{bmatrix} + 1 \cdot \frac{1}{5}\begin{bmatrix} 1 & -2 \\ -2 & 4 \end{bmatrix} = \frac{1}{5}\begin{bmatrix} 25 & 10 \\ 10 & 10 \end{bmatrix} = \begin{bmatrix} 5 & 2 \\ 2 & 2 \end{bmatrix} = C

5. Active Recall Check and Key Takeaways

Quick Check: Test Your Understanding

Question: What happens if a symmetric covariance matrix has a repeated eigenvalue, say λ1=λ2=4\lambda_1 = \lambda_2 = 4 (which happens when a 2D cloud is perfectly circular)?

Answer: Every nonzero vector in that 2D eigenspace is an eigenvector with variance 44, so we are free to pick any two perpendicular unit vectors (e.g., via Gram-Schmidt or standard axes) to form an orthonormal basis.

  • Symmetry Guarantees Orthogonality: CT=CC^T = C forces eigenvectors of distinct eigenvalues to be perpendicular.
  • Decorrelation: Rotating data into the eigenbasis Z=XQZ = XQ diagonalizes the covariance matrix to Λ\Lambda, making the principal component scores completely uncorrelated.
  • Canonical References: See Wikipedia Reference on the Real Spectral Theorem.

Take a Quiz Based on This Article

Test your understanding with AI-generated questions tailored to this content

Adaptive Learning with SynLearn

Explore this article through guided practice that adapts to your answers

✓Step-by-step concepts & lessons
✓Active recall & adaptive feedback
✓Personalized spaced repetition
spectral-theorem
symmetric-matrices
orthogonal-eigenvectors
orthogonal-diagonalization
pca
linear-algebra