Cholesky decomposition of a symmetric, positive definite real square matrix. The matrix is decomposed as the product of lower and upper triangular matrices, written as either UT∙U or L∙LT. |
||
Syntax |
T = Csky(M, Type) |
|
Argument |
Name |
Description |
M |
A symmetric positive definite square matrix of real values. |
|
Type |
A string, either ‘upper’ (default) or ‘lower’. Indicates whether to return the upper or lower triangular matrix. |
|
Output |
Name |
Description |
T |
The Cholesky decomposition triangular factor. |
|
Example |
Find the Cholesky decomposition of a symmetric positive definite matrix. |
|
Syntax |
||
M = [40,2,3;2,40,4;3,4,40];// Given matrix l = Csky(M, ‘lower’); |
||
Result |
||
l = 6.3246 0 0 0.31623 6.3166 0 0.47434 0.6095 6.2772 |
||
Comments |
Cholesky decomposition is used for solving linear equations Ax = b. If A is symmetric and positive definite, then you can solve Ax = b by first computing the Cholesky decomposition A = LLT, then solving Ly = b for y, and finally solving LTx = y for x. The procedure with the UTU notation is the same. |
|
See Also: |