The *inverse of a matrix*, *A ^{-1}*, is one where the following equation is true:

`$AA^{-1} = A^{-1}A = I$`

This means that the product of a matrix and its inverse (in either order) is equal to the identity matrix.

The inverse matrix is useful in many contexts, one of which includes solving equations with matrices. Imagine we have the following equation:

`$xA = BC$`

If we are trying to solve for *x*, we need to find a way to isolate that variable. Since we cannot divide matrices, we can multiply both right sides of the equation by the inverse of *A*, resulting in the following:

`$xAA^{-1} = BCA^{-1} \rightarrow x = BCA^{-1}$`

An important consideration to keep in mind is that not all matrices have inverses. Those matrices that do not have an inverse are referred to as *singular matrices*.

To find the inverse matrix, we can again use Gauss-Jordan elimination. Knowing that *AA ^{-1} = I*, we can create the augmented matrix [

*A*|

*I*], where we attempt to perform row operations such that [

*A*|

*I*] -> [

*I*|

*A*].

^{-1}One method to find the necessary row operations to convert *A* -> *I* is to start by creating an upper triangular matrix first, and then work on converting the elements above the diagonal afterward (starting from the bottom right side of the matrix). If the matrix is invertible, this should lead to a matrix with elements equal to 0 except along the diagonal. Each row can then be multiplied by a scalar that leads to the diagonal elements equaling 1 to create the identity matrix.

### Instructions

Let’s walk through an example of solving for an inverse matrix.

We have the following matrix:

```
$A = \begin{bmatrix}
0 & 2 & 1 \\
-1 & -2 & 0 \\
-1 & 1 & 2
\end{bmatrix}$
```

We will solve for the inverse matrix by going from the form [ *A* | *I* ] –> [ *I* | *A ^{-1}* ]

Let’s follow along with each step of the animation.

## Step 1

Put system of equations into [*A*|

*I*] form.

## Step 2

Swap row 1 and row 3.## Step 3

Subtract the values of row 1 from the values of row 2 to cancel out the first entry in row 2.## Step 4

Cancel out the first two entries of row 3 by adding 3/2 of each value of row 3 to row 2.## Step 5

Cancel out the second entry of row 1 by adding triple of each value of row 1 to row 2.## Step 6

Cancel out the third entry of row 2 by adding row 3 to -1/4 of each value of row 2.## Step 7

Cancel out the third entry of row 1 by adding row 3 to 1/8 of each value of row 1.## Step 8

Normalize the diagonals. Each value of row 1 is multiplied by -8/3. Each value of row 2 is multiplied by 4/3. Each value of row 3 is multiplied by -2. We are now in [*I*|

*A*] form!

^{-1}The inverse matrix is:

```
$\begin{bmatrix}
-4 & -3 & 2 \\
2 & 1 & -1 \\
-3 & -2 & 2 \\
\end{bmatrix}$
```