SOLVETUTORMATH SOLVER

Instrument MI-01-077 · Mathematics

Cholesky Decomposition Calculator

Every symmetric, positive-definite matrix has a square root shaped like a triangle. Give this sheet a, b, and d, and it returns the L that satisfies L·Lᵀ = A.

Instrument MI-01-077
Sheet 1 OF 1
Rev A
Verified
Type 05 — Linear Algebra SER. 2026-01077

L: row 1, col 1

2.00000000

L₁₁ = √a

1.00000000 L: row 2, col 1
2.00000000 L: row 2, col 2
The working Every figure verified twice
  1. l11 = √(4) = 2.00000000
  2. l21 = 2 ⁄ √(4) = 1.00000000
  3. l22 = √(5 − (2 ⁄ √(4))^2) = 2.00000000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

Cholesky decomposition factors a symmetric matrix A into L·Lᵀ, where L is lower triangular — a genuine matrix square root, since multiplying L by its own transpose rebuilds A exactly the way multiplying √a by itself rebuilds a. For a 2×2 matrix A = [[a, b], [b, d]], writing out L·Lᵀ term by term and matching each entry against A gives the recipe directly: L₁₁ = √a from the top-left corner, L₂₁ = b ⁄ L₁₁ from the shared off-diagonal entry, and L₂₂ = √(d − L₂₁²) from whatever remains in the bottom-right once L₂₁² has already been claimed.

The decomposition exists only when A is symmetric and positive-definite, meaning every eigenvalue is strictly positive, or equivalently xᵀAx > 0 for every nonzero vector x. That condition is precisely what keeps a and d − L₂₁² from turning negative under their square roots — so the moment either quantity dips below zero, the matrix was never positive-definite in the first place, and the failed decomposition is itself a fast test for that property, no eigenvalues required.

The payoff for that restriction is speed and honesty about structure. Solving a symmetric system Ax = b through forward- and back-substitution against L takes roughly half the arithmetic of a general LU factorization, because Cholesky never rediscovers symmetry the way an unrestricted elimination would. The same L also drives Monte Carlo simulation: multiply it by a vector of independent standard-normal draws and the result carries exactly the correlation structure encoded in A, which is how portfolio risk models and physical simulations manufacture correlated randomness from independent noise.

L11=aL_{11} = \sqrt{a}L21=baL_{21} = \frac{b}{\sqrt{a}}L22=dL212L_{22} = \sqrt{d - L_{21}^2}A=LLTA = L L^{\mathsf{T}}
a, b, d — entries of the symmetric matrix A = [[a, b], [b, d]] · L₁₁, L₂₁, L₂₂ — entries of the lower-triangular factor L such that L·Lᵀ equals A exactly.
  • Enter the matrix's three independent entries: A: row 1, col 1, A: row 1, col 2 (= row 2, col 1), and A: row 2, col 2 — together they describe the symmetric matrix [[a, b], [b, d]].
  • Read L: row 1, col 1, which is √a, the top-left entry of the triangular factor.
  • Read L: row 2, col 1 and L: row 2, col 2, the two remaining entries that complete L.
  • Multiply L by its own transpose by hand if you want to confirm the round trip: L·Lᵀ reconstructs A exactly, entry for entry.
  • If the sheet reports the matrix is not positive-definite, adjust a, b, or d — that check is exactly the condition this decomposition requires in order to exist.

Worked example — decomposing [[4, 2], [2, 5]]

Set A: row 1, col 1 to 4, A: row 1, col 2 (= row 2, col 1) to 2, and A: row 2, col 2 to 5, describing the symmetric matrix [[4, 2], [2, 5]]. The sheet computes L: row 1, col 1 = √4 = 2, then L: row 2, col 1 = 2 ⁄ 2 = 1, then L: row 2, col 2 = √(5 − 1²) = √4 = 2, giving L = [[2, 0], [1, 2]].

Multiply L by its transpose to check the round trip: L·Lᵀ = [[2, 0], [1, 2]] · [[2, 1], [0, 2]] gives a top-left entry of 2×2 + 0×0 = 4, a top-right of 2×1 + 0×2 = 2, a bottom-left of 1×2 + 2×0 = 2, and a bottom-right of 1×1 + 2×2 = 5 — reproducing [[4, 2], [2, 5]] with nothing rounded away.

Questions

What is a Cholesky decomposition, in plain terms?

It factors a symmetric, positive-definite matrix A into L·Lᵀ, where L is lower triangular — the matrix equivalent of a square root, since L·Lᵀ rebuilds A the way √a·√a rebuilds a. For a 2×2 matrix [[a, b], [b, d]], three short formulas give L directly: L₁₁ = √a, L₂₁ = b ⁄ √a, and L₂₂ = √(d − L₂₁²).

Why does the matrix need to be positive-definite?

Because every step of the method takes a square root, and a real square root of a negative number does not exist. Positive-definiteness — every eigenvalue strictly greater than zero — is exactly what keeps a and d − L₂₁² positive, so a real Cholesky factor existing and the matrix being positive-definite are the same fact stated two different ways.

How is this different from a general LU decomposition?

LU factors any square matrix into a lower- and upper-triangular pair without requiring symmetry, at roughly twice the arithmetic. Cholesky only handles symmetric, positive-definite matrices, but it exploits that symmetry to produce one triangular factor L, with Lᵀ standing in for the upper half at no extra cost.

What mistake do people usually make with this formula?

Feeding in an asymmetric matrix — typing different numbers for the (1,2) and (2,1) positions — or skipping the positive-definite check and expecting an answer where the method would need the square root of a negative number. This sheet only takes one shared value for b precisely because the matrix must already be symmetric for the decomposition to mean anything.

Where does Cholesky decomposition actually get used?

Two common places: solving symmetric linear systems such as structural stiffness matrices or least-squares normal equations faster than general elimination allows, and generating correlated random variables in simulation — multiplying L by independent standard-normal draws produces samples with exactly the covariance structure A specifies.

Does Cholesky decomposition give one unique answer?

Yes, once L's diagonal entries are required to be positive, which is the convention used here. Allowing negative diagonal entries would produce other equally valid factors, obtained by flipping the sign of a matching row and column of L, so fixing the diagonal sign is what pins down a single answer.

References