Mathematics / Cholesky Decomposition
FREE TO EXPLORE
LABORATORY 13 · MATHEMATICS

Cholesky Decomposition theory

Understand cholesky decomposition: mathematical proofs, error recurrences, asymptotic rates and stability criteria.

Mathematical foundations of Cholesky Decomposition.

Cholesky decomposition—invented in 1910 by the French artillery officer and geodesist Major André-Louis Cholesky for the triangulation and mapping of Crete and published posthumously in the Bulletin Géodésique in 1924 by his fellow officer Commandant Benoit—is one of the most elegant and computationally efficient algorithms in all of applied mathematics. In engineering, physics, and data science, matrices describing physical equilibria, energy states, or statistical correlations are rarely arbitrary: they almost invariably possess the special mathematical structure of being symmetric positive-definite (SPD). A matrix A is symmetric if A = Aᵀ, and positive-definite if the quadratic energy functional xᵀAx is strictly positive for all non-zero vectors x. Major Cholesky discovered that any real SPD matrix can be factored uniquely into the product of a lower-triangular matrix L with strictly positive diagonal entries and its own transpose: A = LLᵀ. The mathematical implications of this symmetry are profound. First, because the upper factor is simply the transpose of the lower factor (U = Lᵀ), the algorithm only needs to compute and store half of the matrix elements, reducing memory consumption by 50%. Second, counting floating-point operations reveals that Cholesky factorization requires exactly ∑ 2(n − j)j ≈ (1/3)n³ FLOPs—exactly half the computational cost of general LU decomposition ((2/3)n³ FLOPs). Third, and most remarkably, Cholesky factorization is unconditionally numerically stable without any pivoting whatsoever. Because the diagonal entry satisfies a_{ii} = l_{ii}² + ∑ l_{ik}², every off-diagonal element is strictly bounded by |l_{ik}| ≤ √a_{ii}. Element growth is mathematically impossible, eliminating the need for row swaps or permutation registers. Today, Cholesky factorization is the engine driving structural finite element solvers, Kalman filtering in aerospace navigation, Gaussian process machine learning, and Portfolio Value-at-Risk modeling in quantitative finance. In this computational laboratory, students evaluate the Cholesky-Banachiewicz algorithm across SPD matrices from n = 10 to n = 60, verify half-cost operational efficiency, observe breakdown on indefinite matrices, and extract the asymptotic scaling constant C = 1/3 ≈ 0.333 via linear regression.

\text{FLOPs}(n) = C \cdot \frac{n^3}{1000} \implies C = \frac{1}{3} \approx 0.333

Viva voce questions & analytical theory

What is the mathematical definition of a symmetric positive-definite (SPD) matrix?

