linalg
::factorCholesky
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.
linalg::factorCholesky(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 L^{H} = A.
Here, L^{H} 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 Cat::Field
).
If A is
not a Hermitian positive definite matrix, then linalg::factorCholesky
throws
an error. If you use NoCheck
, linalg::factorCholesky
does
not check whether the matrix is Hermitian positive definite. See Example 2.
If you use Real
, then linalg::factorCholesky
assumes
that A
is real and symmetric and, therefore, does
not apply complex conjugate in the course of the algorithm.
linalg::factorCholesky
returns FAIL
if
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.
Define matrix 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 S
:
L := linalg::factorCholesky(S)
Verify the result:
is(L * htranspose(L) = S)
Define matrix H
as follows:
H := matrix([[a, b], [b, a]])
linalg::factorCholesky
cannot compute the
Cholesky factorization because it cannot prove that H
is
a Hermitian matrix:
linalg::factorCholesky(H)
Error: Hermitian matrix expected. [linalg::factorCholesky]
If you assume that a
and b
are
real, then matrix H
is Hermitian. Still, linalg::factorCholesky
cannot
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]
Use the NoCheck
option to skip checking whether
this matrix is Hermitian positive definite. Now, linalg::factorCholesky
computes
the factorization:
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 H
using NoCheck
to
skip checking whether it is Hermitian positive definite. By default, linalg::factorCholesky
computes
a Hermitian factorization A = L L^{H} .
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 Real
:
L := linalg::factorCholesky(H, NoCheck, Real)
With this option, linalg::factorCholesky
computes
a symmetric factorization A = L L^{t} instead
of a Hermitian factorization A = L L^{H} :
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 L^{T} = A is guaranteed to hold. 
Matrix of the same domain type as A
, or the
value FAIL
.
The Cholesky factorization of a Hermitian positive definite n×n matrix A is a decomposition of A in a product L L^{H} = 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 = (l_{i, j}), where 1 ≤ i ≤ n, 1 ≤ j ≤ n, is the Cholesky factor of A, then .