Gauss's method preserves the solution set
ProvedHefferonLinAlg.gauss_row_operations_preserve_solutionsgaussian-eliminationlinear-algebralinear-systems
Let be an matrix over a field , let , and let be an matrix whose determinant is a unit, so that is invertible. Then a vector satisfies if and only if it satisfies . Each of Gauss's three elementary row operations — swapping two rows, scaling a row by a nonzero constant, and adding a multiple of one row to another — is left multiplication by such an invertible , so this is the statement that row reduction carries a linear system to an equivalent one.
Preamble
import Mathlib open Matrix
Formal statement
namespace HefferonLinAlg
theorem gauss_row_operations_preserve_solutions
{K : Type*} [Field K] {m n : ℕ}
(A : Matrix (Fin m) (Fin n) K) (b : Fin m → K)
(M : Matrix (Fin m) (Fin m) K) (hM : IsUnit M.det) (x : Fin n → K) :
A *ᵥ x = b ↔ (M * A) *ᵥ x = M *ᵥ b := by
sorry
end HefferonLinAlgSource
Jim Hefferon, *Linear Algebra*, Saint Michael's College, 2020 printing, Chapter One, Section I.1, Theorem 1.5, p. 12