
Matrices and Sets of Linear Equations 255
With LU Decomposition, a general square matrix A is factorized into upper and
lower triangular matrices, applying the matrix relation: PA = LU , where P is a per-
mutation matrix, L is unit lower triangular matrix and U is upper triangular matrix.
Function gsl linalg LU decomp factorizes the specified square matrix A into the
LU decomposition. The function returns matrix A with the diagonal and upper tri-
angular part of the original matrix A. In the following example, the first C statement
creates a GSL square (M ×M) matrix a. The second statement creates a permutation
of size M. The third statement performs ...