Darwin Help

Back to Index

Cholesky

Function Cholesky - decomposition of a positive definite matrix A = R * R^t

Calling Sequence  Cholesky(A)
Parameters
NameTypeDescription

A matrix(numeric)a matrix
Return Type  matrix
Synopsis R := Cholesky(A) computes the Cholesky decomposition of the matrix A. A is the input matrix, and must be a square, symmetric, positive definite matrix. If A does not satisfy these conditions, an error is returned. R is a square matrix, lower triangular, such that R*transpose(R) = A. Cholesky is used to check for positive-definiteness, and at the same time it allows to solve a system Ax=b (by doing two back-substitutions) if it is positive-definite.
Examples
> A := [[3,1,2],[1,2,-1],[2,-1,5]];
A := [[3, 1, 2], [1, 2, -1], [2, -1, 5]]
> R := Cholesky(A);
R := [[1.7321, 0, 0], [0.5774, 1.2910, 0], [1.1547, -1.2910, 1.4142]]
> R * R^t;
[[3.0000, 1, 2], [1, 2, -1.0000], [2, -1.0000, 5.0000]]


See also convolve,   Eigenvalues,   GaussElim,   GivensElim,   Identity,   matrix,   matrix_inverse,   transpose