chofactor

compas.numerical.chofactor(A)[source]

Returns the Cholesky factorisation/decomposition matrix.

Parameters:
Aarray

Matrix A represented as an (m x m) array.

Returns:
array

Matrix (m x m) with upper/lower triangle containing Cholesky factor of A.

Notes

The Cholesky factorisation decomposes a Hermitian positive-definite matrix into the product of a lower/upper triangular matrix and its transpose.

\[\mathbf{A} = \mathbf{L} \mathbf{L}^{\mathrm{T}}\]

Examples

>>> _chofactor(array([[25, 15, -5], [15, 18, 0], [-5, 0, 11]]))
(array([[ 5.,  3., -1.],
       [15.,  3.,  1.],
       [-5.,  0.,  3.]]), False)