Given a set of linear equations, say
2 A[2] + 3 A[3] == 4 5 A[1] + 7 A[2] == 6
How do I program Mathematica to get the matrix
{{0,2,3},{5,7,0}}
and the vector
{4,6}
?
Thank you!
In[2]:= Normal[CoefficientArrays[{2 A[2] + 3 A[3] == 4, 5 A[1] + 7 A[2] == 6}, {A[1], A[2], A[3]}]] Out[2]= {{-4, -6}, {{0, 2, 3}, {5, 7, 0}}}