| 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)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.