# Using elementary transformations, find the inverse of the matrix : $\begin{bmatrix} 2 & 0 & -1 \\ 5 & 1 & 0 \\ 0 & 1 & 3 \end{bmatrix}$

Toolbox:
• There are six operations (transformations) on a matrix,three of which are due to rows and three due to columns which are known as elementary operations or transformations.
• Row/Column Switching: Interchange of any two rows or two columns, i.e, $R_i\leftrightarrow R_j$ or $\;C_i\leftrightarrow C_j$
• Row/Column Multiplication: The multiplication of the elements of any row or column by a non zero number: i.e, i.e $R_i\rightarrow kR_i$ where $k\neq 0$ or $\;C_j\rightarrow kC_j$ where $k\neq 0$
• Row/Column Addition:The addition to the element of any row or column ,the corresponding elements of any other row or column multiplied by any non zero number: i.e $R_i\rightarrow R_i+kR_j$ or $\;C_i\rightarrow C_i+kC_j$, where $i \neq j$.
• If A is a matrix such that A$^{-1}$ exists, then to find A$^{-1}$ using elementary row operations, write A = IA and apply a sequence of row operation on A = IA till we get, I = BA. The matrix B will be the inverse of A. Similarly, if we wish to find A$^{-1}$ using column operations, then, write A = AI and apply a sequence of column operations on A = AI till we get, I = AB.
Given:
$A=\begin{bmatrix} 2 & 0 & -1 \\ 5 & 1 & 0 \\ 0 & 1 & 3 \end{bmatrix}$
In order to find the inverse we use row elementary transformation we write A=IA.
$\begin{bmatrix} 2 & 0 & -1 \\ 5 & 1 & 0 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\\0 & 0 &1\end{bmatrix}A$
Step 1:Apply $R_1\rightarrow R_2$
$\begin{bmatrix} 5 & 1 & 0 \\ 2 & 0 & -1 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}0 & 1 & 0\\1 & 0 & 0\\0 & 0 &1\end{bmatrix}A$
Step 2:Apply $R_1\rightarrow R_1-2R_2$
$\begin{bmatrix} 1 & 1 & 2 \\ 2 & 0 & -1 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}-2 & 1 & 0\\1 & 0 & 0\\0 & 0 &1\end{bmatrix}A$
Step 3:Apply $R_2\rightarrow R_2-2R_1$
$\begin{bmatrix} 1 & 1 & 2 \\ 0 & -2 & -5 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}-2 & 1 & 0\\5 & -2 & 0\\0 & 0 &1\end{bmatrix}A$
Step 4:Apply $R_2\rightarrow (-1)R_2$
$\begin{bmatrix} 1 & 1 & 2 \\ 0 & 2 & 5 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}-2 & 1 & 0\\-5 & 2 & 0\\0 & 0 &1\end{bmatrix}A$
Step 5:Apply $R_2\rightarrow R_2-R_3$
$\begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 2 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}-2 & 1 & 0\\-5 & 2 & -1\\0 & 0 &1\end{bmatrix}A$
Step 6:Apply $R_1\rightarrow R_1-R_2$
$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 2 \\ 0 & 1 & 3 \end{bmatrix}=\begin{bmatrix}3 & -1 & 1\\-5 & 2 & -1\\0 & 0 &1\end{bmatrix}A$
Step 7:Apply $R_3\rightarrow R_3-R_2$
$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 2 \\ 0 & 0 & 1 \end{bmatrix}=\begin{bmatrix}3 & -1 & 1\\-5 & 2 & -1\\5 & -2 &2\end{bmatrix}A$
Step 8:Apply $R_2\rightarrow R_2-2R_3$
$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}=\begin{bmatrix}3 & -1 & 1\\-15 & 6 & -5\\5 & -2 &2\end{bmatrix}A$
Step 9:$A^{-1}=\begin{bmatrix}3 & -1 & 1\\-15 & 6 & -5\\5 & -2 &2\end{bmatrix}$