Why symmetric matrices are the nice ones
A general matrix can have complex eigenvalues and eigenvectors that are not perpendicular. A real symmetric matrix, , cannot. The spectral theorem says that such an has only real eigenvalues, that eigenvectors for different eigenvalues are orthogonal, and that you can pick an orthonormal basis of eigenvectors. Collecting them as the columns of gives with and diagonal. Every covariance matrix is symmetric, so this theorem is the reason PCA works.
The sum form writes as a stack of simple rank-one pieces, each stretching one orthogonal direction. It makes powers trivial: , and any function of just acts on the eigenvalues. A symmetric matrix is positive semidefinite, for all , exactly when all its eigenvalues are non-negative, and positive definite when they are all strictly positive. For a covariance matrix the quadratic form is the variance of the portfolio with weights , so it can never be negative, and it is at least times the squared length of .
- Spectral theorem: a real symmetric has real eigenvalues and orthonormal eigenvectors, .
- Definiteness: positive semidefinite means all eigenvalues , positive definite all .
- Powers and functions: ; apply any function to the eigenvalues only.
A matrix assembled by hand or from pairwise estimates over different samples can be symmetric and still have a negative eigenvalue. It then claims that some portfolio has negative variance, and an optimiser will happily exploit that. Checking that the smallest eigenvalue of a symmetric matrix is non-negative (with a tiny tolerance for rounding) is the standard test, and clipping the negative eigenvalues is the standard repair.
Lab · what's graded
7 tasks · 100 pts- Facts about symmetric matrices15 pts
- The larger eigenvalue15 pts
- A unit eigenvector10 pts
- A power through the eigendecomposition20 pts
- A valid covariance matrix15 pts
- A floor on portfolio variance15 pts
- Why PCA works10 pts