Macaulay2 » Documentation
Packages » DeterminantalRepresentations :: coeffMatrices
next | previous | forward | backward | up | index | toc

coeffMatrices -- gets coefficient matrices for a matrix of linear forms

Synopsis

Description

Given a linear matrix pencil $M = I_d + x_1A_1 + ... + x_nA_n$, this method returns the list of matrices $A_1, ..., A_n$.

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

o1 = R

o1 : PolynomialRing
i2 : M = id_(R^3) + random(R^3,R^{3:-1})

o2 = | 9/2x+1/2y+9/4z+1 7/9x+7/10y+1/2z 2/3x+y+2z    |
     | 1/2x+y+3/4z      7/10x+7/3y+7z+1 6x+5/4y+2/9z |
     | 3/2x+3/4y+7/4z   3/7x+5/2y+6/7z  5x+3/10y+z+1 |

             3      3
o2 : Matrix R  <-- R
i3 : coeffs = coeffMatrices M

o3 = {{1} | 9/2 7/9  2/3 |, {1} | 1/2 7/10 1    |, {1} | 9/4 1/2 2   |}
      {1} | 1/2 7/10 6   |  {1} | 1   7/3  5/4  |  {1} | 3/4 7   2/9 |
      {1} | 3/2 3/7  5   |  {1} | 3/4 5/2  3/10 |  {1} | 7/4 6/7 1   |

o3 : List
i4 : M - sum(#gens R, i -> R_i*coeffs#i)

o4 = | 1 0 0 |
     | 0 1 0 |
     | 0 0 1 |

             3      3
o4 : Matrix R  <-- R

Caveat

This method does not return the constant term, or coefficients of terms of degree $> 1$.

Ways to use coeffMatrices :

For the programmer

The object coeffMatrices is a method function.