How Cholesky Decomposition works
Cholesky decomposition factors a symmetric, positive-definite matrix A into the product of a lower triangular matrix L and its transpose: A = L · Lᵀ. Every diagonal entry of L is positive, and this factorization exists and is unique for exactly the matrices that are symmetric with every leading principal minor positive — the definition of "positive definite."
Formula and method
The Cholesky-Banachiewicz algorithm builds L one entry at a time from the symmetric matrix A = (aᵢⱼ), using only entries already computed:
- Diagonal entries: Lᵢᵢ = √( aᵢᵢ − Σ (Lᵢₖ)² for k < i )
- Below-diagonal entries: Lᵢⱼ = ( aᵢⱼ − Σ Lᵢₖ·Lⱼₖ for k < j ) / Lⱼⱼ, for i > j
For the 3×3 case used here, this reduces to six explicit steps: L11 = √A11, L21 = A12/L11, L31 = A13/L11, L22 = √(A22 − L21²), L32 = (A23 − L31·L21)/L22, and L33 = √(A33 − L31² − L32²). If any quantity under a square root is zero or negative, A is not positive definite and no real Cholesky factor exists.
Common sources of error
- Non-symmetric input: this calculator only asks for the six independent entries and assumes A12 = A21, A13 = A31, and A23 = A32 — Cholesky decomposition is undefined for a matrix that is not symmetric.
- Not positive definite: a negative or zero value under a square root — often traced to a small or negative diagonal entry — means the matrix fails the positive-definite requirement.
- Rounding intermediate steps: because each row of L depends on the rows above it, rounding early compounds error — carry full precision through all six steps.
Checking your result
Multiply L by its transpose (L · Lᵀ) and confirm you recover the original matrix A. As a fast cross-check, the product of the diagonal entries of L, squared, equals the determinant of A: det(A) = (L11 × L22 × L33)². Also confirm every diagonal entry of L is positive — a zero, negative, or complex diagonal entry signals invalid input.
Applications
Cholesky decomposition solves symmetric linear systems and least-squares normal equations faster than general-purpose methods, generates correlated random variables in Monte Carlo simulation, and underlies efficient determinant and matrix-inversion routines used throughout statistics, finance, and engineering software.