Triangular Factorization of Positive Definite Matrices (trf)
trf computes the Cholesky factorization of a real symmetric positive definite matrix \( A \).
Real Variant
The Cholesky decomposition is used to factor \( A \) as

\( A = U^T U \), if \( A \) is stored in the upper triangular part,

\( A = L L^T \), if \( A \) is stored in the lower triangular part,
where \( U \) is an upper triangular matrix and \( L \) is a lower triangular matrix.
A 
(input/output) real valued SyMatrix On exit, if the return value is zero, the factor \( U \) or \( L \) from the Cholesky factorization \( A = U^T U \) or \( A = L L^T \). 
Return value:
i=0 
Successful exit. 
i>0 
The leading minor of order \( i \) is not positive definite, and the factorization could not be completed. 
Complex Variant
The Cholesky decomposition is used to factor \( A \) as

\( A = U^H U \), if \( A \) is stored in the upper triangular part,

\( A = L L^H \), if \( A \) is stored in the lower triangular part,
where \( U \) is an upper triangular matrix and \( L \) is a lower triangular matrix. The factored form of \( A \) is then used to solve the system of equations \( A X = B \).
A 
(input/output) complex valued HeMatrix On exit, if the return value is zero, the factor \( U \) or \( L \) from the Cholesky factorization \( A = U^T U \) or \( A = L L^T \). 
Return value:
i=0 
Successful exit. 
i>0 
The leading minor of order \( i \) is not positive definite, and the factorization could not be completed. 