The Cholesky decomposition of a matrix
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
A, <NoCheck>, <Real>)
linalg::factorCholesky(A) computes the Cholesky
factorization of a Hermitian positive definite matrix A and
returns a lower triangular matrix L,
such that L LH = A.
Here, LH is
the Hermitian conjugate of L (the complex conjugate
of the transpose).
The component ring of
A must be a field (a
domain of category
If A is
not a Hermitian positive definite matrix, then
an error. If you use
not check whether the matrix is Hermitian positive definite. See Example 2.
If you use
A is real and symmetric and, therefore, does
not apply complex conjugate in the course of the algorithm.
it fails to compute the matrix L over
the component ring of
A. (The algorithm requires
the computation of square roots of some elements in L).
Properties of identifiers are taken into account.
S as follows:
S := Dom::Matrix(Dom::Rational)( [[4, -2, 4, 2], [-2, 10, -2, -7], [4, -2, 8, 4], [2, -7, 4, 7]] )
Compute the Cholesky factorization of
L := linalg::factorCholesky(S)
Verify the result:
is(L * htranspose(L) = S)
H as follows:
H := matrix([[a, b], [b, a]])
linalg::factorCholesky cannot compute the
Cholesky factorization because it cannot prove that
a Hermitian matrix:
Error: Hermitian matrix expected. [linalg::factorCholesky]
If you assume that
real, then matrix
H is Hermitian. Still,
compute the Cholesky factorization:
linalg::factorCholesky(H) assuming a in R_ and b in R_
Error: Unable to check whether the matrix component is positive. [linalg::factorCholesky]
NoCheck option to skip checking whether
this matrix is Hermitian positive definite. Now,
L := linalg::factorCholesky(H, NoCheck)
This result is not generally valid:
L*htranspose(L) = H
It is valid for
0 < a < b:
simplify(L*htranspose(L) = H) assuming 0 < b < a
Compute the Cholesky factorization of matrix
skip checking whether it is Hermitian positive definite. By default,
a Hermitian factorization A = L LH .
Thus, the result contains complex conjugates (implied by |a| = a*ā).
H := matrix([[a, b], [b, a]]): L := linalg::factorCholesky(H, NoCheck)
To avoid complex conjugates in the result, use
L := linalg::factorCholesky(H, NoCheck, Real)
With this option,
a symmetric factorization A = L Lt instead
of a Hermitian factorization A = L LH :
simplify(L*transpose(L) = H)
Square matrix of a domain of category
Skip checking whether
Compute the Cholesky factorization assuming that matrix A is symmetric and all its symbolic parameters are real. In this case, the transpose of the matrix is its Hermitian transpose. Use this option if A contains symbolic parameters, and you want to avoid complex conjugates. When using this option, the identity L LT = A is guaranteed to hold.
Matrix of the same domain type as
A, or the
The Cholesky factorization of a Hermitian positive definite n×n matrix A is a decomposition of A in a product L LH = A, such that L is a lower triangular matrix with positive entries on the main diagonal. L is called the “Cholesky factor” of A.
If L = (li, j), where 1 ≤ i ≤ n, 1 ≤ j ≤ n, is the Cholesky factor of A, then .