Determinant of a matrix #
This file defines the determinant of a matrix, Matrix.det, and its essential properties.
Main definitions #
Matrix.det: the determinant of a square matrix, as a sum over permutationsMatrix.detRowAlternating: the determinant, as anAlternatingMapin the rows of the matrix
Main results #
det_mul: the determinant ofA * Bis the product of determinantsdet_zero_of_row_eq: the determinant is zero if there is a repeated rowdet_block_diagonal: the determinant of a block diagonal matrix is a product of the blocks' determinants
Implementation notes #
It is possible to configure simp to compute determinants. See the file
MathlibTest/matrix.lean for some examples.
det is an AlternatingMap in the rows of the matrix.
Instances For
If n has only one element, the determinant of an n by n matrix is just that element.
Although Unique implies DecidableEq and Fintype, the instances might
not be syntactically equal. Thus, we need to fill in the args explicitly.
The determinant of a matrix, as a monoid homomorphism.
Instances For
On square matrices, mul_left_comm applies under det.
On square matrices, mul_right_comm applies under det.
Permuting the columns changes the sign of the determinant.
Permuting the rows changes the sign of the determinant.
Permuting rows and columns with two equivalences does not change the absolute value of the determinant.
Reindexing both indices along the same equivalence preserves the determinant.
For the simp version of this lemma, see det_submatrix_equiv_self; this one is unsuitable because
Matrix.reindex_apply unfolds reindex first.
Reindexing both indices along equivalences preserves the absolute of the determinant.
For the simp version of this lemma, see abs_det_submatrix_equiv_equiv;
this one is unsuitable because Matrix.reindex_apply unfolds reindex first.
A variant of Matrix.det_neg with scalar multiplication by Units ℤ instead of multiplication
by R.
det_eq section #
Lemmas showing the determinant is invariant under a variety of operations.
If you add multiples of row B k to other rows, the determinant doesn't change.
If you add multiples of previous rows to the next row, the determinant doesn't change.
If you add multiples of previous columns to the next columns, the determinant doesn't change.
The determinant of a 2×2 block matrix with the lower-left block equal to zero is the product of
the determinants of the diagonal blocks. For the generalization to any number of blocks, see
Matrix.det_of_upperTriangular.
The determinant of a 2×2 block matrix with the upper-right block equal to zero is the product of
the determinants of the diagonal blocks. For the generalization to any number of blocks, see
Matrix.det_of_lowerTriangular.
Laplacian expansion of the determinant of an n+1 × n+1 matrix along column 0.
Laplacian expansion of the determinant of an n+1 × n+1 matrix along row 0.
Laplacian expansion of the determinant of an n+1 × n+1 matrix along row i.
Laplacian expansion of the determinant of an n+1 × n+1 matrix along column j.
Determinant of 0x0 matrix
Determinant of 1x1 matrix
Determinant of 2x2 matrix
Determinant of 3x3 matrix