# How do you find the inverse of A=((1, 2, 3), (0, 1, 4), (0,0,8))?

Jun 6, 2016

${A}^{- 1} = \left(\begin{matrix}1 & - 2 & \frac{5}{8} \\ 0 & 1 & - \frac{1}{2} \\ 0 & 0 & \frac{1}{8}\end{matrix}\right)$

#### Explanation:

Given:

$\left(\begin{matrix}1 & 2 & 3 \\ 0 & 1 & 4 \\ 0 & 0 & 8\end{matrix}\right)$

First add an extra three columns like an identity matrix to form an augmented matrix:

$\left(\begin{matrix}1 & 2 & 3 & \textcolor{b l u e}{1} & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} \\ 0 & 1 & 4 & \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{0} \\ 0 & 0 & 8 & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{1}\end{matrix}\right)$

Then perform a sequence of row operations to make the left hand $3 \times 3$ submatrix look like an identity matrix.

Subtract $2 \times \text{row} 2$ from $\text{row} 1$ to get:

$\left(\begin{matrix}1 & 0 & - 5 & \textcolor{b l u e}{1} & \textcolor{b l u e}{- 2} & \textcolor{b l u e}{0} \\ 0 & 1 & 4 & \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{0} \\ 0 & 0 & 8 & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{1}\end{matrix}\right)$

Divide $\text{row} 3$ by $8$ to get:

$\left(\begin{matrix}1 & 0 & - 5 & \textcolor{b l u e}{1} & \textcolor{b l u e}{- 2} & \textcolor{b l u e}{0} \\ 0 & 1 & 4 & \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{0} \\ 0 & 0 & 1 & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{\frac{1}{8}}\end{matrix}\right)$

Add $5 \times \text{row} 3$ to $\text{row} 1$ to get:

$\left(\begin{matrix}1 & 0 & 0 & \textcolor{b l u e}{1} & \textcolor{b l u e}{- 2} & \textcolor{b l u e}{\frac{5}{8}} \\ 0 & 1 & 4 & \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{0} \\ 0 & 0 & 1 & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{\frac{1}{8}}\end{matrix}\right)$

Subtract $4 \times \text{row} 3$ from $\text{row} 2$ to get:

$\left(\begin{matrix}1 & 0 & 0 & \textcolor{b l u e}{1} & \textcolor{b l u e}{- 2} & \textcolor{b l u e}{\frac{5}{8}} \\ 0 & 1 & 0 & \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{- \frac{1}{2}} \\ 0 & 0 & 1 & \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{\frac{1}{8}}\end{matrix}\right)$

Now the left hand $3 \times 3$ submatrix is an identity matrix, the right hand $3 \times 3$ submatrix gives us our inverse matrix:

$\left(\begin{matrix}\textcolor{b l u e}{1} & \textcolor{b l u e}{- 2} & \textcolor{b l u e}{\frac{5}{8}} \\ \textcolor{b l u e}{0} & \textcolor{b l u e}{1} & \textcolor{b l u e}{- \frac{1}{2}} \\ \textcolor{b l u e}{0} & \textcolor{b l u e}{0} & \textcolor{b l u e}{\frac{1}{8}}\end{matrix}\right)$

This method works for matrices of any size.