Cholesky Decomposition
Cholesky decomposition is a numerical linear algebra factorization that expresses a symmetric positive-definite matrix as the product of a lower-triangular matrix and its transpose.
Cholesky decomposition (or Cholesky factorization) is a direct matrix factorization algorithm in computation and algorithms and numerical linear algebra that decomposes a real symmetric positive-definite matrix A ∈ Rn×n into the product of a unique lower-triangular matrix L with positive diagonal entries and its transpose LT (or, for a complex Hermitian positive-definite matrix, its conjugate transpose L*). Devised around 1910 by French military geodesist and artillery officer André-Louis Cholesky to solve normal equations arising from the triangulation survey of France and Crete—and published posthumously by fellow officer Commandant Benoît in 1924—the factorization requires n3/3 floating-point operations (FLOPs), half the arithmetic cost and storage of general Gaussian elimination (LU decomposition). Because positive-definiteness bounds the growth of intermediate entries, Cholesky factorization is backward stable in IEEE floating-point arithmetic without row or column pivoting, serving as the standard direct solver for normal equations in Linear Regression, covariance inversions in Kalman Filter updates, Gaussian process log-marginal likelihoods, and correlated Monte Carlo simulation.
Mathematical Statement and Existence Theorem
Symmetric Positive-Definite Matrices and Uniqueness
A real n × n matrix A is symmetric positive-definite (SPD) if AT = A and the quadratic form satisfies xTAx > 0 for all non-zero x ∈ Rn \ {0}. Equivalently, all n eigenvalues of A are real and positive (λi > 0), and all n leading principal minors det(A1:k, 1:k) for k = 1, ..., n are positive (Sylvester's criterion).
Theorem (Cholesky Factorization): Every real symmetric positive-definite matrix A ∈ Rn×n admits a unique factorization:
A = L LT (or in upper-triangular form A = RT R, where R = LT)
such that L = [Lij] is lower triangular (Lij = 0 for j > i) with positive diagonal entries (Lii > 0). The determinant and log-determinant follow directly from the diagonal of L:
det(A) = ( ∏i=1n Lii )2, and log det(A) = 2 ∑i=1n log(Lii)
Evaluating log det(A) via the sum of logarithms avoids floating-point overflow or underflow on high-dimensional covariance matrices.
Square-Root-Free LDLT Variant
Factoring out the diagonal matrix D0 = diag(L11, ..., Lnn) so L = L̃D0 (where L̃ is unit lower triangular with L̃ii = 1) and setting D = D02 yields the LDLT decomposition A = L̃DL̃T, which avoids all n square-root evaluations and extends to symmetric indefinite systems.
Algorithmic Derivation and Computational Complexity
Cholesky–Banachiewicz and Cholesky–Crout Recurrences
Equating entries Aij = ∑k=1min(i,j) Lik Ljk for i ≥ j yields explicit recurrences for the diagonal (i = j) and subdiagonal (i > j) entries:
- Diagonal Entry (j = i): Ljj = √( Ajj − ∑k=1j−1 Ljk2 )
- Off-Diagonal Entry (i > j): Lij = ( 1 / Ljj ) ( Aij − ∑k=1j−1 Lik Ljk )
Because A is symmetric, only the lower triangle (n(n + 1)/2 floats) is stored, and L can overwrite A in-place via row-by-row (Cholesky–Banachiewicz), column-by-column (Cholesky–Crout), or blocked Level-3 BLAS (LAPACK DPOTRF) traversal.
Operation Count (n3/3 FLOPs) and Numerical Stability
Summing the inner-product operations across columns j = 1, ..., n gives:
Total FLOPs = ∑j=1n 2(j − 1)(n − j + 1) + O(n2) = (1/3) n3 + O(n2)
compared to (2/3)n3 FLOPs for LU decomposition and (4/3)n3 FLOPs for Householder QR. Moreover, because Aii = ∑k=1i Lik2, every entry of L is bounded by |Lik| ≤ √Aii. James H. Wilkinson proved that this bound makes Cholesky decomposition backward stable without pivoting: the computed factor L̂ satisfies L̂L̂T = A + ΔA with ‖ΔA‖2/‖A‖2 = O(n εmach).
| Matrix Factorization | Matrix Class | Leading FLOPs | Pivoting Required? | Primary Scientific Computing Role |
|---|---|---|---|---|
| Cholesky (A = LLT) | Symmetric positive-definite (n × n) | (1/3) n3 | No | SPD linear systems, covariance sampling, GP regression |
| LDLT (A = L̃DL̃T) | Symmetric positive-definite / indefinite | (1/3) n3 | Bunch–Kaufman if indefinite | Finite-element structural stiffness matrices |
| LU (PA = LU) | General nonsingular square (n × n) | (2/3) n3 | Partial row pivoting | General dense linear equations Ax = b |
| Householder QR (A = QR) | Rectangular (m × n, m ≥ n) | 2*mn*2 − (2/3)n3 | Optional column pivoting | Ill-conditioned least squares |
| SVD (A = UΣVT) | Arbitrary rectangular (m × n) | 4*mn*2 + O(n3) | Orthogonal | Rank-deficient pseudoinverse, Principal Component Analysis |
Linear System Solving and Probabilistic Applications
Forward and Backward Substitution
Once A = LLT is factored, solving Ax = b reduces to two n2-FLOP triangular sweeps:
- Forward Substitution (Ly = b): yi = (bi − ∑k=1i−1 Lik yk) / Lii for i = 1, ..., n.
- Backward Substitution (LTx = y): xi = (yi − ∑k=i+1n Lki xk) / Lii for i = n, ..., 1.
For large sparse SPD matrices, Incomplete Cholesky factorization (IC(0)) discards fill-in outside the sparsity pattern of A to precondition the Conjugate Gradient Method.
Correlated Monte Carlo Sampling and Gaussian Processes
In computational statistics, Cholesky factorization enables two fundamental operations on multivariate normal distributions N(μ, Σ):
- Correlated Normal Sampling: Given z ∼ N(0, In) and Σ = LLT, the transformation x = μ + Lz has covariance Cov(x) = L E[zzT] LT = Σ.
- Gaussian Process (GP) Marginal Likelihood: Evaluating log p(y | X) = −(1/2)yTK−1y − (1/2) log det(K) − (n/2) log(2π) factors K = LLT, solves Lα̃ = y so yTK−1y = ‖α̃‖22, and sums ∑i=1n log Lii.
Frequently Asked Questions
Why is Cholesky decomposition twice as fast as LU decomposition?
When A is symmetric (AT = A), the upper factor is the transpose of the lower factor (U = LT), halving the number of triangular entries to compute and cutting the arithmetic count from (2/3)n3 to (1/3)n3.
What happens if Cholesky decomposition is applied to a nearly singular covariance matrix?
Roundoff error on zero or near-zero eigenvalues can produce a negative radicand Ajj − ∑ Ljk2 < 0; numerical libraries add a diagonal Tikhonov jitter A ← A + εI (ε ≈ 10−8) or apply pivoted rank-revealing Cholesky factorization.
Why should one solve L(LTx) = b rather than computing A−1 explicitly?
Forming A−1 explicitly costs an extra (2/3)n3 FLOPs and amplifies forward roundoff error by roughly κ(A) compared to solving L(LTx) = b via forward and backward substitution in 2n2 FLOPs.
References
- Benoît, C. (1924). Note sur une méthode de résolution des équations normales provenant de l'application de la méthode des moindres carrés à un système d'équations linéaires en nombre inférieur à celui des inconnues (Procédé du Commandant Cholesky). Bulletin Géodésique, 2(1), 67–77. https://doi.org/10.1007/BF03031308
- Wilkinson, J. H. (1968). Apriori error analysis of algebraic processes. Proceedings of the International Congress of Mathematicians, 629–640. https://doi.org/10.1137/1.9781611971446
- Higham, N. J. (1990). Analysis of the Cholesky decomposition of a semi-definite matrix. In M. G. Cox & S. Hammarling (Eds.), Reliable Numerical Computation (pp. 161–185). Oxford University Press. https://doi.org/10.1093/oso/9780198535645.003.0010
- Davis, T. A. (2006). Direct Methods for Sparse Linear Systems. Society for Industrial and Applied Mathematics (SIAM). https://doi.org/10.1137/1.9780898718881
- Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations (4th ed.). Johns Hopkins University Press. https://doi.org/10.56021/9781421407944