Cholesky decomposition writes a matrix as A = L·Lᵀ, where L is lower triangular — a square root for matrices. Press Cholesky(A) and open the steps to see L built one column at a time.
When it applies
The matrix must be symmetric and positive definite. Symmetric means A = Aᵀ; positive definite means every eigenvalue is greater than zero. That sounds restrictive, but the matrices this describes are everywhere: covariance matrices, Gram matrices, the normal equations of least squares, and the stiffness matrices of finite element analysis are all symmetric positive definite by construction.
Where LU decomposition produces two triangular factors, Cholesky produces one and derives the other by transposing it. That halves both the arithmetic and the storage, and it needs no pivoting to stay stable — which is why solvers test for symmetry first and reach for Cholesky whenever they can.
Worked example
| 4 | 2 |
| 2 | 5 |
| 2 | 0 |
| 1 | 2 |
| 2 | 1 |
| 0 | 2 |
Each diagonal entry of L is a square root — here √4 = 2 and √(5 − 1²) = 2 — which is why the method needs the quantity under every root to stay positive. That requirement is exactly positive definiteness, and it turns the algorithm into a test: if the decomposition completes, the matrix is positive definite; if it hits a non-positive value under a root, it is not.
Common mistakes
- Applying it to a non-symmetric matrix. A = L·Lᵀ is symmetric by construction, so a non-symmetric input has no such factorisation. Use LU.
- Assuming symmetry is enough. A symmetric matrix with a negative eigenvalue is indefinite and will fail mid-algorithm.
- Expecting integer factors. The diagonal involves square roots, so L is usually irrational even when A is not.
- Confusing L·Lᵀ with Lᵀ·L. The order matters; both are symmetric but they are not the same matrix.