Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I recommend list comprehension to generate the list of equations.

A = matrix(SR,2,2,var('a b c d')) 
x = vector(SR, var('x1 x2'))
y = vector(SR, [x1 + x2, x1-x2])
eqns = [(A*x)[k] == y[k] for k in [0,1]]
show(eqns)
sol = solve(eqns, [a,b,c,d]) 
sol