Finding the Inverse of a Matrix using Row Operations

inverselinear algebramatrices

Problem:
Let $A$ be the following matrix. Find $A^{-1}$.
$$ \begin{bmatrix}
-1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{bmatrix} $$

Answer:
\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
4 & 5 & 6 & 0 & 1 & 0 \\
7 & 8 & 9 & 0 & 0 & 1 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13 & 18 & 4 & 1 & 0 \\
0 & 22 & 30 & 7 & 0 & 1 \\
\end{bmatrix} \\
\end{align*}

Now I multiply the second row by $-22$ and the third row by $13$.
\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13(-22) & 18(-22) &- 88 & -22 & 0 \\
0 & 22(13) & 390 & 91 & 0 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13(-22) & 18(-22) &- 88 & -22 & 0 \\
0 & 0 & 390 – 18(22) & 91 – 88 & -22 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & -396 & -88 & -22 & 0 \\
0 & 0 & -6 & 3 & -22 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & -396 & -88 & -22 & 0 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

Now we multiply the third row by $396$ and add it to the second row.
\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & 0 & -88 -198 & -22 + \frac{396(11)}{2} & -\frac{396(13)}{6} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & 0 & -286 & 2156 & -858 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 1 & 0 & 1 & -\dfrac{2156}{286} & \dfrac{858}{286} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & \dfrac{66}{13} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

Now we need to work on the first row.
\begin{align*}
\begin{bmatrix}
-1 & 0 & 3 & 1 & \dfrac{2(98)}{13} & \dfrac{-2(66)}{13} \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & \dfrac{66}{13} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 0 & 3 & 1 & \dfrac{196}{13} & -\dfrac{132}{13} \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & \dfrac{66}{13} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

I have reason to believe the correct answer is:
$$ \begin{bmatrix}
-\dfrac{1}{2} & 1 & -\dfrac{1}{2} \\
1 & -5 & 3 \\
-\dfrac{1}{2} & \dfrac{11}{3} & -\dfrac{13}{6} \\
\end{bmatrix} $$

As such I am confident I made a mistake. Where did I go wrong?

Based upon the feed back I got I updated my solution. Here is an updated but still wrong solution.

\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
4 & 5 & 6 & 0 & 1 & 0 \\
7 & 8 & 9 & 0 & 0 & 1 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13 & 18 & 4 & 1 & 0 \\
0 & 22 & 30 & 7 & 0 & 1 \\
\end{bmatrix} \\
\end{align*}

Now I multiply the second row by $-22$ and the third row by $13$.
\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13(-22) & 18(-22) &- 88 & -22 & 0 \\
0 & 22(13) & 390 & 91 & 0 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 13(-22) & 18(-22) &- 88 & -22 & 0 \\
0 & 0 & 390 – 18(22) & 91 – 88 & -22 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & -396 & -88 & -22 & 0 \\
0 & 0 & -6 & 3 & -22 & 13 \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & -396 & -88 & -22 & 0 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

Now we multiply the third row by $396$ and add it to the second row.
\begin{align*}
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & 0 & -88 -198 & -22 + \frac{396(11)}{2} & -\frac{396(13)}{6} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & -286 & 0 & -286 & 2156 & -858 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 1 & 0 & 1 & -\dfrac{2156}{286} & \dfrac{858}{286} \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
-1 & 2 & 3 & 1 & 0 & 0 \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & 3 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

Now we need to work on the first row.
\begin{align*}
\begin{bmatrix}
-1 & 0 & 3 & -1 & -\dfrac{ 98}{26} & -6 \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & 3 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
1 & 0 & -3 & 1 & \dfrac{ 49}{13} & 6 \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & 3 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
1 & 0 & 0 & 1 -\frac{3}{2} & \dfrac{ 49}{13} + 3 & 6 – \frac{3(13)}{6} \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & 3 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\begin{bmatrix}
1 & 0 & 0 & -\frac{1}{2} & 9 & – \frac{1}{2} \\
0 & 1 & 0 & 1 & -\dfrac{98}{13} & 3 \\
0 & 0 & 1 & -\frac{1}{2} & \frac{11}{3} & -\frac{13}{6} \\
\end{bmatrix} \\
\end{align*}

Where did I go wrong?

Best Answer

Edited answer: Firstly, in the step 'first we multiply the second row by 396...', the second last entry should be $-22 + 396 (\frac{11}{3})$ (rather than $\frac{11}{2}$).

Then, after this, there was the error that I pointed out in my first answer: $\frac{858}{286} = 3$, rather than $\frac{66}{13}$.

This should sort it out.