Previous Up Next

15.3.1  Cholesky decomposition

If M is a square symmetric positive definite matrix, the Cholesky decomposition is M=PTP, where P is a lower triangular matrix. The cholesky command finds the matrix P.

Examples

cholesky([[1,1],[1,5]])
     


10
12


          
cholesky([[3,1],[1,4]])
     







3
0
3
3
33
3







          
cholesky([[1,1],[1,4]])
     




10
1
3




          
Remark.

If the matrix argument A is not a symmetric matrix, cholesky(A) does not return an error, bu instead uses the symmetric matrix B of the the quadratic form q corresponding to the (non symmetric) bilinear form of the matrix A.

Example

cholesky([[1,-1],[-1,4]])

or:

cholesky([[1,-3],[1,4]])
     




10
−1
3




          

Previous Up Next