Cholesky decomposition is about twice as fast as LU decomposition and numerically very stable. It is used to solve least squares problems, in Kalman filters and Monte Carlo simulation (to generate correlated random numbers), and to test whether a matrix is positive definite.
How to use the Cholesky Decomposition Calculator
- Choose the matrix size – the matching grid of fields appears.
- Enter the entries row by row (a₁ b₁ c₁ is the first row, a₂ b₂ c₂ the second, and so on).
- Read the result; integer matrices give exact fractions.
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Columns of L are built one at a time from the formulas above. If a diagonal value would be the square root of a non-positive number, the matrix is not positive definite and no Cholesky factor exists.
Formula
b_jj = √(a_jj − Σₖ b_jk²), b_ij = (a_ij − Σₖ b_ik b_jk) / b_jj
Worked example
Inputs — Matrix size: 3 × 3; a₁: 4; b₁: 1; c₁: 2; a₂: 1; b₂: 3; c₂: 0; a₃: 2; b₃: 0; c₃: 5.
Results — Result = A = L·Lᵀ; Lower triangular L = ⎡ 2 0 0 ⎤
⎢ 0.5 1.65831 0 ⎥
⎣ 1 −0.301511 1.97714 ⎦; Transpose Lᵀ = ⎡ 2 0.5 1 ⎤
⎢ 0 1.65831 −0.301511 ⎥
⎣ 0 0 1.97714 ⎦.
Key terms
- Positive definite
- xᵀAx > 0 for every non-zero x.
Frequently asked questions
Which matrices have a Cholesky decomposition?
Symmetric (Hermitian) positive-definite matrices.
How do I know if a matrix is positive definite?
If the Cholesky algorithm succeeds, it is.
Is the decomposition unique?
Yes, with positive diagonal entries in L.
How is it used to solve Ax = b?
Solve Ly = b, then Lᵀx = y, both by substitution.