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

Feb 11, 2016

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

#### Explanation:

You can take your matrix $A$ and put the identity matrix $I$ next to it:

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

Your goal is to transform the matrix at the left side into the identity matrix.
If you perform the same operations on the identity matrix at your right side, you will get the inverse matrix at the right.

$\left(A | I\right) \to \ldots \to \left(I | {A}^{- 1}\right)$

Let's start.

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

... swap rows $I$ and $I I I$ (reason: it's easier to have a $1$ than a $3$ in the first column, first row):

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ 1 & - 1 & 2 & | & 0 & 1 & 0 \\ 3 & 1 & 0 & | & 1 & 0 & 0\end{matrix}\right)$

... eliminate the $1$ in the first column, second row by computing $\left(- 1\right) \cdot I + I I \to \textcolor{b l u e}{I I}$:

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

... eliminate the $3$ in the first column, third row by computing $\left(- 3\right) \cdot I + I I I \to \textcolor{\mathmr{and} a n \ge}{I I I}$:

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ 0 & - 2 & 1 & | & 0 & 1 & - 1 \\ \textcolor{\mathmr{and} a n \ge}{0} & \textcolor{\mathmr{and} a n \ge}{- 2} & \textcolor{\mathmr{and} a n \ge}{- 3} & | & \textcolor{\mathmr{and} a n \ge}{1} & \textcolor{\mathmr{and} a n \ge}{0} & \textcolor{\mathmr{and} a n \ge}{- 3}\end{matrix}\right)$

... eliminate the $- 2$ in the second column, third row by computing $\left(- 1\right) \cdot I I + I I I \to \textcolor{g r e e n}{I I I}$:

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ 0 & - 2 & 1 & | & 0 & 1 & - 1 \\ \textcolor{g r e e n}{0} & \textcolor{g r e e n}{0} & \textcolor{g r e e n}{- 4} & | & \textcolor{g r e e n}{1} & \textcolor{g r e e n}{- 1} & \textcolor{g r e e n}{- 2}\end{matrix}\right)$

... create a $1$ in the third row, third column by multiplying $\left(- \frac{1}{4}\right) \cdot I I I \to \textcolor{red}{I I I}$

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ 0 & - 2 & 1 & | & 0 & 1 & - 1 \\ \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{1} & | & \textcolor{red}{- \frac{1}{4}} & \textcolor{red}{\frac{1}{4}} & \textcolor{red}{\frac{1}{2}}\end{matrix}\right)$

The third row is ready. Now, let's take care of the second row:
First of all, create a $1$ in the second row, second column by computing $\left(- \frac{1}{2}\right) \cdot I I \to \textcolor{g r a y}{I I}$:

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ \textcolor{g r a y}{0} & \textcolor{g r a y}{1} & \textcolor{g r a y}{- \frac{1}{2}} & | & \textcolor{g r a y}{0} & \textcolor{g r a y}{- \frac{1}{2}} & \textcolor{g r a y}{\frac{1}{2}} \\ 0 & 0 & 1 & | & - \frac{1}{4} & \frac{1}{4} & \frac{1}{2}\end{matrix}\right)$

... eliminate the $- \frac{1}{2}$ in the second row, third column by computing $\frac{1}{2} \cdot I I I + I I \to \textcolor{p u r p \le}{I I}$:

$\Rightarrow \left(\begin{matrix}1 & 1 & 1 & | & 0 & 0 & 1 \\ \textcolor{p u r p \le}{0} & \textcolor{p u r p \le}{1} & \textcolor{p u r p \le}{0} & | & \textcolor{p u r p \le}{- \frac{1}{8}} & \textcolor{p u r p \le}{- \frac{3}{8}} & \textcolor{p u r p \le}{\frac{3}{4}} \\ 0 & 0 & 1 & | & - \frac{1}{4} & \frac{1}{4} & \frac{1}{2}\end{matrix}\right)$

The second row is now also ready. There are two more operations left to take care of the first row:
... eliminate the $1$ in the first row, second column by computing $\left(- 1\right) \cdot I I + I \to \textcolor{b r o w n}{I}$:

$\Rightarrow \left(\begin{matrix}\textcolor{b r o w n}{1} & \textcolor{b r o w n}{0} & \textcolor{b r o w n}{1} & | & \textcolor{b r o w n}{\frac{1}{8}} & \textcolor{b r o w n}{\frac{3}{8}} & \textcolor{b r o w n}{\frac{1}{4}} \\ 0 & 1 & 0 & | & - \frac{1}{8} & - \frac{3}{8} & \frac{3}{4} \\ 0 & 0 & 1 & | & - \frac{1}{4} & \frac{1}{4} & \frac{1}{2}\end{matrix}\right)$

Last but not least, eliminate the $1$ in the first rown, third column by computing $\left(- 1\right) \cdot I I I + I \to \textcolor{l i g h t g r e e n}{I}$:

$\Rightarrow \left(\begin{matrix}\textcolor{l i g h t g r e e n}{1} & \textcolor{l i g h t g r e e n}{0} & \textcolor{l i g h t g r e e n}{0} & | & \textcolor{l i g h t g r e e n}{\frac{3}{8}} & \textcolor{l i g h t g r e e n}{\frac{1}{8}} & \textcolor{l i g h t g r e e n}{- \frac{1}{4}} \\ 0 & 1 & 0 & | & - \frac{1}{8} & - \frac{3}{8} & \frac{3}{4} \\ 0 & 0 & 1 & | & - \frac{1}{4} & \frac{1}{4} & \frac{1}{2}\end{matrix}\right)$

Thus, the result of the computation is

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

and the inverse matrix is:

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

To validate the result, you can compute $A \cdot {A}^{- 1}$ or ${A}^{- 1} \cdot A$. Both computations should have the identity matrix $I$ as a result.