Skip to main content

Cholesky Decomposition Calculator

Compute the lower-triangular Cholesky factor L of a 2×2 symmetric positive-definite matrix A, such that A = L Lᵀ. Verifies symmetry and positive-definiteness, and returns L plus a check that L Lᵀ reconstructs A.

Category: Mathematics

Cholesky Decomposition Calculator Inputs

Enter values to calculate

Top-left entry of symmetric A; must be > 0.

Off-diagonal entry; appears in both [0,1] and [1,0] of A.

Bottom-right entry; must satisfy ad > b² for the matrix to be positive definite.

Enable JavaScript for interactive calculation and step-by-step results.

Cholesky Decomposition Calculator Formula

Equation

A = LL^T, \quad L = \beginpmatrix √(a) & 0 \\ b/√(a) & √(d - b^2/a) \endpmatrix

Excel Formula

=A=POWER(LL,T),L={pmatrix}SQRT(a)&0/SQRT(a)&SQRT(d-POWER(b,2)/a)EXP(1)nd{pmatrix}

Variables

  • a (symmetric top-left) — Top-left entry of symmetric A; must be > 0.
  • b (symmetric off-diagonal) — Off-diagonal entry; appears in both [0,1] and [1,0] of A.
  • d (symmetric bottom-right) — Bottom-right entry; must satisfy ad > b² for the matrix to be positive definite.

How the Cholesky Decomposition Calculator Works

A symmetric matrix A is positive-definite (SPD) iff xᵀ A x > 0 for every nonzero vector x — equivalently, all its eigenvalues are positive. SPD matrices have a unique Cholesky factor L with positive diagonal entries such that A = L Lᵀ. This decomposition powers many numerical algorithms, especially in Monte Carlo simulation and Kalman filtering.

The core relationship is A = LL^T, \quad L = \begin{pmatrix} \sqrt{a} & 0 \\ b/\sqrt{a} & \sqrt{d - b^2/a} \end{pmatrix}. Typical inputs include a (symmetric top-left), b (symmetric off-diagonal), d (symmetric bottom-right).

Enter your values in the cholesky decomposition calculator above, review the step-by-step solution, and compare against the worked examples below so you can see how each input changes the result. This free online mathematics tool is built for homework, design checks, and professional verification.

Cholesky Decomposition Calculator Theory & Explanation

Cholesky theorem

If A is SPD, there is a unique lower-triangular L with positive diagonal entries such that:

A = L L^T

2×2 closed form

For a 2×2 SPD matrix [[a, b],[b, d]]:

L = \beginpmatrix √(a) & 0 \\ b/√(a) & √(d - b^2/a) \endpmatrix

Positive-definite check

For 2×2, SPD requires: (i) a > 0 and (ii) ad > b² (so that the determinant is positive and the lower-right entry of L is real). Geometically, the diagonal must dominate.

Verification

Multiply L by Lᵀ — you should recover A. This reconstruction is the proof you're working with the right L:

LL^T = \beginpmatrix √(a) & 0 \\ b/√(a) & √(d - b^2/a) \endpmatrix \beginpmatrix √(a) & b/√(a) \\ 0 & √(d - b^2/a) \endpmatrix = \beginpmatrix a & b \\ b & d \endpmatrix

Numerical cost

For an n×n SPD matrix, Cholesky takes O(n³/6) flops — about half the cost of LU decomposition for the same matrix, and it's numerically very stable.

The Symmetric Positive-Definite Requirement

Cholesky applies only to matrices that are symmetric (A = A^T) and positive definite (x^T A x > 0 for every non-zero vector x). Both conditions are essential: symmetry is what allows a single factor L to serve for both sides, and positive definiteness is what keeps every quantity under the square root positive.

This gives the algorithm a useful side effect. If you run Cholesky on a matrix and it succeeds, you have proved the matrix is positive definite; if it fails by demanding the square root of a negative number, you have proved it is not. That test is faster and more reliable than computing eigenvalues, and it is the standard way software checks the condition — for example when verifying that a covariance matrix is valid or that a Hessian indicates a genuine minimum.

