Characteristic polynomials and the Cayley-Hamilton theorem #
We define characteristic polynomials of matrices and prove the Cayley–Hamilton theorem over arbitrary commutative rings.
See the file Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
for corollaries of this theorem.
Main definitions #
Matrix.charpoly
is the characteristic polynomial of a matrix.
Implementation details #
We follow a nice proof from http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
The "characteristic matrix" of M : Matrix n n R
is the matrix of polynomials $t I - M$.
The determinant of this matrix is the characteristic polynomial.
Equations
- charmatrix M = ↑(Matrix.scalar n) Polynomial.X - ↑(RingHom.mapMatrix Polynomial.C) M
Instances For
The characteristic polynomial of a matrix M
is given by $\det (t I - M)$.
Equations
- Matrix.charpoly M = Matrix.det (charmatrix M)
Instances For
The Cayley-Hamilton Theorem, that the characteristic polynomial of a matrix, applied to the matrix itself, is zero.
This holds over any commutative ring.
See LinearMap.aeval_self_charpoly
for the equivalent statement about endomorphisms.