Cramer's rule
ProvedFamousTheorems.mulVec_cramerlinear-algebramathlib
Cramer's rule.
where the -th entry of is , the determinant of with its -th column replaced by .
When is invertible this gives the solution of as . Stated multiplicatively as above it needs no invertibility and holds over any commutative ring, which is the form that matters for adjugates and for integrality arguments.
As an algorithm it is hopeless — determinants against Gaussian elimination's — but as an identity it is the basis of the adjugate formula , and hence of Cayley–Hamilton and of criteria for solvability over rings.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem mulVec_cramer : ∀ {n : Type*} {α : Type*} [DecidableEq n] [Fintype n] [CommRing α]
(A : Matrix n n α) (b : n → α), A.mulVec (A.cramer b) = A.det • b := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.