next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: contract(Matrix,Matrix)

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

Synopsis

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