next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
diff > diff(RingElement,Matrix)

diff(RingElement,Matrix) -- differentiate each entry of a matrix

Synopsis

Description

The shape of the resulting matrix is the same as the shape of f, but the degrees of the source module are different in an attempt to ensure that the result is homogeneous.
i1 : R = QQ[x,y,z];
i2 : f = matrix{{x^2-y*z, x*y*z + z^4}, {x-1, 2*y^2+z^2-1}}

o2 = | x2-yz z4+xyz   |
     | x-1   2y2+z2-1 |

             2       2
o2 : Matrix R  <--- R
i3 : diff(x,f)

o3 = | 2x yz |
     | 1  0  |

             2       2
o3 : Matrix R  <--- R
i4 : diff(x^2-y*z,f)

o4 = | 3 -x |
     | 0 0  |

             2       2
o4 : Matrix R  <--- R

See also