Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm not aware of anything easy, although someone might suggest a shorter method using a polynomial ring. Here is what I've cooked up:

var('x y z')
eqs = [3*x+2*y+z == -4, 2*x-3*y+5*z==2,7*x+2*y-3*z==0]
lhs = map(lambda a: a.lhs(),eqs)
m=[]
for leftside in lhs:
    m.append(map(lambda w: w.subs(x=1,y=1,z=1),leftside.operands()))
M=matrix(m)