First time here? Check out the FAQ!
answered 8 years ago
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