Functions > Vector and Matrix > Matrix Factorization > Example: Cholesky Factorization of Real Matrices
  
Example: Cholesky Factorization of Real Matrices
Use the Cholesky function to perform Cholesky factorization of a real matrix.
* 
To avoid logical mismatches when performing boolean comparisons, enable Approximate Equality in the Calculation Options drop-down list.
1. Define a real positive definite square matrix M.
Click to copy this expression
2. Apply the eigenvals function to ensure that the matrix is positive definite.
Click to copy this expression
3. Apply the rank function to ensure that M is a full-rank matrix.
Click to copy this expression
4. Set arguments p and u to control the enabling/disabling of pivoting and lower/upper factorization.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
5. Use the Cholesky function to perform the default factorization of matrix M - with pivoting and lower factorization.
Click to copy this expression
* 
The default function Cholesky(M) is equivalent to Cholesky(M,1,0).
Click to copy this expression
6. Show that P10T x M x P10 = L10 x L10T.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
The relationship is logically true.
7. Use the Cholesky function to perform factorization of matrix M - with no pivoting and lower factorization (default).
Click to copy this expression
* 
Not specifying argument u, as in Cholesky(M, 0), is equivalent to setting it to 0 as in Cholesky(M, 0, 0).
Click to copy this expression
Click to copy this expression
* 
The returned lower matrix, L10, when pivoting is enabled is NOT equal to the returned lower matrix, L00, when pivoting is disabled.
Click to copy this expression
The relationship is logically false.
8. Show that M = L00 x L00T.
Click to copy this expression
Click to copy this expression
Click to copy this expression
The relationship is logically true.
9. Use the Cholesky function to perform factorization of matrix M - with pivoting and upper factorization.
Click to copy this expression
Click to copy this expression
Click to copy this expression
10. Show that P11T x M x P11 = U11T x U11.
Click to copy this expression
Click to copy this expression
Click to copy this expression
The relationship is logically true.
11. Use the Cholesky function to perform factorization of matrix M - with no pivoting and upper factorization.
Click to copy this expression
Click to copy this expression
12. Show that M = U01T x U01.
Click to copy this expression
Click to copy this expression
Click to copy this expression
The relationship is logically true.