Question: How to convert a system of symbolic equations into matrix form ?

November 12 2011 awehring 55
Maple 15

I'm looking for a simple way, e.g. a function, to convert a system of symbolic equations in its matrix form.


(a+1)x - by + cz = j

2x  + (sqrt(d)+e)y - fz = k

(g-h2+1)x - iy - 4z = l

shall be transferred to matrix / vector form

A . x = b

where A i the matrix of the coefficients, x i the vector of the variables (x,y,z), and b is the right-hand-side vector (j,k,l).

The number of equations / variables is low; the names of the variables are not fixed.

Mapple can calculate the solution of the equations directly, of course, but I need the transformation for educational purposes. A kind of automatism would make my life easier.

Thanks !

Please Wait...