Cholesky Decomposition Calculator with Steps

Factor a real symmetric positive-definite matrix into L and Lᵀ. See every entry calculation and verify A = LLᵀ. Everything runs locally in your browser.

Enter a Symmetric Matrix A

Enter decimals or scientific notation. Use arrow keys to move between cells. Display rounding never changes the calculation.

Separate entries with spaces, commas, or tabs and rows with new lines. Paste a square matrix with 2–8 rows.

Cholesky Factors

Enter a valid matrix to calculate A = L·Lᵀ.

L — lower triangular

Lᵀ — transpose

Matrix test
Smallest diagonal of L
Relative |A − LLᵀ|

Advertisement

Step-by-Step Cholesky Working

Column j starts with its positive diagonal square root, then divides the remaining adjusted entries by that new diagonal value.

Calculate a matrix to see every entry of L built column by column.

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ᵀ ≈ 0

The calculator reports the largest reconstruction difference relative to the largest input entry.

Convention: This page returns the unique lower-triangular factor whose diagonal is positive. It first checks that the full input is symmetric within a small floating-point tolerance, then uses every pair's average when the difference is only roundoff-sized.

How to Use the Cholesky Calculator

  1. Select a matrix size from 2×2 through 8×8.
  2. Enter the complete symmetric matrix, paste it, or fill the lower triangle and select Mirror lower → upper.
  3. Select Calculate Cholesky. If the matrix is positive definite, the page displays L, Lᵀ, and each entry formula.
  4. 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.

Explore more tools