9.510 min read
Gram and Covariance Matrices
Two symmetric PSD matrices arise naturally from any matrix : the Gram matrix (size ) and the covariance matrix (size ). Both are symmetric and PSD.
If , then — the spectral decomposition of , with eigenvalues . Similarly, , also with eigenvalues . So and share the same nonzero eigenvalues (both equal ), but have different sizes and different eigenvectors.
Formal View
Theorem 9.2 — Gram and Covariance via SVD
Let . Then:
- — spectral decomposition of
- — spectral decomposition of
- The nonzero eigenvalues of both and are .
and always share the same nonzero eigenvalues (the squared singular values of ), even though they may have different sizes.
Interactive Visualization
Transpose Visualizer
Why This Matters
Gram and covariance matrices bridge SVD to the spectral theorem — they let you compute SVD using eigendecomposition.
- In statistics, the covariance matrix is the foundation of PCA.
- Kernel methods: the Gram matrix encodes pairwise similarities.
- Structural mechanics: the stiffness matrix is a Gram matrix.
Quiz
Question 1
The nonzero eigenvalues of and are always equal.
Question 2
If has singular values , what are the eigenvalues of ?
Common Mistakes
- Thinking and have the same eigenvalues — they share the NONZERO eigenvalues, but the sizes differ.
- Confusing eigenvectors of (columns of ) with those of (columns of ).