Triangular matrices #
Mathlib's Matrix.BlockTriangular API computes determinants and inverses of triangular
matrices, but not their individual diagonal entries. This file supplies the facts that
consumers keep needing: on the diagonal, a product of triangular matrices multiplies
entrywise, because ∑ k, A i k * B k i has a single surviving term — and consequences of
that, such as the diagonal of an inverse. It also proves uniqueness of a lower-triangular Gram
factor with positive diagonal, defines upper-unitriangular matrices, and proves that strictly
upper-triangular matrices are nilpotent.
The diagonal results are stated directly for Matrix.IsUpperTriangular and
Matrix.IsLowerTriangular rather than through membership in the Borel subalgebra, since there is
no Lie theory in them. It is
Matrix.mul_apply_diag_of_isUpperTriangular that TauCeti.Algebra.Lie.GeneralLinear.Borel
consumes in that form, and all of them are available to modules with no business importing
Lie-algebra theory.
Main results #
Matrix.BlockTriangular.det_eq_prod_diag— a matrix that is block triangular for an injective ranking of its indices has the product of its diagonal entries as determinant.Matrix.mul_apply_diag_of_isUpperTriangular— the diagonal of a product of upper-triangular matrices is the pointwise product of the diagonals.Matrix.mul_apply_diag_of_isLowerTriangular— the corresponding formula for lower-triangular matrices.Matrix.IsLowerTriangular.eq_one_of_mul_transpose_self_eq_one— a lower-triangular orthogonal matrix with nonnegative diagonal is the identity.Matrix.IsLowerTriangular.eq_of_mul_transpose_self_eq— lower-triangular matrices with positive diagonal are determined by their product with their transpose.Matrix.IsLowerTriangular.submatrix_castLE_mul_transpose— a leading principal submatrix of a lower-triangular Gram matrix is the Gram matrix of the corresponding submatrix.Matrix.pow_apply_diag_of_isUpperTriangular— the diagonal of a power of an upper-triangular matrix is the corresponding power of the diagonal entry.Matrix.isUpperUnitriangular_geom_sum_of_isUpperTriangular_of_diag_eq_zero— the geometric series in a strictly upper-triangular matrix is upper unitriangular, for any truncation that is positive whenever the index type is inhabited, andMatrix.isUpperUnitriangular_geom_sum_card_of_isUpperTriangular_of_diag_eq_zerofor the truncation at the size of the matrix.Matrix.inv_apply_diag_mul_of_isUpperTriangular— on the diagonal, the inverse inverts entrywise:M⁻¹ i i * M i i = 1.Matrix.inv_apply_diag_of_isUpperTriangular— where an upper-triangular matrix carries a1on the diagonal, so does its inverse.Matrix.IsUpperUnitriangular— an upper-triangular matrix with diagonal one.Matrix.IsUpperUnitriangular.ext— upper-unitriangular matrices are determined by their entries strictly above the diagonal.Matrix.IsUpperUnitriangular.det_eq_one— an upper-unitriangular matrix has determinant one.Matrix.isNilpotent_of_isUpperTriangular_of_diag_eq_zero— strict upper triangularity implies nilpotence.TauCeti.isUpperTriangular_transvection_iff— a transvection with its off-diagonal entry strictly below the diagonal is upper triangular exactly when its parameter vanishes.TauCeti.vecMul_injective_of_submatrix_isUpperTriangular— a rectangular matrix has injective row multiplication when a square column selection is upper triangular with nonzero diagonal.
A matrix that is block triangular for an injective ranking of its indices has the product of its diagonal entries as determinant: an injective ranking cuts it into singleton blocks.
A square matrix is upper unitriangular when it is upper triangular and every diagonal entry is one.
Equations
- M.IsUpperUnitriangular = (M.IsUpperTriangular ∧ ∀ (i : m), M i i = 1)
Instances For
An upper-unitriangular matrix is upper triangular.
Every diagonal entry of an upper-unitriangular matrix is one.
Two upper-unitriangular matrices are equal if their entries strictly above the diagonal agree.
The determinant of an upper-unitriangular matrix is one.
The determinant of an upper-unitriangular matrix is a unit.
The identity matrix is upper unitriangular.
Applying a zero- and one-preserving map entrywise preserves upper-unitriangular matrices.
For a strictly upper-triangular matrix, (M ^ k) i j = 0 whenever j < i + k.
A strictly upper-triangular matrix has power equal to zero at the cardinality of its index type.
A strictly upper-triangular square matrix is nilpotent.
The diagonal of a product of upper-triangular matrices is the pointwise product of the diagonals.
The diagonal of a product of lower-triangular matrices is the pointwise product of the diagonals.
The leading principal submatrix of a lower-triangular Gram matrix is a Gram matrix. The
first q rows of a lower-triangular matrix vanish outside their first q columns, so the leading
q × q block of L * Lᵀ sees only the leading q × q block of L.
A lower-triangular matrix over a linearly ordered commutative ring with nonnegative diagonal whose product with its transpose is the identity is itself the identity.
Lower-triangular matrices over an ordered field with positive diagonal are determined by
their Gram matrices L * Lᵀ.
Equivalently, the map L ↦ L * Lᵀ is injective on positive-diagonal lower-triangular matrices.
The empty index type is included.
The diagonal of a power of an upper-triangular matrix is the corresponding power of the diagonal entry.
A geometric series in a strictly upper-triangular matrix is upper unitriangular, for any
truncation k that is positive whenever the index type is inhabited.
Over an empty index type both conditions are vacuous, so nothing is asked of k there.
The geometric series in a strictly upper-triangular matrix, truncated at the size of the matrix, is upper unitriangular.
This is the truncation that appears when inverting 1 - M, being the exponent at which M has
already died (Matrix.pow_card_eq_zero_of_isUpperTriangular_of_diag_eq_zero).
On the diagonal, the inverse of an invertible upper-triangular matrix inverts entrywise:
M⁻¹ i i * M i i = 1.
Where an invertible upper-triangular matrix has a 1 on the diagonal, so does its inverse.
The hypothesis is needed only at the entry asked about.
A product of upper-unitriangular matrices is upper unitriangular.
The inverse of an invertible upper-unitriangular matrix is upper unitriangular.
Subtracting the identity from an upper-unitriangular matrix gives a nilpotent matrix.
A transvection whose off-diagonal entry lies strictly below the diagonal is upper
triangular exactly when its parameter vanishes. The complementary case, an entry on or above the
diagonal, is Mathlib's Matrix.blockTriangular_transvection.
A triangular selection of coordinates makes the rows independent. If some choice e of a
coordinate for each row makes the matrix upper triangular - M i (e j) = 0 for j < i - with a
nonzero diagonal, then the rows are independent: the selected columns form a square submatrix whose
determinant is the product of that diagonal.