What this calculator does
Cholesky decomposition breaks a symmetric, positive-definite matrix A down into L·Lᵀ, where L is a lower-triangular matrix (zeros above the diagonal) and Lᵀ is its transpose. It's a faster, more numerically stable alternative to general matrix factorisation methods specifically because it takes advantage of the matrix being symmetric, and it's used throughout statistics, optimisation and simulation wherever a symmetric positive-definite matrix (like a covariance matrix) needs to be factored.
This calculator handles the 3×3 case directly: enter the six distinct values of a symmetric matrix (since a₁₂ = a₂₁ and so on), and it works through the standard recursion formulas step by step to return the resulting L matrix.
The formula
Each entry of L is found in order, top-left to bottom-right: L₁₁ = √a₁₁, then L₂₁ = a₂₁/L₁₁ and L₃₁ = a₃₁/L₁₁ from the first column, then L₂₂ = √(a₂₂ − L₂₁²), then L₃₂ = (a₃₂ − L₃₁·L₂₁)/L₂₂, and finally L₃₃ = √(a₃₃ − L₃₁² − L₃₂²).
| Term | Meaning |
|---|---|
| Symmetric matrix | A square matrix where the entry at row i, column j equals the entry at row j, column i (meaning a₁₂ = a₂₁, and so on). |
| Positive-definite | A matrix property required for Cholesky decomposition to exist: informally, every value that would need a square root along the way must come out positive. |
| Lower triangular | A matrix with every entry above the main diagonal equal to zero. |
The inputs explained
| Field | What to enter |
|---|---|
| a₁₁ | The top-left entry of the matrix. |
| a₁₂ = a₂₁ | The entry at row 1, column 2. Since the matrix is symmetric, this is also the entry at row 2, column 1. |
| a₁₃ = a₃₁ | The entry at row 1, column 3 (also the entry at row 3, column 1). |
| a₂₂ | The entry at row 2, column 2. |
| a₂₃ = a₃₂ | The entry at row 2, column 3 (also the entry at row 3, column 2). |
| a₃₃ | The entry at row 3, column 3. |
When to use it
Checking a decomposition by hand
Working through a Cholesky decomposition manually for a course or textbook problem, then checking the result against this calculator.
Preparing a covariance matrix for simulation
Cholesky decomposition of a covariance matrix is a standard step in generating correlated random samples, since L can be used to transform independent random values into ones with the desired correlation structure.
Confirming a matrix is positive-definite
If a square root along the way would need a negative number, the matrix isn't positive-definite and no real Cholesky decomposition exists. This calculator flags that case directly instead of returning an invalid result.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
What is the Cholesky decomposition of a classic textbook example matrix?
A well-known example matrix used in many linear algebra textbooks to illustrate the method.
| a₃₃ (matrix entry) | L (lower triangular) | L row 2 | L row 3 |
|---|---|---|---|
| 98 | row1: 2.000, 0, 0 | 6.000, 1.000, 0 | -8.000, 5.000, 3.000 |
Questions
What happens if the matrix isn't positive-definite?
One of the square roots in the recursion would need to be taken of a negative number, which has no real result. This calculator checks for that at each step and reports that the matrix isn't positive-definite rather than showing an invalid number.
Why only 3×3 matrices?
The Cholesky recursion works for any size of symmetric matrix, but the number of distinct entries and formulas grows quickly with size. 3×3 covers the most common textbook and small-scale use cases while keeping the inputs manageable.
What does L·Lᵀ mean?
Lᵀ is L with its rows and columns swapped (its transpose). Multiplying L by its own transpose reconstructs the original symmetric matrix A: that's the defining property of a correct Cholesky decomposition.
How is this different from LU decomposition?
LU decomposition works for any square matrix and produces two different triangular matrices, L and U. Cholesky decomposition only works for symmetric positive-definite matrices, but in exchange produces a single L that does the job of both, and computes faster.
For a related matrix operation, see the adjugate matrix calculator.