How to find the inverse of a matrix

What is the inverse of a matrix?

Let AA be a n×nn \times n matrix. We define the inverse matrix of AA if there exists a n×nn \times n matrix BB such that AB=I=BAAB = I = BA. Then we write the inverse BB of AA as A1A^{-1}. We also say that AA is invertible if an inverse matrix of AA exists. Note that not every matrix has an inverse.

Theorem 1. Let AA be n×nn \times n matrix. The matrix AA has an inverse if and only if it has nn pivots.

This theorem is possible the easiest one. It is also quite clear why the matrix needs nn pivots. Take the assumption that this is not true. Then we have at least one zero row, without loss of generality, and take the last row as the zero row. Then it implies that multiplying two matrices will also contain at least one zero row. That is in contradiction with the definition of an inverse because we need AA1=A1A=IAA^{-1} = A^{-1}A = I. Another way to check if the matrix AA has an inverse is by checking its determinant.

Theorem 2. Let AA be n×nn \times n matrix. AA has an inverse if and only if det(A)0\det(A) \neq 0. Few notes to end this part. Let AA be an invertible matrix. AA has only one inverse (so it is unique). Let x,bV\vec{x},\vec{b} \in V, where VV is a vector space, and Ax=bA\vec{x} = \vec{b}. Then Ax=bA\vec{x} = \vec{b} if and only if x=A1b\vec{x} = A^{-1}\vec{b}.

The Gauss-Jordan Method

The Gauss-Jordan Method is the same as Gaus elimination, but then finding the inverse of that specific matrix. To perform the Gaus-Jordan, we need to follow the next steps: Algorithm. Algorithm to find the inverse:
  1. Put the AA in an n×2nn \times 2n block matrix [AI][A | I].
  2. Now perform the Gaus elimination till you get [IA1][I | A^{-1}]. If that fails, then AA has no inverse as it doesn’t have nn pivots.
We will end this by giving an example of performing the Gauss-Jordan Method. [AI]=[A | I] =
[12102101]\begin{bmatrix}\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 2 & 1 & 0 & 1 \end{array} \end{bmatrix}
\sim
[12100321]\begin{bmatrix}\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 0 & 3 & 2 & -1 \end{array} \end{bmatrix}
\sim
[1210012313]\begin{bmatrix}\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 0 & 1 & \frac{2}{3} & -\frac{1}{3} \end{array} \end{bmatrix}
\sim
[101323012313]\begin{bmatrix}\begin{array}{cc|cc} 1 & 0 & -\frac{1}{3} & \frac{2}{3} \\ 0 & 1 & \frac{2}{3} & -\frac{1}{3} \end{array} \end{bmatrix}
=[IA1]= [I | A^{-1}]

When matrices are getting bigger, mistakes can be easily made. But after the calculation with the Gauss-Jordan method, the reader can check if the answer is correct by applying AA1=A1A=IAA^{-1} = A^{-1}A = I. There is a more simple way to find the inverse matrix by using minors, cofactors, and adjugate.