# Finding the Inverse of a Matrix

There are different methods for determining the inverse of a matrix, including using an augmented matrix and row operations, using technology, and using a formula that includes calculating the reciprocal of the difference of the diagonals.
An augmented matrix is formed from two given matrices by writing the columns of the first matrix to the left of a vertical line and the columns of the second matrix to the right of the vertical line. To determine the inverse of a square matrix $A$, start by augmenting $A$ with the identity matrix of the same dimensions.
$A= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}\hspace{40pt}I =\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Matrix $A$ augmented with $I$ is:
$\left[\begin{array}{rrr|rrr}2&0&4&1&0&0\\ -3&2&3&0&1&0\\ -2&1&2&0&0&1\\ \end{array}\right]$
Next, perform a series of operations on the rows of the augmented matrix. Row operations are operations that can be performed on a row of an augmented matrix to generate an equivalent matrix.

Matrix row operations:

1. Switch any two rows.
2. Multiply a row by a nonzero number.
3. Replace a row with the sum or difference of two rows.

The goal of performing row operations on the augmented matrix is to transform it into reduced row-echelon form, a form in which the left side is the identity matrix. When the augmented matrix is in this form, the right side will be the inverse of matrix $A$.

Step-By-Step Example
Finding the Inverse of a Matrix Using Row Operations
Use an augmented matrix and row operations to determine the inverse of matrix $A$.
$A= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Step 1
Augment the given matrix with the identity matrix.
$\left[\begin{array}{rrr|rrr}2&0&4&1&0&0\\ -3&2&3&0&1&0\\ -2&1&2&0&0&1\\ \end{array}\right]$
Step 2
Begin to use row operations to transform the left side of the augmented matrix into the identity matrix. Get 1 as the first entry in row 1 by multiplying the first row by $\frac{1}{2}$.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] -3&2&3&0&1&0\\[0.5em] -2&1&2&0&0&1\\ \end{array}\right]$
Step 3
Get zeros as the first entries in rows 2 and 3. Multiply row 1 by 3, and then add the result to row 2.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 1\cdot 3+(-3)&0\cdot 3+2&2\cdot 3+3&\frac{1}{2}\cdot 3+0&0\cdot 3+1&0\cdot 3+0\\[0.5em] -2&1&2&0&0&1\\ \end{array}\right]$
Replace row 2 with the sum.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&2&9&\frac{3}{2}&1&0\\[0.5em]-2&1&2&0&0&1\\ \end{array}\right]$
Multiply row 1 by 2, and then add the result to row 3.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&2&9&\frac{3}{2}&1&0\\[0.5em]1\cdot 2+(-2)&0\cdot 2+1&2\cdot 2+2&\frac{1}{2}\cdot 2+0&0\cdot 2+0&0\cdot 2+1\\ \end{array}\right]$
Replace row 3 with the sum.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&2&9&\frac{3}{2}&1&0\\[0.5em] 0&1&6&1&0&1\\ \end{array}\right]$
Step 4
Get 1 as the second entry in row 2. Switch rows 2 and 3.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&1&6&1&0&1\\[0.5em] 0&2&9&\frac{3}{2}&1&0\\ \end{array}\right]$
Step 5
Get zeros as the second entries in rows 1 and 3. The second entry in row 1 is already zero. Multiply row 2 by –2, and then add the result to row 3.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&1&6&1&0&1\\[0.5em] 0\cdot (-2)+0&1\cdot (-2)+2&6\cdot (-2)+9&1\cdot (-2)+\frac{3}{2}&0\cdot (-2)+1&1\cdot (-2)+0\\ \end{array}\right]$
Replace row 3 with the sum.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em]0&1&6&1&0&1\\[0.5em] 0&0&-3&-\frac{1}{2}&1&-2 \end{array}\right]$
Step 6

Get 1 as the third entry in the third column.

