88. Cholesky Decomposition

Every symmetric positive-definite matrix 𝐴 has a unique factorization:

𝐴=𝐿𝐿𝑇

where 𝐿 is lower triangular with positive diagonal entries.

The Cholesky decomposition is the symmetric square root of a positive-definite matrix — like writing a positive number 𝑎 as 𝑎𝑎.

88.1. Existence and uniqueness

Cholesky exists iff 𝐴 is:

  1. Symmetric: 𝐴𝑇=𝐴
  2. Positive definite: 𝑥𝑇𝐴𝑥>0 for all 𝑥𝟎

If either fails, Cholesky fails. For positive semi-definite 𝐴 a related decomposition exists but is non-unique.

For symmetric indefinite 𝐴, use the 𝐿𝐷𝐿𝑇 variant (𝐷 diagonal with arbitrary signs).

88.2. Algorithm (forward construction)

Compute 𝐿 column by column, 𝑗=1,,𝑛:

𝐿𝑗𝑗=𝐴𝑗𝑗𝑘=1𝑗1𝐿𝑗𝑘2𝐿𝑖𝑗=1𝐿𝑗𝑗(𝐴𝑖𝑗𝑘=1𝑗1𝐿𝑖𝑘𝐿𝑗𝑘),for𝑖>𝑗

Cost: about 𝑛33half of LU decomposition (we exploit symmetry).

Example
𝐴=[41216123743164398]𝐿=[200610853]

Verify: 𝐿𝐿𝑇=𝐴. ✓

88.3. Why use Cholesky

  1. Solving 𝐴𝑥=𝑏: split into 𝐿𝑦=𝑏 (forward substitution) then 𝐿𝑇𝑥=𝑦 (backward substitution). Twice as fast as LU for symmetric positive-definite 𝐴.

  2. Testing positive-definiteness: an attempt to compute Cholesky fails (negative argument to sqrt, or division by zero) iff 𝐴 is not positive definite. Cheap test.

  3. Sampling from multivariate Gaussian: if Σ=𝐿𝐿𝑇 is the covariance matrix and 𝑧𝒩︀(𝟎,𝐼) (standard normal), then 𝑥=𝐿𝑧 is 𝒩︀(𝟎,Σ).

  4. Linear least squares (alternative to QR): the normal equations 𝐴𝑇𝐴𝑥=𝐴𝑇𝑏 have a symmetric positive-definite system matrix 𝐴𝑇𝐴; Cholesky solves it.

  5. Determinant: det(𝐴)=𝐿𝑖𝑖2 — much cheaper than expanding directly.

88.4. Relation to LU and SVD

For symmetric positive-definite 𝐴, Cholesky is the fastest and most stable choice.

88.5. See also