Cholesky decomposition is a triangular factorization for symmetric positive definite matrices. It is a specialized form of matrix decomposition, more restrictive than LU decomposition, but faster and simpler when its hypotheses are satisfied.
For a real symmetric positive definite matrix , the Cholesky decomposition has the form
where is lower triangular with positive diagonal entries. For a complex Hermitian positive definite matrix, the corresponding form is
where denotes the conjugate transpose of . Every Hermitian positive definite matrix has such a decomposition, and the factor is unique when the diagonal entries of are required to be positive.
77.1 Symmetric Positive Definite Matrices
A real square matrix is symmetric if
It is positive definite if
for every nonzero vector .
Positive definiteness is a strong condition. It says that the quadratic form associated with is always positive away from the origin. This condition appears naturally in geometry, optimization, statistics, least squares, energy methods, covariance matrices, and numerical partial differential equations.
For Cholesky decomposition, symmetry alone is insufficient. Positive definiteness is also required. A symmetric matrix with negative or zero curvature in some direction may fail to have a standard Cholesky factorization.
77.2 The Factorization
The Cholesky factorization of a real symmetric positive definite matrix is
Here
with
for every .
The transpose is upper triangular. Thus Cholesky writes as the product of a lower triangular matrix and its transpose.
This is different from ordinary LU decomposition. In LU decomposition, the two triangular factors are generally unrelated:
In Cholesky decomposition, the upper factor is exactly the transpose of the lower factor:
This symmetry is the source of Cholesky’s efficiency.
77.3 Relation to LU Decomposition
Cholesky decomposition may be viewed as LU decomposition adapted to symmetric positive definite matrices.
If
then is automatically symmetric:
It is also positive definite when is invertible. Indeed, for any nonzero vector ,
Since is invertible, whenever . Hence
Thus every matrix of the form , with nonsingular, is symmetric positive definite.
The converse is the Cholesky theorem: every real symmetric positive definite matrix can be written in this way.
77.4 A Two by Two Example
Let
We seek
where
Then
Equating entries with , we get
so
Next,
so
and therefore
Finally,
Thus
so
Therefore
Indeed,
77.5 Entry Formulas
Let be an real symmetric positive definite matrix. Suppose
The entries of can be computed column by column.
For a diagonal entry,
For an entry below the diagonal, where ,
These formulas depend only on entries of that have already been computed. The square root is well-defined because positive definiteness guarantees that the quantity under the radical is positive in exact arithmetic.
77.6 A Three by Three Example
Let
This standard example has Cholesky factor
Check the product:
The entries are
Thus
77.7 Solving Linear Systems
Suppose
and
Then
Introduce
Then solve the two triangular systems
and
The first system is solved by forward substitution. The second system is solved by backward substitution.
The solution procedure is therefore:
| Step | Operation |
|---|---|
| 1 | Factor |
| 2 | Solve |
| 3 | Solve |
This is analogous to solving by LU decomposition, but the two factors are transposes of one another.
77.8 Example: Solving a System
Let
From the previous example,
where
First solve
That is,
The first equation gives
so
The second equation gives
Substitute :
so
Now solve
That is,
The second equation gives
so
The first equation gives
Therefore
so
Hence
77.9 Determinants from Cholesky
Cholesky decomposition gives a simple determinant formula.
If
then
Since
we have
Because is triangular,
Therefore
Equivalently,
This formula is useful in statistics, optimization, Gaussian models, and numerical methods, especially when the logarithm of the determinant is needed:
77.10 Positive Definiteness Test
Cholesky decomposition can be used as a test for positive definiteness.
When the algorithm attempts to compute
the expression under the square root must be positive.
If, in exact arithmetic, this expression becomes zero or negative before the factorization is complete, then is not positive definite.
Thus Cholesky factorization is both a decomposition method and a diagnostic. For a symmetric matrix, successful Cholesky factorization with positive diagonal entries certifies positive definiteness.
In floating point arithmetic, care is needed. A nearly positive definite or ill-conditioned matrix may produce small negative values because of rounding error. In such cases, the failure may reflect numerical sensitivity rather than a clear mathematical failure.
77.11 Operation Count
For a dense matrix, Cholesky decomposition requires about
arithmetic operations.
Dense LU decomposition requires about
operations.
Thus Cholesky is roughly twice as efficient as LU when it applies. This efficiency comes from exploiting symmetry and using only one triangular factor.
Solving the two triangular systems after factorization costs on the order of
operations for one right-hand side.
77.12 Cholesky and Least Squares
Cholesky decomposition often appears in least squares problems through the normal equations.
Given an overdetermined system
the least squares solution satisfies
If has full column rank, then is symmetric positive definite. Therefore one may compute
and solve
This method is simple, but it can be numerically less stable than QR decomposition because forming squares the condition number. Cholesky is therefore efficient, but not always the preferred method for least squares when numerical accuracy is critical.
77.13 Cholesky and Covariance Matrices
Covariance matrices are symmetric positive semidefinite, and positive definite when the variables have no exact linear dependence.
If
is the Cholesky factorization of a covariance matrix, then can be used to transform uncorrelated standard variables into correlated variables.
Let
Define
Then
This is one reason Cholesky decomposition is widely used in statistics and simulation. It gives a direct way to generate random vectors with a prescribed covariance matrix.
77.14 Complex Cholesky Decomposition
For complex matrices, the proper analogue of symmetry is Hermitian symmetry.
A complex matrix is Hermitian if
It is positive definite if
for every nonzero complex vector .
The Cholesky factorization is
The diagonal entries of are real and positive. The factor is the conjugate transpose of , not merely the transpose.
For real matrices, conjugation has no effect, so this reduces to
77.15 LDL Transpose Decomposition
A related factorization is
where is unit lower triangular and is diagonal.
This form avoids square roots. It separates the diagonal scaling into the matrix . For a positive definite matrix, the diagonal entries of are positive.
If
with , then
Hence
This recovers an ordinary Cholesky factor with
The form is often useful in theoretical work and in numerical algorithms where square roots are undesirable.
77.16 Algorithm
The following algorithm computes the lower triangular Cholesky factor of a real symmetric positive definite matrix.
cholesky_decomposition(A):
n = number of rows of A
L = zero matrix of size n by n
for j = 1 to n:
s = 0
for k = 1 to j - 1:
s = s + L[j,k] * L[j,k]
d = A[j,j] - s
if d <= 0:
stop: matrix is not positive definite
L[j,j] = sqrt(d)
for i = j + 1 to n:
s = 0
for k = 1 to j - 1:
s = s + L[i,k] * L[j,k]
L[i,j] = (A[i,j] - s) / L[j,j]
return LThe algorithm computes one column of at a time. Since is symmetric, only the lower triangular part of is needed.
77.17 Storage in Practice
A dense Cholesky implementation usually stores the result in the same array that originally stored .
Since is symmetric, only one triangular half must be stored. The lower triangular half may be overwritten by . The upper triangular half is either unused or treated as implicit.
| Stored object | Practical representation |
|---|---|
| Lower or upper triangular half | |
| Same triangular half after factorization | |
| Not stored separately | |
| Symmetric entries | Implied by symmetry |
This storage model cuts memory use and improves cache behavior.
77.18 Failure Modes
Cholesky decomposition can fail for several reasons.
| Cause | Meaning |
|---|---|
| Matrix is not symmetric | The factorization cannot represent it |
| Matrix is indefinite | Some is negative |
| Matrix is singular positive semidefinite | A zero pivot appears |
| Matrix is ill-conditioned | Floating point roundoff may create a small negative pivot |
| Matrix has modeling error | Intended covariance or Hessian is not positive definite |
A common numerical repair is to add a small diagonal term:
This operation is called diagonal regularization or jitter in statistical computing. It can make a nearly positive definite matrix safely positive definite, at the cost of changing the original problem.
77.19 Comparison with LU and QR
| Decomposition | Main form | Applies to | Typical use |
|---|---|---|---|
| LU | General square matrices | Linear systems | |
| Cholesky | Symmetric positive definite matrices | Fast SPD solves | |
| QR | Rectangular or square matrices | Least squares, orthogonality | |
| SVD | General matrices | Rank, conditioning, approximation |
Cholesky is the preferred factorization when the matrix is known to be symmetric positive definite. LU is more general. QR is more stable for many least squares problems. SVD is the most informative but usually more expensive.
77.20 Summary
Cholesky decomposition factors a real symmetric positive definite matrix as
For complex Hermitian positive definite matrices, the form is
The factor is lower triangular with positive diagonal entries. The factorization is unique under that convention. It is used to solve linear systems, compute determinants, test positive definiteness, generate correlated random variables, and exploit the structure of covariance and Hessian matrices.
Cholesky is faster and more memory-efficient than general LU decomposition when its assumptions are satisfied. Its limitation is also its strength: it applies only to matrices with the symmetry and positivity needed to make the triangular square-root structure valid.