Multiply each entry in row 3 by $-\frac{1}{3}$.
$\left[\begin{array}{rrr|rrr}1&0&2&\frac{1}{2}&0&0\\[0.5em] 0&1&6&1&0&1\\[0.5em] 0&0&1&\frac{1}{6}&-\frac{1}{3}&\frac{2}{3} \end{array}\right]$
Step 7
Get zero as the third entry in rows 1 and 2. Multiply row 3 by –2, and then add the result to row 1.
$\left[\begin{array}{rrr|rrr}0\cdot (-2)+1&0\cdot (-2)+0&1\cdot (-2)+2&\frac{1}{6}\cdot (-2)+\frac{1}{2}&-\frac{1}{3}\cdot (-2)+0&\frac{2}{3}\cdot (-2)+0\\[0.5em] 0&1&6&1&0&1\\[0.5em] 0&0&1&\frac{1}{6}&-\frac{1}{3}&\frac{2}{3} \end{array}\right]$
Replace row 1 with the sum.
$\left[\begin{array}{rrr|rrr}1&0&0&\frac{1}{6}&\frac{2}{3}&-\frac{4}{3}\\[0.5em] 0&1&6&1&0&1\\[0.5em] 0&0&1&\frac{1}{6}&-\frac{1}{3}&\frac{2}{3} \end{array}\right]$
Multiply row 3 by –6, and then add the result to row 2.
$\left[\begin{array}{rrr|rrr}1&0&0&\frac{1}{6}&\frac{2}{3}&-\frac{4}{3}\\[0.5em] 0\cdot (-6)+0&0\cdot (-6)+1&1\cdot (-6)+6&\frac{1}{6}\cdot (-6)+1&-\frac{1}{3}\cdot (-6)+0&\frac{2}{3}\cdot (-6)+1\\[0.5em] 0&0&1&\frac{1}{6}&-\frac{1}{3}&\frac{2}{3} \end{array}\right]$
Replace row 2 with the sum.
$\left[\begin{array}{rrr|rrr}1&0&0&\frac{1}{6}&\frac{2}{3}&-\frac{4}{3}\\[0.5em] 0&1&0&0&2&-3\\[0.5em] 0&0&1&\frac{1}{6}&-\frac{1}{3}&\frac{2}{3} \end{array}\right]$
Solution
$A^{-1}=\begin{bmatrix}\frac{1}{6}&\phantom{-}\frac{2}{3}&-\frac{4}{3}\\[0.5em]0&\phantom{-}2&-3\\[0.5em] \frac{1}{6}&-\frac{1}{3}&\phantom{-}\frac{2}{3}\end{bmatrix}$
A graphing calculator, a spreadsheet, or other mathematical software can also be used to find the inverse of a matrix. Using technology is a good way to check that the inverse of a matrix determined using other methods is correct.
Step-By-Step Example
Finding the Inverse of a Matrix Using Technology
Use technology to identify the inverse of matrix $B$.
$B= \begin{bmatrix} \phantom{-}1 & -5 & 2 \\ \phantom{-}2 & \phantom{-}0 & 4 \\ -3 & \phantom{-}1 & 6 \end{bmatrix}$
Step 1
First, enter the matrix into the calculator or software. Be sure to provide the correct dimensions of the matrix.
Step 2
Calculate the inverse by selecting the matrix and raising it to the -1 power. A calculator will often provide the inverse in decimal form first. Note that some software will have other ways to calculate the inverse matrix.
$B^{-1}\approx \begin{bmatrix} -0.0333333 & 0.2666667 & -0.1666667 \\ -0.2 & 0.1 & \phantom{-}0 \\ \phantom{-}0.0166667 & 0.1166667 & \phantom{-}0.0833333 \end{bmatrix}$
Solution
Convert the decimals to fractions.
$B^{-1}= \begin{bmatrix} -\frac{1}{30} & \frac{4}{15} & -\frac{1}{6} \\[0.5em] -\frac{1}{5} & \frac{1}{10} & \phantom{-}0 \\[0.5em] \phantom{-}\frac{1}{60} & \frac{7}{60} & \phantom{-}\frac{1}{12} \end{bmatrix}$
A formula can be used to find the inverse of a $2\times 2$ matrix $C$.
$C=\begin{bmatrix} a & b \\ c & d \end{bmatrix}\hspace{20pt}C^{-1}=\frac{1}{ad-bc}\begin{bmatrix} \phantom{-}d & -b \\ -c & \phantom{-}a \end{bmatrix}$
The denominator of the scalar in the formula is equal to the difference of the products of the diagonals of $C$. If the scalar is undefined, then $C$ has no inverse.
Step-By-Step Example
Determining the Inverse of a Matrix Using a Formula
Determine the inverse of matrix $C$.
$C=\begin{bmatrix} 2 & 5 \\ 3 & 9 \end{bmatrix}$
Step 1
First, use the general form of a $2\times2$ matrix to identify the values of $a$, $b$, $c$, and $d$.
$C=\begin{bmatrix} a & b \\ c & d \end{bmatrix}$
$a=2$, $b=5$, $c=3$, and $d=9$.
Step 2
Substitute values into the formula.
\begin{aligned}C^{-1}&=\frac{1}{ad-bc}\begin{bmatrix} \phantom{-}d & -b \\ -c & \phantom{-}a \end{bmatrix}\\C^{-1}&=\frac{1}{2(9)-5(3)}\begin{bmatrix} \phantom{-}9 & -5 \\ -3 & \phantom{-}2 \end{bmatrix}\end{aligned}
Step 3
Simplify the scalar, or real number.
$C^{-1}=\frac{1}{3}\begin{bmatrix} \phantom{-}9 & -5 \\ -3 & \phantom{-}2 \end{bmatrix}$
Step 4
Multiply each entry in the matrix by the scalar.
$C^{-1}=\begin{bmatrix} \phantom{-}3 & -\frac{5}{3} \\[0.5em] -1 & \phantom{-}\frac{2}{3} \end{bmatrix}$
Solution
The inverse of matrix $C$ is:
$C^{-1}=\begin{bmatrix} \phantom{-}3 & -\frac{5}{3} \\[0.5em] -1 & \phantom{-}\frac{2}{3} \end{bmatrix}$