Go to the first, previous, next, last section, table of contents.

Cholesky Decomposition

A symmetric, positive definite square matrix @math{A} has a Cholesky decomposition into a product of a lower triangular matrix @math{L} and its transpose @math{L^T},

This is sometimes referred to as taking the square-root of a matrix. The Cholesky decomposition can only be carried out when all the eigenvalues of the matrix are positive. This decomposition can be used to convert the linear system @math{A x = b} into a pair of triangular systems (@math{L y = b}, @math{L^T x = y}), which can be solved by forward and back-substitution.

Function: int gsl_linalg_cholesky_decomp (gsl_matrix * A)
This function factorizes the positive-definite square matrix A into the Cholesky decomposition @math{A = L L^T}. On output the diagonal and lower triangular part of the input matrix A contain the matrix @math{L}. The upper triangular part of the input matrix contains @math{L^T}, the diagonal terms being identical for both @math{L} and @math{L^T}. If the matrix is not positive-definite then the decomposition will fail, returning the error code GSL_EDOM.

Function: int gsl_linalg_cholesky_solve (const gsl_matrix * cholesky, const gsl_vector * b, gsl_vector * x)
This function solves the system @math{A x = b} using the Cholesky decomposition of @math{A} into the matrix cholesky given by gsl_linalg_cholesky_decomp.

Function: int gsl_linalg_cholesky_svx (const gsl_matrix * cholesky, gsl_vector * x)
This function solves the system @math{A x = b} in-place using the Cholesky decomposition of @math{A} into the matrix cholesky given by gsl_linalg_cholesky_decomp. On input x should contain the right-hand side @math{b}, which is replaced by the solution on output.


Go to the first, previous, next, last section, table of contents.