The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.Rank
82 declarations and 2 deprecated aliases. Mathlib docs · Source
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.finrank_span_range_col,Matrix.finrank_span_range_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.
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.
theorem Matrix.mulVecBilin.congr_simp E1 #
∀ {m : Type u_1} {n : Type u_2} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] [inst_8 : Fintype n],
Matrix.mulVecBilin R S = Matrix.mulVecBilin R S
theorem Fintype.equivFinOfCardEq.congr_simp E1 #
∀ {α : Type u_1} [inst : Fintype α] {n : ℕ} (h : Fintype.card α = n),
Fintype.equivFinOfCardEq h = Fintype.equivFinOfCardEq h
theorem Finset.equivFinOfCardEq.congr_simp E1 #
∀ {α : Type u_1} {s : Finset α} {n : ℕ} (h : s.card = n), Finset.equivFinOfCardEq h = Finset.equivFinOfCardEq h
def Matrix.cRank E3 #
{m : Type um} → {n : Type un} → {R : Type uR} → [Semiring R] → Matrix m n R → Cardinal.{max uR um}
The rank of a matrix, defined as the dimension of its column space, as a cardinal.
theorem Matrix.cRank_subsingleton E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [Subsingleton R] (A : Matrix m n R), A.cRank = 1
theorem Matrix.cRank_toNat_eq_finrank E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R),
Cardinal.toNat A.cRank = Module.finrank R ↥(Submodule.span R (Set.range A.col))
theorem Matrix.lift_cRank_submatrix_le E1 #
∀ {m : Type um} {m₀ : Type um₀} {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : Semiring R] (A : Matrix m n R)
(r : m₀ → m) (c : n₀ → n),
Cardinal.lift.{um, max uR um₀} (A.submatrix r c).cRank ≤ Cardinal.lift.{um₀, max uR um} A.cRank
theorem Matrix.cRank_submatrix_le E1 #
∀ {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : Semiring R] {m m₀ : Type um} (A : Matrix m n R) (r : m₀ → m)
(c : n₀ → n), (A.submatrix r c).cRank ≤ A.cRank
A special case of lift_cRank_submatrix_le for when m₀ and m are in the same universe.
theorem Matrix.cRank_le_card_height E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [StrongRankCondition R] [inst_2 : Fintype m]
(A : Matrix m n R), A.cRank ≤ ↑(Fintype.card m)
theorem Matrix.cRank_le_card_width E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [StrongRankCondition R] [inst_2 : Fintype n]
(A : Matrix m n R), A.cRank ≤ ↑(Fintype.card n)
def Matrix.eRank E3 #
{m : Type um} → {n : Type un} → {R : Type uR} → [Semiring R] → Matrix m n R → ℕ∞
The rank of a matrix, defined as the dimension of its column space, as a term in ℕ∞.
theorem Matrix.toENat_cRank E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R), Cardinal.toENat A.cRank = A.eRank
theorem Matrix.eRank_subsingleton E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [Subsingleton R] (A : Matrix m n R), A.eRank = 1
theorem Matrix.eRank_toNat_eq_finrank E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R),
A.eRank.toNat = Module.finrank R ↥(Submodule.span R (Set.range A.col))
theorem Matrix.eRank_submatrix_le E1 #
∀ {m : Type um} {m₀ : Type um₀} {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : Semiring R] (A : Matrix m n R)
(r : m₀ → m) (c : n₀ → n), (A.submatrix r c).eRank ≤ A.eRank
theorem Matrix.eRank_le_card_width E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [StrongRankCondition R] (A : Matrix m n R),
A.eRank ≤ ENat.card n
theorem Matrix.eRank_le_card_height E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [StrongRankCondition R] (A : Matrix m n R),
A.eRank ≤ ENat.card m
def Matrix.rank E3 #
{m : Type um} → {n : Type un} → {R : Type uR} → [Semiring R] → Matrix m n R → ℕ
The rank of a matrix is the rank of its image.
theorem Matrix.cRank_toNat_eq_rank E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R), Cardinal.toNat A.cRank = A.rank
theorem Matrix.eRank_toNat_eq_rank E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R), A.eRank.toNat = A.rank
theorem Matrix.finrank_span_range_col E3 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] (A : Matrix m n R),
Module.finrank R ↥(Submodule.span R (Set.range A.col)) = A.rank
The rank of a matrix is the rank of the space spanned by its columns.
theorem Matrix.finrank_range_mulVecLin E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : CommSemiring R] (A : Matrix m n R),
Module.finrank R ↥A.mulVecLin.range = A.rank
theorem Matrix.rank_subsingleton E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [Subsingleton R] (A : Matrix m n R), A.rank = 1
theorem Matrix.cRank_one E0 #
∀ {m : Type um} {R : Type uR} [inst : Semiring R] [inst_1 : DecidableEq m] [StrongRankCondition R],
Matrix.cRank 1 = Cardinal.lift.{uR, um} (Cardinal.mk m)
theorem Matrix.eRank_one E0 #
∀ {m : Type um} {R : Type uR} [inst : Semiring R] [inst_1 : DecidableEq m] [StrongRankCondition R],
Matrix.eRank 1 = ENat.card m
theorem Matrix.rank_one E0 #
∀ {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Semiring R] [inst_2 : DecidableEq n] [StrongRankCondition R],
Matrix.rank 1 = Fintype.card n
theorem Matrix.cRank_zero E0 #
∀ {R : Type uR} {m : Type u_1} {n : Type u_2} [inst : Semiring R] [Nontrivial R], Matrix.cRank 0 = 0
theorem Matrix.eRank_zero E0 #
∀ {R : Type uR} {m : Type u_1} {n : Type u_2} [inst : Semiring R] [Nontrivial R], Matrix.eRank 0 = 0
theorem Matrix.rank_zero E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Semiring R] [Nontrivial R], Matrix.rank 0 = 0
theorem Matrix.rank_le_card_width E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Semiring R] [StrongRankCondition R]
(A : Matrix m n R), A.rank ≤ Fintype.card n
theorem Matrix.rank_le_width E1 #
∀ {R : Type uR} [inst : Semiring R] [StrongRankCondition R] {m n : ℕ} (A : Matrix (Fin m) (Fin n) R), A.rank ≤ n
theorem Matrix.rank_mul_le_left E1 #
∀ {m : Type um} {n : Type un} {o : Type uo} {R : Type uR} [inst : Fintype n] [Finite o] [inst_2 : CommSemiring R]
[StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R), (A * B).rank ≤ A.rank
theorem Matrix.rank_mul_le_right E1 #
∀ {m : Type um} {n : Type un} {o : Type uo} {R : Type uR} [inst : Fintype n] [Finite o] [inst_2 : CommSemiring R]
[StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R), (A * B).rank ≤ B.rank
theorem Matrix.rank_mul_le E3 #
∀ {m : Type um} {n : Type un} {o : Type uo} {R : Type uR} [inst : Fintype n] [Finite o] [inst_2 : CommSemiring R]
[StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R), (A * B).rank ≤ min A.rank B.rank
theorem Matrix.rank_mul_ge E1 #
∀ {m : Type um} {n : Type un} {o : Type uo} {R : Type uR} [inst : Fintype n] [Finite o] [inst_2 : CommRing R]
[IsDomain R] (A : Matrix m n R) (B : Matrix n o R), A.rank + B.rank ≤ (A * B).rank + Fintype.card n
theorem Matrix.rank_vecMulVec_le E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [Finite n] [inst : CommSemiring R] [StrongRankCondition R] (w : m → R)
(v : n → R), (Matrix.vecMulVec w v).rank ≤ 1
theorem Matrix.rank_unit E1 #
∀ {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : DecidableEq n] [inst_2 : CommSemiring R]
[StrongRankCondition R] (A : (Matrix n n R)ˣ), (↑A).rank = Fintype.card n
theorem Matrix.rank_of_isUnit E1 #
∀ {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : DecidableEq n] [inst_2 : CommSemiring R]
[StrongRankCondition R] (A : Matrix n n R), IsUnit A → A.rank = Fintype.card n
theorem Matrix.rank_of_det_mem_nonZeroDivisors E1 #
∀ {m : Type um} {R : Type u_1} [inst : CommRing R] [Nontrivial R] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
{A : Matrix m m R}, A.det ∈ nonZeroDivisors R → A.rank = Fintype.card m
theorem Matrix.rank_of_det_ne_zero E1 #
∀ {m : Type um} {R : Type u_1} [inst : CommRing R] [IsDomain R] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
{A : Matrix m m R}, A.det ≠ 0 → A.rank = Fintype.card m
theorem Matrix.rank_smul_of_mem_nonZeroDivisors E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [Finite n] {c : R} (B : Matrix m n R),
c ∈ nonZeroDivisors R → (c • B).rank = B.rank
theorem Matrix.rank_mul_eq_left_of_det_mem_nonZeroDivisors E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [inst_1 : Fintype n] [inst_2 : DecidableEq n]
(A : Matrix n n R) (B : Matrix m n R), A.det ∈ nonZeroDivisors R → (B * A).rank = B.rank
theorem Matrix.rank_mul_eq_left_of_det_ne_zero E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [IsDomain R] [inst_2 : Fintype n]
[inst_3 : DecidableEq n] (A : Matrix n n R) (B : Matrix m n R), A.det ≠ 0 → (B * A).rank = B.rank
theorem Matrix.rank_mul_eq_left_of_isUnit_det E3 #
∀ {m : Type um} {n : Type un} [inst : Fintype n] {R : Type u_1} [inst_1 : CommRing R] [inst_2 : DecidableEq n]
(A : Matrix n n R) (B : Matrix m n R), IsUnit A.det → (B * A).rank = B.rank
Right multiplying by an invertible matrix does not change the rank
theorem Matrix.rank_mul_eq_right_of_det_mem_nonZeroDivisors E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [inst_1 : Fintype m] [inst_2 : DecidableEq m]
[Finite n] (A : Matrix m m R) (B : Matrix m n R), A.det ∈ nonZeroDivisors R → (A * B).rank = B.rank
theorem Matrix.rank_mul_eq_right_of_det_ne_zero E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [IsDomain R] [inst_2 : Fintype m]
[inst_3 : DecidableEq m] [Finite n] (A : Matrix m m R) (B : Matrix m n R), A.det ≠ 0 → (A * B).rank = B.rank
theorem Matrix.rank_mul_eq_right_of_isUnit_det E3 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [inst_1 : Fintype m] [Finite n]
[inst_3 : DecidableEq m] (A : Matrix m m R) (B : Matrix m n R), IsUnit A.det → (A * B).rank = B.rank
Left multiplying by an invertible matrix does not change the rank
theorem Matrix.rank_mul_eq_right_of_isLowerTriangular E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [IsDomain R] [inst_2 : Fintype m] [Finite n]
[inst_4 : LinearOrder m] (A : Matrix m m R) (B : Matrix m n R),
A.IsLowerTriangular → (∀ (i : m), A.diag i ≠ 0) → (A * B).rank = B.rank
theorem Matrix.rank_mul_eq_right_of_isUpperTriangular E1 #
∀ {m : Type um} {n : Type un} {R : Type u_1} [inst : CommRing R] [IsDomain R] [inst_2 : Fintype m]
[inst_3 : LinearOrder m] [Finite n] (A : Matrix m m R) (B : Matrix m n R),
A.IsUpperTriangular → (∀ (i : m), A.diag i ≠ 0) → (A * B).rank = B.rank
theorem Matrix.rank_submatrix_le E1 #
∀ {m : Type um} {m₀ : Type um₀} {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : CommSemiring R]
[StrongRankCondition R] [Finite n] [Finite n₀] (A : Matrix m n R) (r : m₀ → m) (c : n₀ → n),
(A.submatrix r c).rank ≤ A.rank
Taking a subset of the rows and columns reduces the rank.
theorem Matrix.lift_cRank_submatrix E0 #
∀ {m : Type um} {m₀ : Type um₀} {n₀ : Type un₀} {R : Type uR} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m₀ ≃ m) (en : n₀ ≃ n),
Cardinal.lift.{um, max uR um₀} (A.submatrix ⇑em ⇑en).cRank = Cardinal.lift.{um₀, max uR um} A.cRank
theorem Matrix.cRank_submatrix E0 #
∀ {m : Type um} {n₀ : Type un₀} {R : Type uR} {m₀ : Type um} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m₀ ≃ m) (en : n₀ ≃ n), (A.submatrix ⇑em ⇑en).cRank = A.cRank
A special case of lift_cRank_submatrix for when the row types are in the same universe.
theorem Matrix.eRank_submatrix E0 #
∀ {m : Type um} {m₀ : Type um₀} {n₀ : Type un₀} {R : Type uR} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m₀ ≃ m) (en : n₀ ≃ n), (A.submatrix ⇑em ⇑en).eRank = A.eRank
theorem Matrix.rank_submatrix E0 #
∀ {m : Type um} {m₀ : Type um₀} {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : Semiring R] (A : Matrix m n R)
(em : m₀ ≃ m) (en : n₀ ≃ n), (A.submatrix ⇑em ⇑en).rank = A.rank
theorem Matrix.lift_cRank_reindex E1 #
∀ {m : Type um} {m₀ : Type um₀} {n₀ : Type un₀} {R : Type uR} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m ≃ m₀) (en : n ≃ n₀),
Cardinal.lift.{um, max uR um₀} ((Matrix.reindex em en) A).cRank = Cardinal.lift.{um₀, max uR um} A.cRank
theorem Matrix.cRank_reindex E1 #
∀ {m : Type um} {n₀ : Type un₀} {R : Type uR} {m₀ : Type um} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m ≃ m₀) (en : n ≃ n₀), ((Matrix.reindex em en) A).cRank = A.cRank
A special case of lift_cRank_reindex for when the row types are in the same universe.
theorem Matrix.eRank_reindex E1 #
∀ {m : Type um} {n₀ : Type un₀} {R : Type uR} {m₀ : Type um₀} {n : Type un} [inst : Semiring R] (A : Matrix m n R)
(em : m ≃ m₀) (en : n ≃ n₀), ((Matrix.reindex em en) A).eRank = A.eRank
theorem Matrix.rank_reindex E1 #
∀ {m : Type um} {m₀ : Type um₀} {n : Type un} {n₀ : Type un₀} {R : Type uR} [inst : Semiring R] (em : m ≃ m₀)
(en : n ≃ n₀) (A : Matrix m n R), ((Matrix.reindex em en) A).rank = A.rank
theorem Matrix.rank_eq_finrank_range_toLin E3 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Finite m] [inst_2 : DecidableEq n]
{M₁ : Type u_1} {M₂ : Type u_2} [inst_3 : CommSemiring R] [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (A : Matrix m n R) (v₁ : Module.Basis m R M₁)
(v₂ : Module.Basis n R M₂), A.rank = Module.finrank R ↥((Matrix.toLin v₂ v₁) A).range
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.
theorem Matrix.rank_le_card_height E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype m] [inst_1 : Semiring R] [StrongRankCondition R]
(A : Matrix m n R), A.rank ≤ Fintype.card m
theorem Matrix.rank_le_height E1 #
∀ {R : Type uR} [inst : Semiring R] [StrongRankCondition R] {m n : ℕ} (A : Matrix (Fin m) (Fin n) R), A.rank ≤ m
theorem Matrix.rank_le_card_of_support_subset E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [Finite n] [inst : CommSemiring R] [StrongRankCondition R]
(A : Matrix m n R) (s : Finset m), Function.support A.row ⊆ ↑s → A.rank ≤ s.card
The rank of a matrix is at most the size of any finset containing all its nonzero rows.
theorem Matrix.rank_diagonal E1 #
∀ {m : Type um} {R : Type uR} [inst : Field R] [inst_1 : Fintype m] [inst_2 : DecidableEq m] [inst_3 : DecidableEq R]
(w : m → R), (Matrix.diagonal w).rank = Fintype.card { i // w i ≠ 0 }
The rank of a diagonal matrix is the count of non-zero elements on its main diagonal
theorem Matrix.exists_rank_normal_form E3 #
∀ {m : Type um} {R : Type uR} [inst : Field R] [inst_1 : Fintype m] [inst_2 : DecidableEq m] (M : Matrix m m R),
∃ V U e, IsUnit V ∧ IsUnit U ∧ V * M * U = (Matrix.fromBlocks 1 0 0 0).submatrix ⇑e ⇑e
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.
theorem Matrix.cRank_diagonal E1 #
∀ {m : Type um} {R : Type uR} [inst : Field R] [inst_1 : DecidableEq m] (w : m → R),
(Matrix.diagonal w).cRank = Cardinal.lift.{uR, um} (Cardinal.mk { i // w i ≠ 0 })
theorem Matrix.eRank_diagonal E1 #
∀ {m : Type um} {R : Type uR} [inst : Field R] [inst_1 : DecidableEq m] (w : m → R),
(Matrix.diagonal w).eRank = {i | w i ≠ 0}.encard
theorem Matrix.ker_mulVecLin_conjTranspose_mul_self E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[StarOrderedRing R] [inst_4 : Fintype n] [inst_5 : Fintype m] (A : Matrix m n R),
(A.conjTranspose * A).mulVecLin.ker = A.mulVecLin.ker
theorem Matrix.rank_conjTranspose_mul_self E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[StarOrderedRing R] [inst_4 : Fintype m] [Finite n] (A : Matrix m n R), (A.conjTranspose * A).rank = A.rank
theorem Matrix.rank_conjTranspose E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[StarOrderedRing R] [Finite m] [Finite n] (A : Matrix m n R), A.conjTranspose.rank = A.rank
TODO: prove this in greater generality.
theorem Matrix.rank_self_mul_conjTranspose E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[StarOrderedRing R] [Finite m] [inst_5 : Fintype n] (A : Matrix m n R), (A * A.conjTranspose).rank = A.rank
theorem Matrix.ker_mulVecLin_transpose_mul_self E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype m] [inst_1 : Field R] [inst_2 : LinearOrder R]
[IsStrictOrderedRing R] [inst_4 : Fintype n] (A : Matrix m n R), (A.transpose * A).mulVecLin.ker = A.mulVecLin.ker
theorem Matrix.rank_transpose_mul_self E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype m] [inst_1 : Field R] [inst_2 : LinearOrder R]
[IsStrictOrderedRing R] [Finite n] (A : Matrix m n R), (A.transpose * A).rank = A.rank
theorem Matrix.rank_transpose E3 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [Finite m] [Finite n] (A : Matrix m n R),
A.transpose.rank = A.rank
theorem Matrix.rank_self_mul_transpose E0 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] [Finite m]
[inst_4 : Fintype n] (A : Matrix m n R), (A * A.transpose).rank = A.rank
theorem Matrix.finrank_span_range_row E3 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [Finite m] [Finite n] (A : Matrix m n R),
Module.finrank R ↥(Submodule.span R (Set.range A.row)) = A.rank
The rank of a matrix is the rank of the space spanned by its rows.
theorem LinearIndependent.rank_matrix E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [inst_1 : Fintype m] [Finite n] {M : Matrix m n R},
LinearIndependent R M.row → M.rank = Fintype.card m
theorem Matrix.mulVec_surjective_iff_rank_eq_card E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Field R] [inst_2 : Fintype m]
{M : Matrix m n R}, Function.Surjective M.mulVec ↔ M.rank = Fintype.card m
M.mulVec is surjective iff M has full row rank.
theorem LinearIndependent.mulVec_surjective E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Ring R] [IsSemisimpleRing R]
{M : Matrix m n R}, LinearIndependent R M.row → Function.Surjective M.mulVec
A matrix over a semisimple ring with linearly independent rows has surjective mulVec.
theorem Matrix.vecMul_surjective_iff_rank_eq_card E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : Fintype n] [inst_1 : Field R] [inst_2 : Fintype m]
{M : Matrix m n R}, (Function.Surjective fun v ↦ Matrix.vecMul v M) ↔ M.rank = Fintype.card n
M.vecMul is surjective iff M has full column rank.
theorem LinearIndependent.vecMul_surjective E1 #
∀ {m : Type um} {n : Type un} {R : Type uR} [inst : CommRing R] [IsSemisimpleRing R] [inst_2 : Fintype m]
{M : Matrix m n R}, LinearIndependent R M.col → Function.Surjective fun v ↦ Matrix.vecMul v M
A matrix with linearly independent columns has surjective vecMul.
theorem Matrix.rank_add_rank_le_card_of_mul_eq_zero E1 #
∀ {l : Type ul} {m : Type um} {n : Type un} {R : Type uR} [inst : Field R] [Finite l] [inst_2 : Fintype m] [Finite n]
{A : Matrix l m R} {B : Matrix m n R}, A * B = 0 → A.rank + B.rank ≤ Fintype.card m
theorem Matrix.rank_vecMulVec E1 #
∀ {K m n : Type u} [inst : CommRing K] [inst_1 : Fintype n] [inst_2 : DecidableEq n] (w : m → K) (v : n → K),
(Matrix.toLin' (Matrix.vecMulVec w v)).rank ≤ 1
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Matrix.rank_eq_finrank_span_cols | Matrix.finrank_span_range_col | 2026-10-21 |
Matrix.rank_eq_finrank_span_row | Matrix.finrank_span_range_row | 2026-11-16 |