Given matrices m : F0 <--- F1, and n : G0 <--- G1, produce a matrix with the shape diff(m,n) : F0' ** G0 <--- F1' ** G1, whose entry in the slot ((i,j),(k,l)) is the result of differentiating n_(j,l) by the differential operator corresponding to m_(i,k).
If m or n is a ring element, then it is interpreted as a one-by-one matrix. If m is a vector, it is interpreted as a matrix with one column, and if n is a vector, it is interpreted as a matrix with one row. If both m and n are ring elements, then the result will be a ring element rather than a one-by-one matrix. If m is a vector and n is a ring element, then the result will be a vector rather than a matrix with one column.
i1 = R = ZZ/101[a..d]
o1 = R
o1 : PolynomialRing
i2 = m = genericMatrix(R,a,2,2)
o2 = | a c |
| b d |
2 2
o2 : Matrix R <--- R
i3 = diff(transpose m,m*m)
o3 = | 2a c c 0 |
| b 0 a+d c |
| b a+d 0 c |
| 0 b b 2d |
4 4
o3 : Matrix R <--- R
The most common usage of this function is when m : F <--- R^1 and n : R^1 <--- G. In this case the result is a matrix with shape diff(m,n) : F' <--- G, and the (i,j) th entry is the result of differentiating n_j by the differential operator corresponding to m_i.
i4 = m = matrix {{a,b,c,d}}
o4 = | a b c d |
1 4
o4 : Matrix R <--- R
i5 = n = matrix {{a^2, (b + c)*(a + d), a*b*c}}
o5 = | a2 ab+ac+bd+cd abc |
1 3
o5 : Matrix R <--- R
i6 = p = diff(transpose m,n)
o6 = | 2a b+c bc |
| 0 a+d ac |
| 0 a+d ab |
| 0 b+c 0 |
4 3
o6 : Matrix R <--- R
i7 = target p
4
o7 = R
R - module, free
i8 = source p
3
o8 = R
R - module, free
As another example, we show how to compute the Wronskian of a polynomial f.
i9 = R = ZZ/101[a, x .. z]
o9 = R
o9 : PolynomialRing
i10 = f = matrix {{x^3 + y^3 + z^3 - a*x*y*z}}
o10 = | -axyz+x3+y3+z3 |
1 1
o10 : Matrix R <--- R
i11 = v = matrix {{x,y,z}}
o11 = | x y z |
1 3
o11 : Matrix R <--- R
i12 = W = diff(transpose v * v, f)
o12 = | 6x -az -ay |
| -az 6y -ax |
| -ay -ax 6z |
3 3
o12 : Matrix R <--- R
i13 = Wf = minors(3,W)
o13 = ideal | -2a3xyz-6a2x3-6a2y3-6a2z3+14xyz |
o13 : Ideal
See also contract and jacobian.
Go to main index.
Go to concepts index.