Code to calculate characteristic polynomial?

Cool! Seems like something like this 1-line addition to the package would be useful?

AbstractAlgebra.charpoly(A::Matrix) = charpoly(ZZ["x"][1], matrix(ZZ,A))

Then charpoly(A) would work “as expected” out of the box :slight_smile:
(I realize that one might want a different letter than x…)

2 Likes