Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 2013-02-12 00:21:34 -0500

DSM gravatar image

Alternatively, you can use the Matrix constructor:

sage: s = (a,b,c)
sage: Matrix(ZZ, 3, lambda i, j: v[i].coeff(s[j]))
[ 1 -1  0]
[ 0  1 -1]
[-1  0  1]

Alternatively, you can use the Matrix constructor:

sage: s = (a,b,c)
var("a b c")
sage: v = vector([a-b, b-c, c-a])
sage: Matrix(QQ, [v.derivative(x) for x in (a,b,c)]).T
[ 1 -1  0]
[ 0  1 -1]
[-1  0  1]
sage: Matrix(ZZ, 3, lambda i, j: v[i].coeff(s[j]))
[ 1 -1  0]
[ 0  1 -1]
[-1  0  1]

etc., depending on your v. I can't seem to find a Sage-side function which'll just do it.