We first express the system of equations as a single matrix equation,
Since there are as many equations (rows in ) as there are variables (columns in ), will be a square matrix. If there is a solution to this set of equations, then there will exist another matrix such that , where is the identity matrix. In that case,
There are algorithmic methods for finding (and thus ; in our case we’ll be using standard libraries to calculate this matrix and the corresponding solution. One standard method is to have the computer calculate directly using an “invert()” function, and then multiply that inverse matrix by to obtain .
Most computational packages that have the ability to calculate also have an additional function, often called “solve()”, that takes care of the multiplication as well, and gives the user directly.
For more information about how these functions work, see Numerical Recipes in C by Flannery, Teukolsky, Press, and Vetterling, or similar text.