Rank of matrices #
The rank of a matrix A is defined to be the rank of range of the linear map corresponding to A.
This definition does not depend on the choice of basis, see Matrix.rank_eq_finrank_range_toLin.
Main declarations #
Matrix.rank: the rank of a matrixMatrix.cRank: the rank of a matrix as a cardinalMatrix.eRank: the rank of a matrix as a term inℕ∞.
Main results #
Matrix.rank_eq_finrank_range_toLin: the rank equals the dimension of the range of the corresponding linear map, and is therefore independent of the choice of bases.Matrix.rank_eq_finrank_span_cols,Matrix.rank_eq_finrank_span_row: the rank equals the dimension of the space spanned by the columns (resp. rows).Matrix.rank_transpose: transposing a matrix does not change its rank.Matrix.rank_mul_le: the rank ofA * Bis at most the rank ofAand at most the rank ofB.Matrix.rank_mul_eq_left_of_isUnit_det,Matrix.rank_mul_eq_right_of_isUnit_det: multiplying by an invertible matrix does not change the rank.Matrix.exists_rank_normal_form: every square matrix over a field can be brought, by left and right multiplication by invertible matrices, into the block formfromBlocks 1 0 0 0, where the identity block has size equal to the rank of the matrix.
The rank of a matrix, defined as the dimension of its column space, as a cardinal.
Equations
- A.cRank = Module.rank R ↥(Submodule.span R (Set.range A.col))
Instances For
The rank of a matrix is the rank of its image.
Equations
- A.rank = Module.finrank R ↥A.mulVecLin.range
Instances For
Taking a subset of the rows and columns reduces the rank.
The rank of a matrix equals the dimension of the range of the corresponding linear map, and is therefore independent of the choice of bases.
The rank of a matrix is the rank of the space spanned by its columns.
The rank of a diagonal matrix is the count of non-zero elements on its main diagonal
Every square matrix over a field can be brought, by left and right multiplication by
invertible matrices, into the block form fromBlocks 1 0 0 0, where the identity block has size
equal to the rank of the matrix.
Lemmas about transpose and conjugate transpose #
This section contains lemmas about the rank of Matrix.transpose and Matrix.conjTranspose.
Unfortunately the proofs are essentially duplicated between the two; ℚ is a linearly-ordered ring
but can't be a star-ordered ring, while ℂ is star-ordered (with open ComplexOrder) but
not linearly ordered. For now we don't prove the transpose case for ℂ.
TODO: the lemmas Matrix.rank_transpose and Matrix.rank_conjTranspose current follow a short
proof that is a simple consequence of Matrix.rank_transpose_mul_self and
Matrix.rank_conjTranspose_mul_self. This proof pulls in unnecessary assumptions on R, and should
be replaced with a proof that uses Gaussian reduction or argues via linear combinations.
TODO: prove this in greater generality.