🧮
🧮 Math & statistics

Cholesky Decomposition Calculator (A = L·Lᵀ for symmetric positive-definite matrices)

Results update as you type.

Your numbers

Understanding the Cholesky decomposition calculator — concept and principle

This calculator factors a symmetric positive-definite matrix A as A = L·Lᵀ, with L lower triangular and a positive diagonal. It shows L, its transpose, the diagonal, the determinant and whether the matrix is positive definite. Use it for linear algebra homework, solving least-squares problems or simulating correlated random variables.

Cholesky decompositionA = L · LᵀA412−161237−43−16−4398=L200610−853·Lᵀ26−8015003l₃₃ = √(98 − 64 − 25) = √9 = 3det A = (2 × 1 × 3)²36 · positive definite
Each diagonal entry is a square root; all were positive, so A is positive definite.

How it is calculated

Column by column, for j = 1 … n:

l_jj = √(a_jj − Σ_(k<j) l_jk²)

l_ij = (a_ij − Σ_(k<j) l_ik l_jk) ÷ l_jj, for rows i below j

det(A) = (l₁₁ × l₂₂ × … × l_nn)²

The principle

A symmetric matrix is positive definite when xᵀAx > 0 for every non-zero vector x; covariance matrices and the normal equations of least squares are typical examples. Such a matrix behaves like a positive number, and just as a positive number has a square root, A has a "square root" L with A = L·Lᵀ. The factorization is unique when the diagonal of L is positive. Because it uses the symmetry, Cholesky takes about half the work of an LU factorization, and failure of a square root is itself a test for positive definiteness.

Worked example

Default input: A = [4 12 −16; 12 37 −43; −16 −43 98].

  1. l₁₁ = √4 = 2; l₂₁ = 12 ÷ 2 = 6; l₃₁ = −16 ÷ 2 = −8.
  2. l₂₂ = √(37 − 6²) = √1 = 1; l₃₂ = (−43 − (−8)(6)) ÷ 1 = 5.
  3. l₃₃ = √(98 − (−8)² − 5²) = √9 = 3.
  4. L = [2 0 0; 6 1 0; −8 5 3] and Lᵀ = [2 6 −8; 0 1 5; 0 0 3]; diagonal 2, 1, 3.
  5. det(A) = (2 × 1 × 3)² = 36; positive definite: yes — every pivot was positive.

How to read the result

To solve A x = b, solve L y = b by forward substitution and then Lᵀ x = y by back substitution. To simulate correlated normal variables with covariance A, multiply a vector of independent standard normals by L. A failed decomposition means the matrix is not positive definite, often because of rounding or an inconsistent covariance estimate.

Common mistakes

Keep in mind: Nearly singular matrices can produce large rounding errors. Check the result by multiplying L·Lᵀ.

Frequently asked questions

What is a Cholesky decomposition used for?

Solving symmetric positive-definite systems, least squares and simulating correlated variables.

How do I know if a matrix is positive definite?

If the Cholesky decomposition succeeds with all positive pivots, it is.

Is the decomposition unique?

Yes, when the diagonal entries of L are required to be positive.

Sources: E. W. Weisstein, "Cholesky Decomposition", Wolfram MathWorld

Checked 9 Nov 2026. Wolfram MathWorld, “Cholesky Decomposition” (a symmetric positive-definite matrix factors as A = UᵀU with U upper triangular with strictly positive diagonal entries; here L = Uᵀ). The column formulas for l(jj) and l(ij) are the standard Cholesky algorithm.

🧮 All math & statistics tools →🌍 Calculators by country →