I've been trying to find the inverse of the matrix \begin{pmatrix}1&0&-2&1&0&0\\ 3&1&-2&0&1&0\\ -5&-1&9&0&0&1\end{pmatrix}
using row reduction, but my process seems to be incorrect. Here are the steps I took:
\begin{pmatrix}1&0&-2&1&0&0\\ 3&1&-2&0&1&0\\ -5&-1&9&0&0&1\end{pmatrix} $\underrightarrow{\begin{gathered}R_{2}-3R_{1}\\ R_{3}+5R_{1}\end{gathered}}$ \begin{pmatrix}1&0&-2&1&0&0\\ 0&1&4&-3&1&0\\ 0&-1&-1&5&0&1\end{pmatrix} $\underrightarrow{R_{3}+R_{2}}$ \begin{pmatrix}1&0&-2&1&0&0\\ 0&1&4&-3&1&0\\ 0&0&3&2&1&1\end{pmatrix} $\underrightarrow{\frac{R_{3}}{3}}$ \begin{pmatrix}1&0&-2&1&0&0\\ 0&1&4&-3&1&0\\ 0&0&1&\frac{2}{3} &\frac{1}{3} &\frac{1}{3} \end{pmatrix} $\underrightarrow{R_{2}+2R_{1}}$ \begin{pmatrix}1&0&-2&1&0&0\\ 0&1&0&-1&1&0\\ 0&0&1&\frac{2}{3} &\frac{1}{3} &\frac{1}{3} \end{pmatrix} $\underrightarrow{R_{1}+2R_{3}}$ \begin{pmatrix}1&0&0&\frac{7}{3} &\frac{2}{3} &\frac{2}{3} \\ 0&1&0&-1&1&0\\ 0&0&1&\frac{2}{3} &\frac{1}{3} &\frac{1}{3} \end{pmatrix}
However, the answer I got for the inverse matrix was incorrect. The correct answer is supposed to be:
$$A^{-1}=\left(\begin{array}{ccc} 7 / 3 & 2 / 3 & 2 / 3 \\ -17 / 3 & -1 / 3 & -4 / 3 \\ 2 / 3 & 1 / 3 & 1 / 3 \end{array}\right)$$
Can anyone help me identify where I went wrong in my row reduction process? Any help would be greatly appreciated!
Your mistake is when you did the operation $R_2 \to R_2 + 2R_1.$ This would introduce a $2$ entry in the $(2,1)$ position (ie. second row, first column), which you don't want. Do the operation $R_2 \to R_2 - 4R_3$ instead.