Determinant of a complex matrix
LU decomposition has many applications, for example, the determinant calculation. If the complex square matrix A is represented as PA = LU, we can easily calculate the determinant of matrix A, since det L = 1, det P = +1 or det P = -1 (depending on the permutation), and the determinant of matrix U is equal to the product of its diagonal elements.
The subroutine CMatrixLU calculates the determinant of a complex matrix, whose LU decomposition has already been performed. The output of the subroutine CMatrixLU is given at the input: matrices L and U in compact form and the permutation matrix. The subroutine returns the determinant of the matrix. It is recommended to use this subroutine if you have already performed the LU decomposition and want to use it to calculate the matrix determinant.
The subroutine CMatrixDet calculates the determinant of a complex matrix whose LU decomposition hasn't been performed yet. The subroutine gets matrix A as an input, and returns the determinant. All operations regarding LU decomposition are hidden in the subroutine.
Manual entries
This article is intended for personal use only.
Download ALGLIB