Cholesky Decomposition Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the diagonal and the lower part of a symmetric 3 × 3 matrix (the upper part is the mirror image).
Result
L₁₁ = √a₁₁
L₂₁ = a₂₁ ÷ L₁₁
- L₂₂ = √(a₂₂ − L₂₁²)
- L₃₁ = a₃₁ ÷ L₁₁
- L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂
- L₃₃ = √(a₃₃ − L₃₁² − L₃₂²)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- a₁₁: enter a number.
- a₂₁ = a₁₂: enter a number.
- a₂₂: enter a number.
- a₃₁ = a₁₃: enter a number.
- a₃₂ = a₂₃: enter a number.
- a₃₃: enter a number.
- Read the result: L₁₁ = √a₁₁; the panel also shows L₂₁ = a₂₁ ÷ L₁₁, L₂₂ = √(a₂₂ − L₂₁²), L₃₁ = a₃₁ ÷ L₁₁, L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂ and L₃₃ = √(a₃₃ − L₃₁² − L₃₂²).
How this calculator works
The Cholesky decomposition writes a symmetric positive-definite matrix as A = L Lᵀ, with L lower triangular and a positive diagonal. Column by column (Cholesky–Banachiewicz): L₁₁ = √a₁₁, L₂₁ = a₂₁ ÷ L₁₁, L₃₁ = a₃₁ ÷ L₁₁, L₂₂ = √(a₂₂ − L₂₁²), L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂, L₃₃ = √(a₃₃ − L₃₁² − L₃₂²).
If a square root would be of a negative number or 0, the matrix is not positive definite and the entries show a dash. The other entries of L (above the diagonal) are 0.
The formula
| Symbol | Meaning |
|---|---|
| a₁₁ | |
| L₁₁ = √a₁₁ |
Worked example
| a₁₁ | 4 |
|---|---|
| a₂₁ = a₁₂ | 12 |
| a₂₂ | 37 |
| a₃₁ = a₁₃ | -16 |
| a₃₂ = a₂₃ | -43 |
| a₃₃ | 98 |
| L₂₁ = a₂₁ ÷ L₁₁ | 6 |
|---|---|
| L₂₂ = √(a₂₂ − L₂₁²) | 1 |
| L₃₁ = a₃₁ ÷ L₁₁ | -8 |
| L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂ | 5 |
| L₃₃ = √(a₃₃ − L₃₁² − L₃₂²) | 3 |
L₁₁ = √a₁₁ 2
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the Cholesky factor of [[4, 12, −16], [12, 37, −43], [−16, −43, 98]]?
L = [[2, 0, 0], [6, 1, 0], [−8, 5, 3]].
What is it used for?
Solving linear systems with symmetric matrices about twice as fast as LU, least squares, and generating correlated random numbers.