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.
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). |
6. Show that P10T x M x P10 = L10 x L10T.
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). |
| The returned lower matrix, L10, when pivoting is enabled is NOT equal to the returned lower matrix, L00, when pivoting is disabled. The relationship is logically false. |
8. Show that M = L00 x L00T.
The relationship is logically true.
9. Use the Cholesky function to perform factorization of matrix M - with pivoting and upper factorization.
10. Show that P11T x M x P11 = U11T x 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.
The relationship is logically true.