mathlib3 documentation

data.matrix.rank

Rank of matrices #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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_to_lin.

Main declarations #

TODO #

noncomputable def matrix.rank {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] (A : matrix m n R) :

The rank of a matrix is the rank of its image.

Equations
@[simp]
theorem matrix.rank_one {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [strong_rank_condition R] [decidable_eq n] :
@[simp]
theorem matrix.rank_zero {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [nontrivial R] :
0.rank = 0
theorem matrix.rank_le_card_width {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [strong_rank_condition R] (A : matrix m n R) :
theorem matrix.rank_le_width {R : Type u_5} [comm_ring R] [strong_rank_condition R] {m n : } (A : matrix (fin m) (fin n) R) :
A.rank n
theorem matrix.rank_mul_le_left {m : Type u_2} {n : Type u_3} {o : Type u_4} {R : Type u_5} [fintype n] [fintype o] [comm_ring R] [strong_rank_condition R] (A : matrix m n R) (B : matrix n o R) :
(A.mul B).rank A.rank
theorem matrix.rank_mul_le_right {l : Type u_1} {m : Type u_2} {n : Type u_3} {R : Type u_5} [m_fin : fintype m] [fintype n] [comm_ring R] [strong_rank_condition R] (A : matrix l m R) (B : matrix m n R) :
(A.mul B).rank B.rank
theorem matrix.rank_mul_le {m : Type u_2} {n : Type u_3} {o : Type u_4} {R : Type u_5} [fintype n] [fintype o] [comm_ring R] [strong_rank_condition R] (A : matrix m n R) (B : matrix n o R) :
theorem matrix.rank_unit {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [strong_rank_condition R] [decidable_eq n] (A : (matrix n n R)ˣ) :
theorem matrix.rank_of_is_unit {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [strong_rank_condition R] [decidable_eq n] (A : matrix n n R) (h : is_unit A) :
theorem matrix.rank_submatrix_le {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [strong_rank_condition R] [fintype m] (f : n m) (e : n m) (A : matrix m m R) :

Taking a subset of the rows and permuting the columns reduces the rank.

theorem matrix.rank_reindex {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [fintype m] (e₁ e₂ : m n) (A : matrix m m R) :
((matrix.reindex e₁ e₂) A).rank = A.rank
@[simp]
theorem matrix.rank_submatrix {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [comm_ring R] [fintype m] (A : matrix m m R) (e₁ e₂ : n m) :
(A.submatrix e₁ e₂).rank = A.rank
theorem matrix.rank_eq_finrank_range_to_lin {m : Type u_2} {n : Type u_3} {R : Type u_5} [m_fin : fintype m] [fintype n] [comm_ring R] [decidable_eq n] {M₁ : Type u_1} {M₂ : Type u_4} [add_comm_group M₁] [add_comm_group M₂] [module R M₁] [module R M₂] (A : matrix m n R) (v₁ : basis m R M₁) (v₂ : basis n R M₂) :
theorem matrix.rank_le_card_height {m : Type u_2} {n : Type u_3} {R : Type u_5} [m_fin : fintype m] [fintype n] [comm_ring R] [strong_rank_condition R] (A : matrix m n R) :
theorem matrix.rank_le_height {R : Type u_5} [comm_ring R] [strong_rank_condition R] {m n : } (A : matrix (fin m) (fin n) R) :
A.rank m

The rank of a matrix is the rank of the space spanned by its columns.

Lemmas about transpose and conjugate transpose #

This section contains lemmas about the rank of matrix.transpose and matrix.conj_transpose.

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_locale complex_order) but not linearly ordered. For now we don't prove the transpose case for .

TODO: the lemmas matrix.rank_transpose and matrix.rank_conj_transpose current follow a short proof that is a simple consequence of matrix.rank_transpose_mul_self and matrix.rank_conj_transpose_mul_self. This proof pulls in unecessary assumptions on R, and should be replaced with a proof that uses Gaussian reduction or argues via linear combinations.

theorem matrix.rank_conj_transpose_mul_self {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [field R] [partial_order R] [star_ordered_ring R] (A : matrix m n R) :
@[simp]
theorem matrix.rank_conj_transpose {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [field R] [partial_order R] [star_ordered_ring R] (A : matrix m n R) :

TODO: prove this in greater generality.

@[simp]
theorem matrix.rank_self_mul_conj_transpose {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [field R] [partial_order R] [star_ordered_ring R] (A : matrix m n R) :
theorem matrix.rank_transpose_mul_self {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [linear_ordered_field R] (A : matrix m n R) :
@[simp]
theorem matrix.rank_transpose {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [linear_ordered_field R] (A : matrix m n R) :

TODO: prove this in greater generality.

@[simp]
theorem matrix.rank_self_mul_transpose {m : Type u_2} {n : Type u_3} {R : Type u_5} [fintype n] [fintype m] [linear_ordered_field R] (A : matrix m n R) :

The rank of a matrix is the rank of the space spanned by its rows.

TODO: prove this in a generality that works for too, not just and .