Main       Download       Commercial support       FAQ       Forum       About Us

Determinant

LU decomposition has many applications, for example, the determinant calculation. If the square matrix A is represented as A = PLU, 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 RMatrixLUDet calculates the determinant of a matrix whose LU decomposition has already been performed. The output of LUDecomposition subroutine is used as 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 RMatrixDet calculates the determinant of a matrix whose LU-decomposition hasn't been performed yet. The subroutine uses matrix A as the input, and returns the determinant. All operations regarding LU decomposition are hidden in the subroutine.

Manual entries

C++ matdet subpackage   
C# matdet subpackage   

This article is intended for personal use only.

Download ALGLIB

C#

C# source.

Downloads page

 

C++

C++ source.

Downloads page

 

C++, multiple precision arithmetic

C++ source. MPFR/GMP is used.

GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.

Downloads page

 

FreePascal

FreePascal version.

Downloads page

 

Delphi

Delphi version.

Downloads page

 

VB.NET

VB.NET version.

Downloads page

 

VBA

VBA version.

Downloads page

 

Python

Python version (CPython and IronPython are supported).

Downloads page

 

 

ALGLIB® - numerical analysis library, 1999-2012.
ALGLIB is a registered trademark of the ALGLIB Project.