CholeskyDecomposition

Details and Options

- The matrix m can be numerical or symbolic, but must be Hermitian and positive definite.
- CholeskyDecomposition[m] yields an upper‐triangular matrix u so that ConjugateTranspose[u].u==m.
- With the setting TargetStructure->"Structured", CholeskyDecomposition[m] returns u as an UpperTriangularMatrix.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Compute the Cholesky decomposition of a 2×2 real matrix:

https://wolfram.com/xid/0dqumebgqdu-fg9


https://wolfram.com/xid/0dqumebgqdu-dxo

The original matrix is positive definite:

https://wolfram.com/xid/0dqumebgqdu-ila

Compute the Cholesky decomposition of a 3×3 complex Hermitian matrix:

https://wolfram.com/xid/0dqumebgqdu-uuzf40

The result is upper triangular:

https://wolfram.com/xid/0dqumebgqdu-hff6v1

Scope (11)Survey of the scope of standard use cases
Basic Uses (7)
Find the Cholesky decomposition of a machine-precision matrix:

https://wolfram.com/xid/0dqumebgqdu-bj5ki4

https://wolfram.com/xid/0dqumebgqdu-drigy


https://wolfram.com/xid/0dqumebgqdu-bgxmth

Cholesky decomposition for a complex matrix:

https://wolfram.com/xid/0dqumebgqdu-y5nohf

CholeskyDecomposition will detect if the input fails to be Hermitian and positive definite:

https://wolfram.com/xid/0dqumebgqdu-eja54q


The matrix m is positive definite but not Hermitian:

https://wolfram.com/xid/0dqumebgqdu-gu30m8

Use CholeskyDecomposition with an exact matrix:

https://wolfram.com/xid/0dqumebgqdu-de468y


https://wolfram.com/xid/0dqumebgqdu-bdr7zn

Cholesky decomposition for an arbitrary-precision matrix:

https://wolfram.com/xid/0dqumebgqdu-dzgv0u


https://wolfram.com/xid/0dqumebgqdu-iaajzu

Use CholeskyDecomposition with a symbolic matrix:

https://wolfram.com/xid/0dqumebgqdu-m7qspc

When verifying the result, conditions are needed to make sure the matrix is positive definite:

https://wolfram.com/xid/0dqumebgqdu-l1y1u3

This can be understood as making sure all eigenvalues are positive:

https://wolfram.com/xid/0dqumebgqdu-1biamk

The Cholesky decomposition for a large numerical matrix is computed efficiently:

https://wolfram.com/xid/0dqumebgqdu-bjhh1d

https://wolfram.com/xid/0dqumebgqdu-n2hz99

Cholesky decomposition for a real symmetric positive definite CenteredInterval matrix:

https://wolfram.com/xid/0dqumebgqdu-kzui0z


https://wolfram.com/xid/0dqumebgqdu-3yenu


https://wolfram.com/xid/0dqumebgqdu-fxghe1

Special Matrices (4)
Find the Cholesky decomposition for sparse matrices:

https://wolfram.com/xid/0dqumebgqdu-i36c3n


https://wolfram.com/xid/0dqumebgqdu-jnicaz

Cholesky decompositions of structured matrices:

https://wolfram.com/xid/0dqumebgqdu-fyaetx


https://wolfram.com/xid/0dqumebgqdu-c0k3bb

Use with a QuantityArray structured matrix:

https://wolfram.com/xid/0dqumebgqdu-d2yyup


https://wolfram.com/xid/0dqumebgqdu-ntiy7m

Cholesky decomposition of an identity matrix is an identity matrix:

https://wolfram.com/xid/0dqumebgqdu-kkhgb9

Cholesky decomposition of HilbertMatrix:

https://wolfram.com/xid/0dqumebgqdu-ou7ra

https://wolfram.com/xid/0dqumebgqdu-u403e4

Options (1)Common values & functionality for each option
TargetStructure (1)
With TargetStructure->"Dense", the result is returned as a dense matrix:

https://wolfram.com/xid/0dqumebgqdu-hqa43p

With TargetStructure->"Structured", the result is returned as an UpperTriangularMatrix:

https://wolfram.com/xid/0dqumebgqdu-my3g3t

Applications (2)Sample problems that can be solved with this function
A triangular linear system is a system of linear equations in which the first equation has one variable and each subsequent equation introduces exactly one additional variable. Rewrite the following system in three variables as two triangular linear systems in six variables:

https://wolfram.com/xid/0dqumebgqdu-utykfo
Rewrite the system in matrix form and compute the Cholesky decomposition of
:

https://wolfram.com/xid/0dqumebgqdu-ha93bo

The original system can be reordered into :

https://wolfram.com/xid/0dqumebgqdu-p162j6

Introduce new variables and set
; the result is a triangular system in
:

https://wolfram.com/xid/0dqumebgqdu-rbvj77

Substituting into
gives
, a triangular system in
:

https://wolfram.com/xid/0dqumebgqdu-5550d1

The six triangular equations together give the same result for as the original system of equations:

https://wolfram.com/xid/0dqumebgqdu-79mpv3


https://wolfram.com/xid/0dqumebgqdu-mjwlij

