Determinant by Gaussian elimination

Finding matrix determinant using Gaussian elimination in complex, rational or real numbers.

We already have the matrix determinant calculator, but it employs a straightforward algorithm with complexity O(n!), which makes it unusable for big matrices. The following calculator performs the same task in O(n3) operations. It uses Gaussian elimination to convert an input matrix to the triangular form. The calculator supports rational and complex numbers.

PLANETCALC, Determinant by Gaussian elimination

Determinant by Gaussian elimination

Input matrix
Triangular matrix
Number of swaps

Determinant properties used by the calculator algorithm

  • The calculator converts the input matrix to the triangular form to calculate the matrix determinant by multiplying its main diagonal elements.
  • The conversion is performed by subtracting one row from another multiplied by a scalar coefficient. This operation doesn't change the determinant.
  • The calculator swaps two rows if zero appears in the main diagonal. It counts a number of row swaps to change the determinant sign according to the number of swaps (each swap changes the result sign).
  • It stops calculation if a zero column is found since the determinant becomes zero in this case.

The determinant has several other interesting properties not used by this calculator (see Wikipedia).

URL copied to clipboard
PLANETCALC, Determinant by Gaussian elimination