I have this matrix and I want to know is there a method that I can always rely on to get the inverse without much trial and error.
The matrix is; $$ \begin{bmatrix} 1 & 1 & 1\\ 0 & 3 & 1\\ 0 & 2 & -1 \end{bmatrix}. $$
I have this matrix and I want to know is there a method that I can always rely on to get the inverse without much trial and error.
The matrix is; $$ \begin{bmatrix} 1 & 1 & 1\\ 0 & 3 & 1\\ 0 & 2 & -1 \end{bmatrix}. $$
Firstly, never use trial-and-error for finding the inverse of a matrix.
General method: Say you've got a square matrix $A$, of which you want the inverse. to find $A^{-1}, $start with the system $A \vec x=I$ (so start with the augmented matrix $[A \mid I]$, perform suitable row operations until the augmented matrix is in the form $[I \mid A^{-1}]$.
See this very-useful site:
http://www.mathsisfun.com/algebra/matrix-inverse-row-operations-gauss-jordan.html
You can always find the inverse of a matrix $A$, if it exists, using the Gauss-Jordan Algorithm. Start with $[A\,|\,I_n]$ (where $n$ is the dimension of $A$), and apply elementary row operations until you have $[B\,|\,I_n]$.
Then $B=A^{-1}$.
There is absolutely no trial and error involved and also this will tell you if $A$ is not-invertible --- if the reduced form does not contain $n$ pivots then the matrix is not invertible.