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.
⎡ ⎢ ⎣ |
| ⎤ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎦ |
Warning: If the matrix argument A is not a symmetric matrix, cholesky(A) does not return an error, instead cholesky(A) will use the symmetric matrix B of the the quadratic form q corresponding to the (non symmetric) bilinear form of the matrix A.
Example.
Input:
or:
Output:
⎡ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎦ |