Characteristic polynomials #
We give methods for computing coefficients of the characteristic polynomial.
Main definitions #
Matrix.charpoly_degree_eq_dimproves that the degree of the characteristic polynomial over a nonzero ring is the dimension of the matrixMatrix.det_eq_sign_charpoly_coeffproves that the determinant is the constant term of the characteristic polynomial, up to sign.Matrix.trace_eq_neg_charpoly_coeffproves that the trace is the negative of the (d-1)th coefficient of the characteristic polynomial, where d is the dimension of the matrix. For a nonzero ring, this is the second-highest coefficient.Matrix.coeff_det_one_add_X_smul_eq_sum_minorsproves that the k-th coefficient ofdet (1 + X • M)equals the sum of all k×k principal minors of M.Matrix.charpoly_coeff_eq_sum_minorsexpresses the coefficients of the characteristic polynomial as signed sums of principal minors.Matrix.charpolyRevthe reverse of the characteristic polynomial.Matrix.reverse_charpolycharacterises the reverse of the characteristic polynomial.
See also Matrix.coeff_charpolyRev_eq_neg_trace.
The derivative of det (1 + M X) at 0 is the trace of M.
The first two terms of the Taylor expansion of det (1 + r • M) at r = 0.
Any matrix polynomial p is equivalent under evaluation to p %ₘ M.charpoly; that is, p
is equivalent to a polynomial with degree less than the dimension of the matrix.
Any matrix power can be computed as the sum of matrix powers less than Fintype.card n.
TODO: add the statement for negative powers phrased with zpow.
The reverse of the characteristic polynomial of a matrix.
It has some advantages over the characteristic polynomial, including the fact that it can be extended to infinite dimensions (for appropriate operators). In such settings it is known as the "characteristic power series".
Equations
- M.charpolyRev = (1 - Polynomial.X • M.map ⇑Polynomial.C).det
Instances For
The determinant of the matrix obtained by replacing rows outside s with identity rows
equals the determinant of the principal submatrix indexed by s.
The k-th coefficient of det (1 + X • M) equals the sum of all k×k principal minors of M.
This generalizes coeff_det_one_add_X_smul_one (the k = 1 case, which gives the trace)
and det_eq_sign_charpoly_coeff (the k = n case, which gives the determinant).
The coefficients of the characteristic polynomial are signed sums of principal minors.
Specifically, the (n-k)-th coefficient of the characteristic polynomial of M equals
(-1)^k times the sum of all k×k principal minors of M.