Determinants, Row-Echelon Form
Row-Echelon Form
Any square matrix m can be transformed into a diagonal matrix,
i.e. a matrix that is zero everywhere except the main diagonal,
in a manner that preserves the determinant of the matrix.
The matrix has been converted into "row-echelon form".
First perform
gaussian Elimination,
giving an upper triangular matrix having the same determinant.
Then perform
back substitution
to clear out everything above the main diagonal.
The result is a diagonal matrix having the same determinant.
Actually gaussian elimination might multiply the determinant by -1,
if we are forced to swap rows.
For most applications the sign of the determinant doesn't matter,
or can be inferred.
If it does matter, keep track of the swaps.