The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.Echelon.Basic
12 declarations. Mathlib docs · Source
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
Leading entries
Reduced row echelon form
Properties of row echelon forms
def Matrix.IsRowEchelon E3 #
{m : Type u_1} → {n : Type u_2} → {R : Type v} → [Zero R] → [LT m] → [LT n] → Matrix m n R → Prop
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₂.
theorem Matrix.IsRowEchelon.row_eq_zero_of_lt E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [inst : Zero R] [inst_1 : LT m] [inst_2 : LT n]
{i₁ i₂ : m}, A.IsRowEchelon → i₁ < i₂ → A i₁ = 0 → A i₂ = 0
In an echelon matrix, rows below a zero row are zero.
def Matrix.IsLeadingEntry E3 #
{m : Type u_1} → {n : Type u_2} → {R : Type v} → [Zero R] → [LT n] → Matrix m n R → m → n → Prop
c is the leading position of row i.
theorem Matrix.IsLeadingEntry.row_ne_zero E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [inst : Zero R] [inst_1 : LT n] {i : m} {c : n},
A.IsLeadingEntry i c → A i ≠ 0
theorem Matrix.row_ne_zero_iff_exists_isLeadingEntry E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [inst : Zero R] [inst_1 : LT n] [WellFoundedLT n]
{i : m}, A i ≠ 0 ↔ ∃ c, A.IsLeadingEntry i c
theorem Matrix.IsLeadingEntry.unique E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} {A : Matrix m n R} [inst : Zero R] [inst_1 : LinearOrder n] {i : m}
{c₁ c₂ : n}, A.IsLeadingEntry i c₁ → A.IsLeadingEntry i c₂ → c₁ = c₂
If column indices have a linear order, then there's at most one leading position per row.
instance Matrix.instDecidableIsLeadingEntryOfDecidableEqOfFintypeOfDecidableLT E0 #
{m : Type u_1} →
{n : Type u_2} →
{R : Type v} →
[inst : Zero R] →
[DecidableEq R] →
[Fintype n] →
[inst_3 : LT n] →
[DecidableLT n] → (A : Matrix m n R) → (i : m) → (c : n) → Decidable (A.IsLeadingEntry i c)
structure Matrix.IsReducedRowEchelon E3 #
{m : Type u_1} → {n : Type u_2} → {R : Type v} → [Zero R] → [LT m] → [LT n] → [One R] → Matrix m n R → Prop
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).
ctor Matrix.IsReducedRowEchelon.mk E0 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} [inst : Zero R] [inst_1 : LT m] [inst_2 : LT n] [inst_3 : One R]
{A : Matrix m n R},
A.IsRowEchelon →
(∀ ⦃i : m⦄ ⦃c : n⦄, A.IsLeadingEntry i c → A i c = 1) →
(∀ ⦃i₁ i₂ : m⦄ ⦃c : n⦄, i₁ < i₂ → A.IsLeadingEntry i₂ c → A i₁ c = 0) → A.IsReducedRowEchelon
theorem Matrix.IsReducedRowEchelon.isRowEchelon E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type v} [inst : Zero R] [inst_1 : LT m] [inst_2 : LT n] [inst_3 : One R]
{A : Matrix m n R}, A.IsReducedRowEchelon → A.IsRowEchelon
theorem Matrix.IsRowEchelon.isUpperTriangular E1 #
∀ {m : Type u_1} {R : Type v} {A : Matrix m m R} [inst : LT m] [WellFoundedLT m] [inst_2 : Zero R],
A.IsRowEchelon → A.IsUpperTriangular
theorem Matrix.IsRowEchelon.det_eq E0 #
∀ {m : Type u_1} {R : Type v} {A : Matrix m m R} [inst : DecidableEq m] [inst_1 : Fintype m] [inst_2 : LinearOrder m]
[inst_3 : CommRing R], A.IsRowEchelon → A.det = ∏ i, A i i