User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Input Matrix A (fill lower triangle & diagonal)
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

About

Cholesky decomposition factors a symmetric positive-definite matrix A into the product LLT, where L is a lower triangular matrix with strictly positive diagonal entries. The decomposition exists if and only if A is symmetric and all leading principal minors are positive. It requires roughly n33 floating-point operations, making it approximately twice as fast as LU decomposition for eligible matrices. Numerical instability or an incorrect assumption of positive-definiteness leads to imaginary square roots during factorization, producing meaningless results. This tool validates symmetry and definiteness before proceeding.

Applications span Kalman filters, Monte Carlo simulation (generating correlated random variables), solving normal equations in least-squares fitting, and finite element analysis. The algorithm implemented here is the Cholesky - Banachiewicz row-by-row variant. Limitation: this calculator uses IEEE 754 double-precision arithmetic, so matrices with condition numbers above 1012 may produce inaccurate results due to rounding.

cholesky decomposition matrix decomposition linear algebra positive definite matrix lower triangular matrix matrix calculator

Formulas

The Cholesky - Banachiewicz algorithm computes the lower triangular factor L row by row. For diagonal entries:

ljj = √ajj βˆ’ jβˆ’1βˆ‘k=0 ljk2

For off-diagonal entries where i > j:

lij = aij βˆ’ jβˆ’1βˆ‘k=0 lik β‹… ljkljj

The determinant is computed as:

det(A) = (n∏i=1 lii)2

Where A is the input symmetric positive-definite matrix of order n, L is the resulting lower triangular matrix, aij denotes the element at row i column j of A, and lij denotes the corresponding element of L. If the expression under the square root becomes negative or zero, the matrix is not positive-definite and decomposition fails.

Reference Data

PropertyRequirement / ValueNotes
SymmetryA = ATStrict requirement; aij = aji
Positive-DefinitenessxTAx > 0 for all x β‰  0All eigenvalues must be positive
Leading MinorsAll > 0Sylvester’s criterion
Diagonal of LAll lii > 0Uniqueness condition
Determinantdet(A) = (n∏i=1 lii)2Computed from diagonal of L
Complexityn33 flopsHalf of LU decomposition cost
Storagen(n + 1)2 elementsOnly lower triangle stored
LDLT VariantAvoids square rootsUses diagonal matrix D
Hermitian ExtensionA = LL*For complex matrices (not covered here)
Band Matrix OptimizationO(nb2)b = bandwidth
Sparse OptimizationFill-in minimization via reorderingAMD, Nested Dissection
Condition NumberΞΊ(A) = ΞΊ(L)2Squared relationship
Numerical StabilityBackward stableNo pivoting needed
Inverse via CholeskyAβˆ’1 = (Lβˆ’1)TLβˆ’1Forward + back substitution
Identity TestL = IWhen A = I
Diagonal Matrixlii = √aiiTrivial case
2Γ—2 Explicitl11 = √a11, l21 = a21l11Closed-form for small matrices

Frequently Asked Questions

The algorithm will encounter a non-positive value under the square root when computing a diagonal element ljj. This calculator detects this condition and reports exactly which diagonal step failed. A matrix can be symmetric with all positive diagonal entries yet still fail positive-definiteness. Sylvester's criterion requires all leading principal minors to be positive, not just the diagonal.
IEEE 754 double-precision provides roughly 15-16 significant decimal digits. For matrices with condition number ΞΊ(A) near 1012 or above, the last several digits of L become unreliable. The verification step (LLT reconstruction) will show residual errors exceeding 10βˆ’6 in such cases. For practical engineering matrices (condition numbers below 106), expect accuracy to at least 8 decimal places.
Yes. Once you have L, solve Ly = b by forward substitution, then LTx = y by back substitution. Each step costs O(n2) operations. This calculator provides L; you perform the substitution manually or use the output in another tool.
A valid input must satisfy aij = aji. Rather than requiring you to type each value twice and risk inconsistency, the tool auto-mirrors the lower triangle to the upper triangle. This enforces symmetry by construction and halves the number of inputs.
LU works on any non-singular matrix but requires pivoting and costs 2n33 operations. Cholesky exploits symmetry and positive-definiteness, needing only n33 operations and no pivoting. The result is also inherently numerically stable. If your matrix qualifies, Cholesky is always preferred.
This calculator automatically computes LLT and displays it alongside the original matrix A. The Frobenius norm of the residual β€–A βˆ’ LLTβ€–F is shown. Values below 10βˆ’10 indicate excellent accuracy.