Skip to content
FiftyCalc Free calculators for all 50 states

Cholesky Decomposition Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter the diagonal and the lower part of a symmetric 3 × 3 matrix (the upper part is the mirror image).

Result

Sample figures

L₁₁ = √a₁₁—

L₂₁ = a₂₁ ÷ L₁₁ —

  • L₂₂ = √(a₂₂ − L₂₁²)—
  • L₃₁ = a₃₁ ÷ L₁₁—
  • L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂—
  • L₃₃ = √(a₃₃ − L₃₁² − L₃₂²)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Cholesky Decomposition Calculator

a₁₁: enter a number. Prefilled example: 4.

a₂₁ = a₁₂: enter a number. Prefilled example: 12.

a₂₂: enter a number. Prefilled example: 37.

a₃₁ = a₁₃: enter a number. Prefilled example: -16.

a₃₂ = a₂₃: enter a number. Prefilled example: -43.

a₃₃: enter a number. Prefilled example: 98.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. a₁₁: enter a number.
  2. a₂₁ = a₁₂: enter a number.
  3. a₂₂: enter a number.
  4. a₃₁ = a₁₃: enter a number.
  5. a₃₂ = a₂₃: enter a number.
  6. a₃₃: enter a number.
  7. Read the result: L₁₁ = √a₁₁; the panel also shows L₂₁ = a₂₁ ÷ L₁₁, L₂₂ = √(a₂₂ − L₂₁²), L₃₁ = a₃₁ ÷ L₁₁, L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂ and L₃₃ = √(a₃₃ − L₃₁² − L₃₂²).

How this calculator works

The Cholesky decomposition writes a symmetric positive-definite matrix as A = L Lᵀ, with L lower triangular and a positive diagonal. Column by column (Cholesky–Banachiewicz): L₁₁ = √a₁₁, L₂₁ = a₂₁ ÷ L₁₁, L₃₁ = a₃₁ ÷ L₁₁, L₂₂ = √(a₂₂ − L₂₁²), L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂, L₃₃ = √(a₃₃ − L₃₁² − L₃₂²).

If a square root would be of a negative number or 0, the matrix is not positive definite and the entries show a dash. The other entries of L (above the diagonal) are 0.

The formula

  1. L11=a11
Symbols used in the formula
SymbolMeaning
a11a₁₁
L11L₁₁ = √a₁₁

Worked example

a₁₁4
a₂₁ = a₁₂12
a₂₂37
a₃₁ = a₁₃-16
a₃₂ = a₂₃-43
a₃₃98
L₂₁ = a₂₁ ÷ L₁₁6
L₂₂ = √(a₂₂ − L₂₁²)1
L₃₁ = a₃₁ ÷ L₁₁-8
L₃₂ = (a₃₂ − L₃₁L₂₁) ÷ L₂₂5
L₃₃ = √(a₃₃ − L₃₁² − L₃₂²)3
  1. L11=4=2

L₁₁ = √a₁₁ 2

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is the Cholesky factor of [[4, 12, −16], [12, 37, −43], [−16, −43, 98]]?

L = [[2, 0, 0], [6, 1, 0], [−8, 5, 3]].

What is it used for?

Solving linear systems with symmetric matrices about twice as fast as LU, least squares, and generating correlated random numbers.

Related calculators