Normal Equations Always Give a PSD Matrix
For any matrix (any , any , any entries), the matrix is always positive semidefinite. The proof is elegant: for any vector , A squared norm is always non-negative. So for all , making PSD.
When is actually positive definite (strictly)? Exactly when has full column rank — i.e., the null space of contains only the zero vector. If only for , then , so the PSD condition strengthens to PD.
This is why the normal equations have a unique solution when has full column rank — the coefficient matrix is PD (hence invertible).
Formal View
Proof of PSD: . MATLAB: `A = M' * M` always gives PSD matrix.
Interactive Visualization
Matrix-Vector Multiplication
Why This Matters
The fact that is always PSD is why least squares always works — the normal equations always have a solution, and have a unique solution when has full column rank.
- Linear regression: is PSD, PD when columns are linearly independent — guaranteeing unique least squares solution.
- Kernel methods: the Gram matrix of any kernel function is PSD — this is the mathematical foundation for support vector machines.
- Covariance estimation: sample covariance is always PSD.
Quiz
For any matrix , the matrix is positive semidefinite.
When is positive definite (rather than just PSD)?
Common Mistakes
- Thinking is PD in general — it is only PD when has full column rank. Tall matrices with dependent columns give PSD (not PD) .
- Forgetting that being PSD does not mean it is invertible — you need full column rank for invertibility.