Factor any symmetric positive definite matrix into A = LLᵀ with detailed step-by-step solutions. The fastest decomposition for SPD matrices — half the cost of LU.
Enter a symmetric positive definite matrix and click Decompose
or press Enter
The Cholesky decomposition (or Cholesky factorization) is a method of decomposing a symmetric positive definite matrix into the product of a lower triangular matrix and its transpose. Named after the French mathematician Andre-Louis Cholesky, it is one of the most efficient and numerically stable ways to solve linear systems involving symmetric positive definite (SPD) matrices.
Given a symmetric positive definite matrix A, the Cholesky decomposition finds a unique lower triangular matrix L with strictly positive diagonal entries such that:
Here L is lower triangular (all entries above the main diagonal are zero) and Lᵀ is its transpose, which is upper triangular. The matrix L is sometimes called the Cholesky factor or the square root of the matrix A, because L plays a role analogous to the square root of a positive number.
The Cholesky decomposition exists if and only if the matrix A is symmetric positive definite. A real matrix A is symmetric positive definite when:
If A is only positive semidefinite (xᵀAx ≥ 0, allowing equality for nonzero x), the decomposition still exists but L may have zeros on the diagonal and is no longer unique.
Before applying the Cholesky decomposition, you need to verify that your matrix is SPD. There are several equivalent ways to test positive definiteness:
The entries of the lower triangular matrix L are computed column by column, from left to right. For each column j = 1, 2, ..., n:
The value under the square root must be positive. If it is zero or negative, the matrix is not positive definite.
This process is repeated for every column until the entire lower triangle of L is filled. The entries above the diagonal are all zero by construction.
Consider the symmetric positive definite matrix:
Column 1:
Column 2:
Column 3:
You can verify: LLᵀ reconstructs the original matrix A.
The Cholesky decomposition requires approximately n³/3 floating-point operations for an n x n matrix. This is roughly half the cost of LU decomposition (which needs about 2n³/3 flops) and is one of the primary reasons Cholesky is preferred whenever the matrix is known to be SPD.
In addition to being faster, the Cholesky decomposition is also more numerically stable than LU for SPD matrices because it avoids the need for pivoting. The algorithm is guaranteed not to encounter growth in the entries of L, making it inherently backward-stable.
Both Cholesky and LU decomposition can factor square matrices and solve linear systems. However, they serve different purposes:
In practice, covariance matrices, kernel matrices (Gram matrices), normal equation matrices (AᵀA), and stiffness matrices in finite element analysis are all SPD, making Cholesky the preferred factorization in these contexts.
The Cholesky factor L is sometimes called the "matrix square root" because it satisfies A = LLᵀ, analogous to a = (sqrt(a))^2 for positive scalars. However, the Cholesky factor is not the unique symmetric positive definite square root of A (which satisfies S^2 = A with S symmetric positive definite). Instead, it is a triangular square root, which is computationally much cheaper to obtain.
The unique symmetric square root can be found via the eigendecomposition A = QDQᵀ as S = QD^{1/2}Qᵀ, but this is significantly more expensive. The Cholesky factor is preferred in practice because its triangular structure makes forward and backward substitution trivial.
The Cholesky decomposition appears across many areas of applied mathematics, statistics, and engineering:
Explore the other matrix decomposition calculators available on Decomposition.ai.
Factor a matrix into Lower and Upper triangular matrices. Essential for solving systems of linear equations efficiently.
Open calculator →Decompose into an orthogonal matrix Q and upper triangular R. Used in least squares regression and eigenvalue algorithms.
Open calculator →The most general matrix decomposition. Factorize any matrix into U, Σ, Vᵀ. Powers recommendation systems and data compression.
Open calculator →Find eigenvalues and eigenvectors. Fundamental to PCA, quantum mechanics, vibration analysis, and stability theory.
Open calculator →