# 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 straightforward algorithm with complexity O(n!), which makes it unusable for big matrices. The following calculator performs the same task in O(n^{3}) operations. It uses Gaussian elimination to convert an input matrix to the triangular form. The calculator supports rational and complex numbers.

### 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 main diagonal. It counts number of row swaps to change the determinant sign according to number of swaps ( each swap changes the result sign).
- It stops calculation if a zero column found, since the determinant becomes zero in this case.

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

URL copied to clipboard

## Comments