Cholesky Decomposition Formulas
For a real symmetric positive-definite matrix A, the lower-triangular Cholesky factor has positive diagonal entries and satisfies A = LLᵀ.
Diagonal entries
lⱼⱼ = √(aⱼⱼ − Σₖ<ⱼ lⱼₖ²)The radicand must be strictly positive at every column.
Entries below the diagonal
lᵢⱼ = (aᵢⱼ − Σₖ<ⱼ lᵢₖlⱼₖ) / lⱼⱼCalculate these entries for i > j; entries above the diagonal remain zero.
Verification
A − LLᵀ ≈ 0The calculator reports the largest reconstruction difference relative to the largest input entry.
How to Use the Cholesky Calculator
- Select a matrix size from 2×2 through 8×8.
- Enter the complete symmetric matrix, paste it, or fill the lower triangle and select Mirror lower → upper.
- Select Calculate Cholesky. If the matrix is positive definite, the page displays L, Lᵀ, and each entry formula.
- Check the reconstruction error, then copy the summary or download the matrices as CSV.
Worked 3×3 Cholesky Example
The loaded example is A = [[4, 12, −16], [12, 37, −43], [−16, −43, 98]]. Its exact lower factor is L = [[2, 0, 0], [6, 1, 0], [−8, 5, 3]].
First column
l₁₁ = √4 = 2, then l₂₁ = 12/2 = 6 and l₃₁ = −16/2 = −8.
Remaining diagonal
l₂₂ = √(37 − 6²) = 1 and l₃₃ = √(98 − (−8)² − 5²) = 3.
Check
Multiplying the displayed L by Lᵀ returns the original A; any tiny reported residual comes from floating-point arithmetic.
When Cholesky Decomposition Fails
The matrix is not symmetric
For example, a₁₂ and a₂₁ must match. Use the mirror control when you have entered only one triangle.
A diagonal radicand is zero
A positive-semidefinite matrix can produce a zero pivot. Standard nonsingular Cholesky factorization requires every pivot to be positive.
A diagonal radicand is negative
This identifies an indefinite matrix at that leading principal block. Changing display precision cannot make it positive definite.
Cholesky Decomposition FAQs
What is a Cholesky decomposition?
For a real symmetric positive-definite matrix A, it is the factorization A = LLᵀ, where L is lower triangular and its diagonal entries are positive.
Which matrices can this calculator decompose?
It accepts real square matrices from 2×2 through 8×8, but a result exists only when the matrix is symmetric and positive definite at double-precision working accuracy.
Is the Cholesky factor unique?
Yes. The requirement that every diagonal entry of L be positive selects one unique factor for a positive-definite matrix.
Why does a positive-semidefinite matrix fail?
Semidefinite matrices can have a zero diagonal radicand, making the next division unavailable. Pivoted or rank-revealing variants are different algorithms from the standard Cholesky factorization shown here.
How is Cholesky different from LU decomposition?
Cholesky uses symmetry and positive definiteness to store one triangular factor and its transpose. General LU decomposition uses separate lower and upper factors and may need row pivoting.
What does the reconstruction error tell me?
It compares LLᵀ with A after scaling by the largest absolute input entry. A value near machine precision indicates close reconstruction, but it is not a full condition-number estimate.
Are my matrix entries private?
Yes. Calculation, clipboard text, and CSV creation happen in your browser. This page does not send or save the matrix values you enter.
Calculation Notes and Reference
Last reviewed: August 5, 2026 by the Starlight Tools editorial team.
The factorization convention matches the lower-triangular form documented by LAPACK DPOTRF2. This browser implementation uses the entry-by-entry unblocked algorithm rather than LAPACK's optimized routines.
Inputs use JavaScript double-precision arithmetic and must be zero or have magnitude from 10⁻¹⁰⁰ through 10¹⁰⁰. A matrix extremely close to the positive-definite boundary can be classified differently by higher-precision software.
