Category

Cholesky Decomposition Calculator — Factor a Symmetric Positive-Definite Matrix into L·Lᵀ (2×2 to 4×4)

Compute the Cholesky decomposition (A = L·Lᵀ) of any 2×2, 3×3, or 4×4 symmetric positive-definite matrix. Instantly get the lower triangular factor L, its transpose, and the determinant. Supports metric, US imperial, and 12 world currencies including USD and Russian Ruble.

0 calculations

Calculation Parameters

The matrix must be symmetric and positive definite.

Enter Parameters

Fill in the form on the left and click "Calculate"

What is a matrix decomposition?

In linear algebra, a matrix decomposition (or matrix factorization) is the factorization of a matrix into a product of matrices. Just as you can factor the number 16 into a product such as 4×4 or 2×8, you can factor a matrix A into a product of matrices with special structure. Factorizing a matrix is much harder than factoring a number, so mathematicians have discovered several methods. The most famous are the LU decomposition, the QR decomposition, the singular value decomposition (SVD), and the Cholesky decomposition. Which method you use depends on the problem you are trying to solve.

What is the Cholesky decomposition?

The Cholesky decomposition (or Cholesky factorization) factors a matrix A into the product of a lower triangular matrix L and its transpose:

A = L · LT

For a matrix A to be Cholesky-decomposable it must satisfy some criteria:

  • A must be symmetric, i.e. AT = A.
  • By extension, A must be square.
  • A must be positive definite — all of its eigenvalues must be strictly positive.

If A fails any of these conditions, no suitable lower triangular L exists, and the calculator reports an error. The Cholesky decomposition is named after the French military officer and mathematician André-Louis Cholesky, who developed it for solving least-squares problems in geodesy.

How to calculate the Cholesky decomposition?

The entries of L are found with the Cholesky–Banachiewicz formulas, computed row by row from top to bottom and left to right:

  • Diagonal entries: Ljj = √( Ajj − Σk<j Ljk² )
  • Below-diagonal entries (for i > j): Lij = ( Aij − Σk<j Lik·Ljk ) / Ljj

If any diagonal term under the square root becomes zero or negative, the matrix is not positive definite and the decomposition does not exist. Once L is known, the determinant of A follows immediately: det(A) = (L11 · L22 · ⋯ · Lnn)².

How to use the Cholesky decomposition calculator?

  1. Choose the matrix size: 2×2, 3×3, or 4×4.
  2. Select units (optional): abstract numbers, metric (meters), US imperial (feet), or currency (choose from 12 world currencies including USD and the Russian Ruble).
  3. Enter the matrix entries. Remember that the matrix must be symmetric — you can use the “Mirror upper → lower” button to copy the upper triangle into the lower one automatically.
  4. Click Decompose to compute L, LT and the determinant instantly.
  5. Use the Share button to save a link to your calculation or print the result.

Example Cholesky decomposition of a 3×3 matrix

Consider the symmetric positive-definite matrix:

A = [  4   12  -16 ]
    [ 12   37  -43 ]
    [-16  -43   98 ]

Applying the Cholesky–Banachiewicz formulas:

  • L₁₁ = √4 = 2
  • L₂₁ = 12 / 2 = 6,   L₃₁ = −16 / 2 = −8
  • L₂₂ = √(37 − 6²) = √1 = 1
  • L₃₂ = (−43 − (−8)(6)) / 1 = 5
  • L₃₃ = √(98 − ((−8)² + 5²)) = √9 = 3

So the lower triangular factor is:

L = [  2   0   0 ]
    [  6   1   0 ]
    [ -8   5   3 ]

You can verify that L · LT = A, and det(A) = (2 · 1 · 3)² = 36.

What are the applications of the Cholesky decomposition?

  • Solving linear systems Ax = b: When A is symmetric positive-definite, solve Ly = b (forward substitution), then LTx = y (back substitution) — about twice as fast as LU.
  • Least-squares problems: The normal equations ATAx = ATb involve a symmetric positive-definite matrix, ideal for Cholesky.
  • Monte Carlo simulation: Generating correlated random variables from a covariance matrix uses its Cholesky factor.
  • Kalman filters and optimization: Efficient and numerically stable factorization of covariance and Hessian matrices.
  • Determinant and positive-definiteness test: A successful Cholesky decomposition proves a matrix is positive definite.

Metric vs. Imperial vs. Currency

In pure linear algebra the matrix entries are dimensionless numbers. This calculator lets you tag columns with a unit label for visual clarity:

  • Metric system — entries labeled in meters (m).
  • US Imperial system — entries labeled in feet (ft).
  • Currency — choose from 12 world currencies: US Dollar ($), Russian Ruble (₽), Euro (€), British Pound (£), and more. The Ruble appears second in the list as one of the most-used world currencies.

Note: the unit label is cosmetic — the Cholesky decomposition is a purely algebraic operation and does not depend on units.

FAQs

Is the Cholesky decomposition unique?
Yes. For a symmetric positive-definite matrix there is a unique lower triangular L with strictly positive diagonal entries such that A = L·LT.
What if my matrix is not positive definite?
Then no real Cholesky factor exists — a diagonal term under the square root becomes zero or negative — and the calculator reports an error. Try the LU decomposition instead.
Does the matrix have to be symmetric?
Yes. If AT ≠ A the Cholesky decomposition is undefined. Use the “Mirror upper → lower” button to make your input symmetric quickly.
How is the Cholesky decomposition related to LU?
It is a special case of the LU decomposition for symmetric positive-definite matrices, where U = LT. It needs roughly half the operations of a general LU factorization.

Calculation History

Loading...