🔷 Cholesky Decomposition Calculator
Decompose a positive definite symmetric matrix into L·Lᵀ
Matrix must be symmetric (A = Aᵀ) and positive definite
How to Use This Calculator
Select Matrix Size
Choose 2×2, 3×3, or 4×4 for your symmetric matrix.
Enter Symmetric Matrix
Enter elements. The matrix is automatically kept symmetric (when you enter aᵢⱼ, aⱼᵢ is set automatically).
Calculate
Click to compute the Cholesky decomposition A = L·Lᵀ.
Verify
Check that L·Lᵀ equals your original matrix to verify correctness.
Formula
A = L·Lᵀ
Where L is a lower triangular matrix with positive diagonal entries
Algorithm:
- For i = 0 to n-1:
- For j = 0 to i: Calculate L[i][j] = (A[i][j] - Σ L[i][k]·L[j][k]) / L[j][j]
- For j = i: Calculate L[i][i] = √(A[i][i] - Σ L[i][k]²)
Requirements:
- Matrix A must be symmetric: A = Aᵀ
- Matrix A must be positive definite: all eigenvalues > 0
- All leading principal minors must be positive
Example: 2×2 Matrix
For A = [4 2; 2 3]
L = [2 0; 1 √2]
L·Lᵀ = [4 2; 2 3] = A ✓
About Cholesky Decomposition Calculator
The Cholesky Decomposition Calculator factors a positive definite symmetric matrix A into the product L·Lᵀ, where L is a lower triangular matrix. This decomposition is unique and more efficient than general LU decomposition for symmetric positive definite matrices.
When to Use This Calculator
- Numerical Linear Algebra: Solve systems Ax = b efficiently
- Statistics: Multivariate analysis, covariance matrices
- Optimization: Quadratic programming, least squares
- Simulation: Generate correlated random variables
- Machine Learning: Gaussian processes, kernel methods
- Engineering: Finite element method, structural analysis
Why Use Our Calculator?
- ✅ Complete Decomposition: Shows L and Lᵀ matrices
- ✅ Verification: Confirms L·Lᵀ = A
- ✅ Automatic Symmetry: Maintains matrix symmetry
- ✅ Error Checking: Validates positive definiteness
- ✅ Educational: Helps understand matrix factorization
- ✅ Free: No registration required
Key Concepts
- Positive Definite: All eigenvalues > 0, xᵀAx > 0 for all x ≠ 0
- Symmetric: A = Aᵀ (aᵢⱼ = aⱼᵢ for all i, j)
- Lower Triangular: L has zeros above the diagonal
- Uniqueness: If L has positive diagonal entries, decomposition is unique
- Efficiency: About half the operations of LU decomposition
Applications
Solving Linear Systems: For Ax = b, factor A = L·Lᵀ, then solve Ly = b and Lᵀx = y.
Monte Carlo Simulation: Generate X ~ N(0, Σ) by X = LZ where Z ~ N(0, I) and Σ = L·Lᵀ.
Frequently Asked Questions
What is Cholesky decomposition?
Cholesky decomposition factors a positive definite symmetric matrix A into A = L·Lᵀ where L is lower triangular. It's more efficient than LU decomposition for symmetric matrices.
Why does my matrix fail Cholesky decomposition?
The matrix must be both symmetric (A = Aᵀ) and positive definite (all eigenvalues > 0). If decomposition fails, check these conditions.
What's the difference between Cholesky and LU decomposition?
Cholesky only works for symmetric positive definite matrices and gives A = L·Lᵀ. LU works for any square matrix and gives A = L·U where L is lower triangular and U is upper triangular.
Is the decomposition unique?
Yes, if we require L to have positive diagonal entries. Otherwise, there are 2ⁿ possible decompositions (one for each choice of sign on diagonal).
How efficient is Cholesky compared to LU?
Cholesky requires about n³/3 operations, while LU requires about 2n³/3. So Cholesky is roughly twice as fast for symmetric positive definite matrices.
Can I use Cholesky for non-symmetric matrices?
No, Cholesky only works for symmetric positive definite matrices. For general matrices, use LU decomposition instead.