A = LL^T, \qquad L_jj = √(A_jj) - Σ_k<j L_jk^2

Solving Systems with the Factorisation

Once A = LL^T is available, solving Ax = b becomes two triangular solves rather than a full elimination. Substitute to get L(L^T x) = b, set y = L^T x, then solve Ly = b by forward substitution and L^T x = y by back substitution. Each triangular solve costs only O(n^2).

That split is why factorising is worth the effort: the expensive O(n^3) decomposition is done once, and every subsequent right-hand side costs only O(n^2). In applications that repeatedly solve with the same matrix — time-stepping a structural model, running many least-squares fits against a fixed design matrix — this turns an intractable loop into a cheap one. The determinant also comes free, as the square of the product of the diagonal entries of L.

\det(A) = \prod_i=1^n L_ii^2

Where It Is Used

Cholesky is the default workhorse wherever positive-definite matrices arise. Least-squares regression solves the normal equations X^T X β = X^T y, and X^T X is symmetric positive definite whenever the columns are independent. Kalman filters factor covariance matrices at every update step. Finite-element stiffness matrices are symmetric positive definite by construction, which is why structural solvers rely on it.

It is also how correlated random numbers are generated: to sample from a multivariate normal with covariance \Sigma, factor \Sigma = LL^T and transform a vector of independent standard normals z into \mu + Lz. That single trick underlies Monte Carlo simulation in quantitative finance and risk modelling. One practical note — for matrices that are positive definite but close to singular, the variant A = LDL^T avoids square roots entirely and handles borderline cases more gracefully.

Cholesky Decomposition Calculator Worked Examples

Worked Example

Inputs

  • a: 4
  • b: 2
  • d: 3

Result: L: [object Object] isPositiveDefinite: true determinant: 8

Explanation

a = 4, √a = 2. b/√a = 2/2 = 1. d − b²/a = 3 − 4/4 = 2. √2 ≈ 1.414. So L = [[2, 0], [1, √2]]. Verification: LLᵀ = [[4, 2], [2, 3]] — A is reconstructed.

Second Scenario

Inputs

  • a: 6
  • b: 2
  • d: 3

Result: L: [object Object] isPositiveDefinite: true determinant: 8

Explanation

This scenario uses different inputs (a = 6, b = 2, d = 3) to show how changing one variable affects the cholesky decomposition result. Run the calculator above with these values to get the exact updated output with step-by-step work.

Common Cholesky Decomposition Calculator Use Cases

  • Homework and exam practice
  • Engineering and science coursework
  • Quick verification of hand calculations
  • Cholesky Decomposition homework and study
  • Cholesky Decomposition design and analysis

Cholesky Decomposition Calculator FAQs

Why must the matrix be symmetric?

If A is symmetric and SPD, the Cholesky factorization is unique. For non-symmetric A you can still attempt LDLᵀ under other conditions, but the definition depends on A being symmetric at root.

What if my matrix is not positive-definite?

The Cholesky factor will have imaginary entries when ad < b² (i.e. det A < 0), or will fail to take the square root of a negative number on the diagonal. This is a feature: Cholesky is a built-in SPD test.

What does Cholesky do for simulations?

To sample x from N(0, A) with given covariance A: sample z from N(0, I), then x = L z has covariance L Lᵀ z = A · I = A. So Cholesky turns correlated sampling into a sequence of independent draws followed by a linear transformation.

Is Cholesky related to the matrix inverse?

Indirectly. A⁻¹ = (LLᵀ)⁻¹ = L⁻ᵀ L⁻¹. Solving Ax = b via Cholesky reduces to L y = b followed by Lᵀ x = y, both of which are easy back-substitutions.

What happens if my matrix is not positive definite?

The algorithm reaches a point where it must take the square root of a non-positive number and fails. That failure is informative rather than a nuisance — it is the standard, and fastest, way to test positive definiteness. If you need a factorisation regardless, use LDL^T, which avoids square roots and handles indefinite symmetric matrices.