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.
2. Apply the eigenvals function to ensure that the matrix is positive definite.
3. Apply the rank function to ensure that M is a full-rank matrix.
4. Set arguments p and u to control the enabling/disabling of pivoting and lower/upper factorization.
 p0 0 u0 0 p1 1 u1 1
5. Use the Cholesky function to perform the default factorization of matrix M - with pivoting and lower factorization.
 The default function Cholesky(M) is equivalent to Cholesky(M,1,0). Cholesky M Cholesky M p1 u0
6. Show that P10T x M x P10 = L10 x L10T.
 P10 m10 0 L10 m10 1 P10 M P10 L10 L10 P10 M P10 L10 L10
The relationship is logically true.
7. Use the Cholesky function to perform factorization of matrix M - with no pivoting and lower factorization (default).
 Not specifying argument u, as in Cholesky(M, 0), is equivalent to setting it to 0 as in Cholesky(M, 0, 0). Cholesky M p0 Cholesky M p0 u0
 The returned lower matrix, L10, when pivoting is enabled is NOT equal to the returned lower matrix, L00, when pivoting is disabled. L00 L10 The relationship is logically false.
8. Show that M = L00 x L00T.
 M L00 L00 M L00 L00
The relationship is logically true.
9. Use the Cholesky function to perform factorization of matrix M - with pivoting and upper factorization.
 m11 Cholesky M p1 u1 P11 m11 0 U11 m11 1
10. Show that P11T x M x P11 = U11T x U11.
 P11 M P11 U11 U11 P11 M P11 U11 U11
The relationship is logically true.
11. Use the Cholesky function to perform factorization of matrix M - with no pivoting and upper factorization.
12. Show that M = U01T x U01.
 M U01 U01 M U01 U01
The relationship is logically true.