2

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}. $$

  • $A^{-1} = \dfrac{1}{\det A} \text{adj} A$ where $\text{adj}$ is the transpose of the cofactor matrix. – Nigel Overmars Jun 17 '14 at 14:19
  • @NigelOvermars The problem with this is if you are finding, for example, the inverse of a $4\times 4$ matrix, you will have to find SIXTEEN $3\times3$ determinants. – JP McCarthy Jun 17 '14 at 14:21
  • 1
    @JpMcCarthy Agreed. For much larger (square) matrices, it's far more efficient to use Gaussian elimination. – beep-boop Jun 17 '14 at 14:22
  • @JpMcCarthy I know, but you were asking for a reliable method, not a quick one. – Nigel Overmars Jun 17 '14 at 14:23
  • 1
    @NigelOvermars The first word in the title of the question. :P – beep-boop Jun 17 '14 at 14:23
  • 1
    @alexqwx Damn, you're right. My mistake. I'll keep the comment just for some diversity. When dealing with $3 \times 3$ matrices I prefer the method I gave. Obviously, for larger matrices one needs the Gauss-Jordan algorithm. – Nigel Overmars Jun 17 '14 at 14:25
  • 1
    @NigelOvermars For $2 \times 2$ matrices, your method is definitely the best. For $3 \times 3$ ones, I'd say it's a tie. But for $n \times n$ matrices, where $n>3$, Gaussian elimination is quicker. – beep-boop Jun 17 '14 at 14:27

2 Answers2

1

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

beep-boop
  • 11,595
0

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.

JP McCarthy
  • 8,420