A real n×n matrix A is symmetric positive-definite if it satisfies two conditions: (1) Symmetry: A = Aᵀ; and (2) Positive-Definiteness: the quadratic form xᵀAx > 0 for all non-zero vectors x ∈ ℝⁿ, x ≠ 0. Equivalent characterizations include: all eigenvalues of A are strictly positive (λ_i > 0); all leading principal minors have strictly positive determinants (Sylvester's criterion); and A can be factored uniquely as A = LLᵀ with strictly positive diagonal entries.

Why is Cholesky decomposition unconditionally stable without pivoting?

In general Gaussian elimination, pivoting is required to prevent multipliers from exceeding 1. In Cholesky decomposition A = LLᵀ, the diagonal entries satisfy a_{ii} = ∑_{k=1}^i l_{ik}² = l_{ii}² + ∑_{k=1}^{i-1} l_{ik}². Because all terms are positive squares, every element of L satisfies |l_{ik}| ≤ √a_{ii}. This means that no element of the Cholesky factor can ever exceed the square root of the maximum diagonal entry of A. Pivot elements can never grow uncontrollably, guaranteeing unconditional numerical stability without any row or column interchanges.

Why does Cholesky decomposition require exactly half as many operations as LU decomposition?

Because A is symmetric (a_{ij} = a_{ji}), the upper-triangular factor U is simply the transpose of the lower-triangular factor L: U = Lᵀ. The algorithm only needs to compute elements on and below the diagonal (n(n+1)/2 entries rather than n²). Summing operations: ∑_{j=1}^n [∑_{i=j+1}^n 2(j − 1)] ≈ ∑_{j=1}^n 2(n − j)j = (1/3)n³ FLOPs. This is exactly half the (2/3)n³ cost of general LU decomposition.

What happens if Cholesky decomposition is attempted on a matrix that is not positive-definite?

If A is indefinite or negative-definite, at some step j the quantity d_j = a_{jj} − ∑_{k=1}^{j-1} l_{jk}² will be zero or negative. Evaluating l_{jj} = √d_j then requires taking the square root of a negative number, triggering a breakdown. In scientific computing, Cholesky decomposition is widely used as the most efficient numerical test for positive-definiteness: if the algorithm completes without encountering d_j ≤ 0, the matrix is guaranteed to be positive-definite.

What is the LDLᵀ variant of Cholesky factorization and why is it useful?

The LDLᵀ decomposition factors A into A = LDLᵀ, where L is unit lower-triangular (l_{ii} = 1.0) and D is a diagonal matrix containing d_i. This variant eliminates the need to compute n square roots, making it computationally faster on processors where square roots are expensive. Furthermore, LDLᵀ can be applied to symmetric indefinite matrices (using Bunch-Kaufman pivoting) where d_i can be negative.

Where does Cholesky decomposition appear most frequently in applied science and engineering?

Cholesky decomposition is omnipresent in: (1) Finite Element Analysis (FEA) and structural mechanics, where global stiffness matrices K are always SPD; (2) Statistics and Machine Learning, where covariance matrices Σ in Gaussian processes and Kalman filters are SPD; (3) Nonlinear Optimization, where Hessian matrices in Newton's method must be SPD; and (4) Monte Carlo simulation, where correlated random vectors are generated via x = μ + Lz.

How does Cholesky decomposition exploit sparsity in finite element stiffness matrices?

In physical simulations, node connections are local, making stiffness matrices sparse and banded. Cholesky factorization preserves the bandwidth: if a_{ij} = 0 for |i − j| > w (bandwidth w), then l_{ij} = 0 for i − j > w. Banded Cholesky reduces computational cost from O(n³) to O(n·w²), enabling the solution of millions of degrees of freedom in real time.

Algorithm precautions and stability rules

  • Verify that matrix A is strictly symmetric before execution: |a_{ij} − a_{ji}| < ε_mach · ‖A‖.
  • Check that all diagonal elements a_{ii} > 0 prior to factorization.
  • Guard against round-off causing near-zero arguments in square roots: if |d_j| < 10⁻¹⁴, treat as singular.
  • Store only the lower triangle of A to cut memory footprint in half.
  • For ill-conditioned covariance matrices, add a small Tikhonov ridge (jitter) A + εI before factoring.
  • Maintain 64-bit IEEE 754 precision to avoid false non-positive-definite breakdowns.

Theoretical limitations

  • Strictly restricted to symmetric positive-definite matrices; cannot be used for general unsymmetric or indefinite systems.
  • Requires computing n scalar square roots, which can be slower than pure arithmetic unless LDLᵀ is used.
  • Can break down prematurely if ill-conditioning causes small positive eigenvalues to round down to negative numbers.
↳
Connect theory to numerical computation.

The numerical simulation model executes Cholesky-Banachiewicz factorization on symmetric positive-definite matrices across dimensions n = [10, 20, 30, 40, 50, 60]. Normalized cubic coordinate: x = n³/1000 = [1.00, 8.00, 27.00, 64.00, 125.00, 216.00]. Theoretical Cholesky FLOP count: FLOPs(n) = (1/3)n³ = [0.333, 2.667, 9.000, 21.333, 41.667, 72.000] kFLOPs. Ordinary least-squares linear regression on these coordinates produces an empirical slope C = 0.33333 and Y-intercept b = 0.000 with coefficient of determination R² = 1.000000. The empirical efficiency constant C = 0.333 matches the analytical benchmark C = 1/3 = 0.33333 within 0.0000% deviation.