Path: blob/main/notebooks/published/cholesky_decomposition/cholesky_decomposition.ipynb
51 views
Cholesky Decomposition
Introduction
The Cholesky decomposition is a factorization of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose. Named after André-Louis Cholesky, this decomposition is approximately twice as efficient as LU decomposition for solving systems of linear equations.
Mathematical Foundation
Definition
For a symmetric positive-definite matrix , the Cholesky decomposition yields:
where is a lower triangular matrix with positive diagonal entries.
Positive Definiteness
A symmetric matrix is positive definite if and only if:
Equivalently, all eigenvalues of are strictly positive.
Algorithm
The elements of are computed as:
Computational Complexity
The Cholesky decomposition requires floating-point operations, compared to for LU decomposition.
Applications
Solving linear systems: via forward and back substitution
Monte Carlo simulations: Generating correlated random variables
Optimization: Computing the inverse of covariance matrices
Machine Learning: Gaussian processes and Kalman filters
Implementation
Creating a Positive Definite Matrix
We construct a symmetric positive-definite matrix using where is any matrix with full column rank.
Manual Cholesky Decomposition
We implement the Cholesky-Banachiewicz algorithm from scratch:
Verification
We verify our implementation against SciPy's optimized routine:
Solving Linear Systems
To solve , we use the decomposition :
Solve by forward substitution
Solve by back substitution
Performance Comparison
We compare the computational efficiency of Cholesky vs LU decomposition for solving linear systems:
Visualization
We visualize the matrix structure and performance comparison:
Numerical Stability Analysis
We examine the condition number and numerical stability:
Application: Generating Correlated Random Variables
The Cholesky decomposition is essential for generating correlated random samples from a multivariate Gaussian distribution :
where and .
Conclusion
The Cholesky decomposition provides:
Computational efficiency: Approximately 2× faster than LU for symmetric positive-definite systems
Numerical stability: Well-conditioned for positive-definite matrices
Memory efficiency: Only the lower triangular part needs storage
Wide applicability: Essential in statistics, optimization, and scientific computing
The relationship implies that solving via Cholesky is as stable as the problem allows.