AngouriMath

Navigation

← Back to list of members

CharacteristicPolynomial​(AngouriMath.​Entity.​Variable)

 Method (no overloads)

Summary

The characteristic polynomial of this square matrix, det(x I - A) in the
variable x, written as a polynomial in it with each coefficient
simplified: for [[a, b], [c, d]] it is x^2 - (a + d) x + a d - b c.
null where the matrix is not square, or where x already occurs in it, since then the polynomial would not be one in x.

Remarks

The monic one: its leading coefficient is 1, the next is minus the trace and
the constant term is (-1)^n det(A). det(A - x I), the other convention,
is (-1)^n times it; the monic one is the one the Cayley–Hamilton theorem and
the minimal polynomial are stated with.
It is the Determinant of x I - A, which divides by nothing: its
entries are polynomials in x and the entries of A, and Bareiss'
elimination and Laplace expansion both leave a polynomial. Gaussian elimination would
leave its pivots, which are polynomials in x, as divisions, and the
characteristic polynomial -- defined everywhere -- would have no value where one of
them vanished. #381

Example

Console.WriteLine(MathS.Matrix(new Entity[,] { { 1, 2 }, { 3, 4 } }).CharacteristicPolynomial("x"));

Prints
x ^ 2 - 5 * x - 2

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online