Row echelon forms #
This file defines the row echelon form of matrices and the leading entries of their rows.
Main definitions #
Matrix.IsRowEchelonexpresses thatAis in row echelon form: an entry of a lower row vanishes whenever a higher row is zero at every column strictly to its left.Matrix.IsLeadingEntry:c : nis the leading position of rowiofA.Matrix.IsReducedRowEchelonadditionally requires each leading entry to be1and the entries above it to vanish.
Tags #
matrix, echelon form
def Matrix.IsRowEchelon {m : Type u_1} {n : Type u_2} {R : Type v} [Zero R] [LT m] [LT n] (A : Matrix m n R) :
A is in row echelon form: for rows i₁ < i₂, if the higher row i₁ is zero at every
column strictly left of j₂, then the lower row i₂ is zero at j₂.
Equations
- A.IsRowEchelon = ∀ ⦃i₁ i₂ : m⦄, i₁ < i₂ → ∀ ⦃j₂ : n⦄, (∀ j₁ < j₂, A i₁ j₁ = 0) → A i₂ j₂ = 0
Instances For
Leading entries #
theorem Matrix.IsLeadingEntry.row_ne_zero {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [Zero R] [LT n] {i : m} {c : n} (hc : A.IsLeadingEntry i c) :
theorem Matrix.row_ne_zero_iff_exists_isLeadingEntry {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [Zero R] [LT n] [WellFoundedLT n] {i : m} :
theorem Matrix.IsLeadingEntry.unique {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [Zero R] [LinearOrder n] {i : m} {c₁ c₂ : n} (h₁ : A.IsLeadingEntry i c₁) (h₂ : A.IsLeadingEntry i c₂) :
If column indices have a linear order, then there's at most one leading position per row.
@[instance_reducible]
instance Matrix.instDecidableIsLeadingEntryOfDecidableEqOfFintypeOfDecidableLT {m : Type u_1} {n : Type u_2} {R : Type v} [Zero R] [DecidableEq R] [Fintype n] [LT n] [DecidableLT n] (A : Matrix m n R) (i : m) (c : n) :
Decidable (A.IsLeadingEntry i c)
Equations
- A.instDecidableIsLeadingEntryOfDecidableEqOfFintypeOfDecidableLT i c = decidable_of_iff ((∀ j < c, A i j = 0) ∧ A i c ≠ 0) ⋯
Reduced row echelon form #
structure Matrix.IsReducedRowEchelon {m : Type u_1} {n : Type u_2} {R : Type v} [Zero R] [LT m] [LT n] [One R] (A : Matrix m n R) :
A is in reduced row echelon form: it is in row echelon form, each leading entry is
1, and entries above a leading entry vanish (entries below one vanish by
isRowEchelon).
- isRowEchelon : A.IsRowEchelon
Instances For
theorem Matrix.IsReducedRowEchelon.eq_zero_of_ne_of_isLeadingEntry {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [Zero R] [LinearOrder m] [LT n] [One R] {i₁ i₂ : m} {c : n} (hA : A.IsReducedRowEchelon) (hne : i₁ ≠ i₂) (hlead : A.IsLeadingEntry i₂ c) :
If the row indices have a linear order, then every entry in a pivot column vanishes except for the pivot.
Properties of row echelon forms #
theorem Matrix.IsRowEchelon.isUpperTriangular {m : Type u_1} {R : Type v} {A : Matrix m m R} [LT m] [WellFoundedLT m] [Zero R] (hA : A.IsRowEchelon) :
theorem Matrix.IsRowEchelon.det_eq {m : Type u_1} {R : Type v} {A : Matrix m m R} [DecidableEq m] [Fintype m] [LinearOrder m] [CommRing R] (hA : A.IsRowEchelon) :