The Cholesky decomposition can be used to create random samples having a specified covariance from many independent random values, for example, in Monte Carlo simulation. Starting from the desired covariance matrix, compute the lower triangular matrix , where
is the Cholesky decomposition:

https://wolfram.com/xid/0dqumebgqdu-oises6

Generate a million independent samples and multiply each one by :

https://wolfram.com/xid/0dqumebgqdu-mi1t78
The covariance of the sample agrees with the desired covariance to roughly three digits:

https://wolfram.com/xid/0dqumebgqdu-bo4mpn

Properties & Relations (6)Properties of the function, and connections to other functions
The Cholesky decomposition requires the input matrix to be Hermitian and positive definite:

https://wolfram.com/xid/0dqumebgqdu-hguiee


https://wolfram.com/xid/0dqumebgqdu-bcqdda

Verify ConjugateTranspose[u].u == m:

https://wolfram.com/xid/0dqumebgqdu-hg93e

CholeskyDecomposition[m] is upper triangular and positive definite:

https://wolfram.com/xid/0dqumebgqdu-evf8ou


https://wolfram.com/xid/0dqumebgqdu-pda6qn

The Cholesky decomposition is not the same thing as the matrix square root:

https://wolfram.com/xid/0dqumebgqdu-h335fg


https://wolfram.com/xid/0dqumebgqdu-zr54pd

The Cholesky decomposition is upper triangular, whereas the square root is Hermitian:

https://wolfram.com/xid/0dqumebgqdu-ux2mo5

However, both matrices are positive definite and have the same determinant:

https://wolfram.com/xid/0dqumebgqdu-euly1c

For a real matrix , the Cholesky decomposition of
coincides with
's QR decomposition up to sign:

https://wolfram.com/xid/0dqumebgqdu-n2j5d
Find the Cholesky decomposition of Transpose[m].m:

https://wolfram.com/xid/0dqumebgqdu-dg8neq
Compute QRDecomposition[m]:

https://wolfram.com/xid/0dqumebgqdu-oczajs
is the same as
except for the choice of sign for each row:

https://wolfram.com/xid/0dqumebgqdu-cl90xe

For any matrix , the Cholesky decomposition of
coincides with
's QR decomposition up to phase:

https://wolfram.com/xid/0dqumebgqdu-y8d31v
Find the Cholesky decomposition of ConjugateTranspose[m].m:

https://wolfram.com/xid/0dqumebgqdu-nk43sc
Compute QRDecomposition[m]:

https://wolfram.com/xid/0dqumebgqdu-bpxj4b
is the same as
except for the choice of phase for each row:

https://wolfram.com/xid/0dqumebgqdu-vs9p8n

CholeskyDecomposition is a kind of LU decomposition:

https://wolfram.com/xid/0dqumebgqdu-ueo56r


https://wolfram.com/xid/0dqumebgqdu-uo71ph


https://wolfram.com/xid/0dqumebgqdu-3x9594

This is generally a different decomposition from the one given by LUDecomposition:

https://wolfram.com/xid/0dqumebgqdu-7avfg3

Possible Issues (2)Common pitfalls and unexpected behavior
Matrices need to be positive definite enough to overcome numerical roundoff:

https://wolfram.com/xid/0dqumebgqdu-f9i1hn


The smallest eigenvalue is effectively zero to machine precision:

https://wolfram.com/xid/0dqumebgqdu-dm6291

The decomposition can be computed when the precision is high enough to resolve it:

https://wolfram.com/xid/0dqumebgqdu-f63ls6

s is a sparse tridiagonal matrix:

https://wolfram.com/xid/0dqumebgqdu-h8uta

The Cholesky decomposition is computed as a dense matrix even if the result is sparse:

https://wolfram.com/xid/0dqumebgqdu-be0xr6

Using LinearSolve will give a LinearSolveFunction that has a sparse Cholesky factorization:

https://wolfram.com/xid/0dqumebgqdu-cwv8ft


https://wolfram.com/xid/0dqumebgqdu-eivqt8

Wolfram Research (2003), CholeskyDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/CholeskyDecomposition.html (updated 2024).
Text
Wolfram Research (2003), CholeskyDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/CholeskyDecomposition.html (updated 2024).
Wolfram Research (2003), CholeskyDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/CholeskyDecomposition.html (updated 2024).
CMS
Wolfram Language. 2003. "CholeskyDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/CholeskyDecomposition.html.
Wolfram Language. 2003. "CholeskyDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/CholeskyDecomposition.html.
APA
Wolfram Language. (2003). CholeskyDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CholeskyDecomposition.html
Wolfram Language. (2003). CholeskyDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CholeskyDecomposition.html
BibTeX
@misc{reference.wolfram_2025_choleskydecomposition, author="Wolfram Research", title="{CholeskyDecomposition}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/CholeskyDecomposition.html}", note=[Accessed: 03-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_choleskydecomposition, organization={Wolfram Research}, title={CholeskyDecomposition}, year={2024}, url={https://reference.wolfram.com/language/ref/CholeskyDecomposition.html}, note=[Accessed: 03-May-2025
]}