Cholesky Decomposition
Matrix Decompositions
The Cholesky decomposition factors a symmetric positive definite (SPD) matrix A as A = LL^top, where L is lower triangular with positive diagonal entries. It is essentially the 'square root' of an SPD matrix โ analogous to writing a positive number as x = (sqrt{x})^2.
Cholesky: for symmetric positive definite ; is lower triangular.
The Cholesky decomposition factors a symmetric positive definite (SPD) matrix as , where is lower triangular with positive diagonal entries. It is essentially the 'square root' of an SPD matrix โ analogous to writing a positive number as .
A matrix is positive definite if for every non-zero . Equivalently, all eigenvalues are strictly positive. SPD matrices are ubiquitous: covariance matrices, Gram matrices (when has full column rank), and Hessians at strict minima are all SPD. Cholesky is the fastest, most numerically stable factorization available for this class.
The algorithm is specialized Gaussian elimination that exploits symmetry. For each row , compute the diagonal entry and the sub-diagonal entries via similar formulas. The process fails iff some diagonal element becomes non-positive โ a clean test for positive definiteness: a matrix is SPD iff Cholesky succeeds without complex square roots.
Cholesky solves in two triangular steps: first (forward substitution), then (backward substitution). Each step costs ; the decomposition itself is , half the cost of LU. That is why Cholesky is the default when solving normal equations for linear regression (since is SPD).
Beyond solving, Cholesky has distinctive ML uses. In Bayesian methods and Gaussian processes, it lets us sample from multivariate Gaussians: if and , then โ a single matrix-vector multiply generates correlated samples. It also computes log-determinants cheaply: , needed in likelihoods and variational lower bounds.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.