It's been a while since college, but unless somebody specifically asked you to invert the matrix, you don't want to do it. If you're trying to solve a linear set of equations, Gaussian elimination is your best bet. If I remember correctly, Gaussian elimination solves a system in O(n^2), whereas inverting a matrix is O(n^3). So, unless you need to solve a lot of linear equations with the same matrix, but a different right hand side, "go with Gauss".