Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » Matrix » contract(Matrix,Matrix)
next | previous | forward | backward | up | index | toc

contract(Matrix,Matrix) -- contract a matrix by a matrix

Description

The arguments can also be ring elements or vectors.
i1 : R = ZZ[x,y,z]

o1 = R

o1 : PolynomialRing
i2 : f = vars R ** vars R

o2 = | x2 xy xz xy y2 yz xz yz z2 |

             1      9
o2 : Matrix R  <-- R
i3 : contract(transpose vars R, f)

o3 = {1} | x y z y 0 0 z 0 0 |
     {1} | 0 x 0 x y z 0 z 0 |
     {1} | 0 0 x 0 0 y x y z |

             3      9
o3 : Matrix R  <-- R
i4 : contract(x, f)

o4 = | x y z y 0 0 z 0 0 |

             1      9
o4 : Matrix R  <-- R
i5 : contract(y, f)

o5 = | 0 x 0 x y z 0 z 0 |

             1      9
o5 : Matrix R  <-- R
i6 : contract(z, f)

o6 = | 0 0 x 0 0 y x y z |

             1      9
o6 : Matrix R  <-- R

This function is identical to diff(Matrix,Matrix), except that the multiplication by integers that occurs during differentiation is omitted.

See also

Ways to use this method:

  • contract(Matrix,Matrix) -- contract a matrix by a matrix
  • contract(Matrix,Number)
  • contract(Matrix,RingElement)
  • contract(Matrix,Vector)
  • contract(Number,Matrix)
  • contract(Number,Number)
  • contract(Number,RingElement)
  • contract(Number,Vector)
  • contract(RingElement,Matrix)
  • contract(RingElement,Number)
  • contract(RingElement,RingElement)
  • contract(RingElement,Vector)
  • contract(Vector,Matrix)
  • contract(Vector,Number)
  • contract(Vector,RingElement)
  • contract(Vector,Vector)

The source of this document is in Macaulay2Doc/functions/contract-doc.m2:43:0.