Cholesky Decomposition Calculator
Enter symmetric positive-definite matrix values.

Understanding the Cholesky Factorization

The Cholesky decomposition expresses a symmetric, positive-definite matrix A as the product A=LLT, where L is lower triangular with strictly positive diagonal entries. This factorization is valuable because it splits a complicated matrix into the product of simpler pieces, allowing systems of equations to be solved efficiently by forward and backward substitution. The method is also numerically stable for well-conditioned matrices, making it a cornerstone of numerical linear algebra.

To see why the decomposition exists, consider that any symmetric positive-definite matrix has all positive eigenvalues. Consequently, it can be viewed as the Gram matrix of a set of linearly independent vectors. The Cholesky algorithm essentially performs a specialized Gram–Schmidt process on those vectors, ensuring orthogonality while retaining symmetry. If A is 3×3, we find L=l11l21l22l31l32l33 such that multiplying L by its transpose reproduces A.

The algorithm proceeds element by element. We begin by setting l11=a11. Because A is positive definite, the square root is real and positive. The remaining entries in the first column follow from li1=ai1l11 for i>1. At each step, the algorithm subtracts the squares of previously computed values from the diagonal terms, ensuring that positivity is preserved.

Cholesky decomposition is preferred over more general techniques like LU decomposition when the matrix is symmetric and positive definite because it requires roughly half the computation and storage. The triangular matrix L contains only about half of the entries of A, and its transpose LT automatically completes the factorization. This symmetry leads to algorithms that run quickly and minimize rounding errors, providing accurate results even for large matrices.

Beyond solving linear systems, Cholesky factors play a key role in statistical modeling. In multivariate normal distributions, the covariance matrix is positive definite. Generating correlated random samples often begins with a Cholesky factorization: independent normal samples are transformed through L to introduce the desired covariance. In optimization algorithms, such as trust-region methods, the Cholesky factor helps ensure stable steps when the Hessian matrix is positive definite.

Consider the following 3×3 symmetric matrix:

a11a12a13a12a22a23a13a23a33

The Cholesky algorithm computes l11=a11, then l21=a12l11, l31=a13l11. The next diagonal entry is l22=a22l212, followed by l32=a23l31l21l22. Finally, l33=a33l312l322. The resulting lower triangular matrix provides the factorization A=LLT.

Using the calculator, enter nine numbers representing your matrix in row-major order. Ensure the matrix is symmetric by making aij equal to aji. If the matrix fails to be positive definite—for example, if any computed square root becomes negative—the calculator reports an error. Otherwise, it outputs the entries of L rounded to four decimal places. You can verify the result by multiplying L with its transpose and comparing it to your original matrix.

Cholesky decomposition features in numerous applications, from machine learning to structural engineering. In Bayesian statistics, for instance, covariance matrices can be huge and dense. Storing and manipulating the Cholesky factor instead of the full matrix saves memory and speeds up computation. In finite element analysis, where stiffness matrices are symmetric and positive definite, Cholesky factors allow quick solutions to deformation problems. Each time you use the decomposition, the factor L captures the essential geometry encoded by the original matrix while simplifying subsequent calculations.

Because Cholesky is so efficient, modern numerical libraries include highly optimized routines that exploit hardware acceleration. These routines can factor matrices with thousands of rows and columns. Understanding the algorithm at a smaller scale, as demonstrated in this calculator, provides insight into how those sophisticated implementations work under the hood. By experimenting with your own matrices, you will deepen your intuition for positive-definite forms, learn to recognize when Cholesky is applicable, and appreciate why this factorization is a trusted tool in computational science.

Related Calculators

Recurrence Relation Solver - Linear Sequences

Solve linear constant-coefficient recurrences up to order three.

recurrence relation solver sequence calculator

Radius of Convergence Calculator - Power Series

Estimate the radius of convergence of a power series from its coefficients.

radius of convergence power series complex analysis

Rational Root Theorem Calculator - Find Fractional Solutions

Apply the rational root theorem to polynomial coefficients and discover all possible rational zeros.

rational root theorem calculator polynomial roots