next | previous | forward | backward | up | top | index | toc | Macaulay2 website
RealRoots :: charPoly(Matrix)

charPoly(Matrix)

Synopsis

Description

This computes the characteristic polynomial of M

i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing
i2 : F = {y^2-x^2-1,x-y^2+4*y-2}

         2    2         2
o2 = {- x  + y  - 1, - y  + x + 4y - 2}

o2 : List
i3 : I = ideal F

               2    2         2
o3 = ideal (- x  + y  - 1, - y  + x + 4y - 2)

o3 : Ideal of R
i4 : S = R/I

o4 = S

o4 : QuotientRing
i5 : M = last regularRep(y)

o5 = | 0 0 -3 -2 |
     | 0 0 -1 1  |
     | 0 1 4  0  |
     | 1 0 4  4  |

              4        4
o5 : Matrix QQ  <--- QQ
i6 : charPoly(M)

      4     3      2
o6 = Z  - 8Z  + 19Z  - 16Z + 5

o6 : QQ[Z]