Macaulay2 » Documentation
Packages » NumericSolutions :: compMatr
next | previous | forward | backward | up | index | toc

compMatr -- companion matrix

Synopsis

Description

i1 : R = QQ[x,y,z]

o1 = R

o1 : PolynomialRing
i2 : f = x^2+3*y-2*z

      2
o2 = x  + 3y - 2z

o2 : R
i3 : I = ideal(x+3*y^2-2*z, x^2-2*y-z, 3*x-4*y+5*z^2)

              2            2             2
o3 = ideal (3y  + x - 2z, x  - 2y - z, 5z  + 3x - 4y)

o3 : Ideal of R
i4 : M = compMatr(I,f)

o4 = | 0  0  0     0      0    0    0      0    |
     | 0  0  0     3/5    0    -5/3 -26/15 3/5  |
     | 0  5  0     8/3    -4/5 0    3/5    0    |
     | 0  0  -1    0      5    0    0      0    |
     | 0  -1 10/3  -8/15  0    0    -5/3   0    |
     | 5  0  -10/3 -24/5  6/5  0    8/3    -4/5 |
     | 0  0  0     -41/15 0    -1   0      5    |
     | -1 0  -5/3  -14/15 3/5  10/3 -8/15  0    |

            /                     R                    \8     /                     R                    \8
o4 : Matrix |------------------------------------------|  <-- |------------------------------------------|
            |   2            2             2           |      |   2            2             2           |
            \(3y  + x - 2z, x  - 2y - z, 5z  + 3x - 4y)/      \(3y  + x - 2z, x  - 2y - z, 5z  + 3x - 4y)/

See also

Ways to use compMatr :

For the programmer

The object compMatr is a method function.