\begin{equation*}
A=
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 \\
-2 & -3 & 0 & -5 & -1 \\
1 & 1 & 0 & 2 & 1 \\
-2 & -3 & -1 & -3 & -2 \\
-1 & -3 & -1 & -3 & 1
\end{bmatrix}
\end{equation*}
For its inverse, we desire a matrix
\(B\) so that
\(AB=I_5\text{.}\) Emphasizing the structure of the columns and employing the definition of matrix multiplication (
Definition MM), we have
\begin{align*}
AB&=I_5\\
A\lbrack \vect{B}_1|\vect{B}_2|\vect{B}_3|\vect{B}_4|\vect{B}_5]&=[\vect{e}_1|\vect{e}_2|\vect{e}_3|\vect{e}_4|\vect{e}_5\rbrack\\
\lbrack A\vect{B}_1|A\vect{B}_2|A\vect{B}_3|A\vect{B}_4|A\vect{B}_5]&=[\vect{e}_1|\vect{e}_2|\vect{e}_3|\vect{e}_4|\vect{e}_5\rbrack\text{.}
\end{align*}
Equating the matrices column-by-column we have
\begin{align*}
A\vect{B}_1=\vect{e}_1&&
A\vect{B}_2=\vect{e}_2&&
A\vect{B}_3=\vect{e}_3&&
A\vect{B}_4=\vect{e}_4&&
A\vect{B}_5=\vect{e}_5\text{.}
\end{align*}
Since the matrix \(B\) is what we are trying to compute, we can view each column, \(\vect{B}_i\text{,}\) as a column vector of unknowns in a linear system of equations. Then we have five systems of equations to solve, each with 5 equations in 5 variables. Notice that all 5 of these systems have the same coefficient matrix. We will now solve each system in turn.Row-reduce the augmented matrix of the linear system \(\linearsystem{A}{\vect{e}_1}\text{,}\)
\begin{align*}
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 & 1\\
-2 & -3 & 0 & -5 & -1 & 0\\
1 & 1 & 0 & 2 & 1 & 0\\
-2 & -3 & -1 & -3 & -2 & 0\\
-1 & -3 & -1 & -3 & 1 & 0
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & 0 & 0 & -3\\
0 & \leading{1} & 0 & 0 & 0 & 0\\
0 & 0 & \leading{1} & 0 & 0 & 1\\
0 & 0 & 0 & \leading{1} & 0 & 1\\
0 & 0 & 0 & 0 & \leading{1} & 1
\end{bmatrix}
;
\vect{B}_1=\colvector{-3\\0\\1\\1\\1}
\end{align*}
Row-reduce the augmented matrix of the linear system \(\linearsystem{A}{\vect{e}_2}\text{,}\)
\begin{align*}
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 & 0\\
-2 & -3 & 0 & -5 & -1 & 1\\
1 & 1 & 0 & 2 & 1 & 0\\
-2 & -3 & -1 & -3 & -2 & 0\\
-1 & -3 & -1 & -3 & 1 & 0
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & 0 & 0 & 3\\
0 & \leading{1} & 0 & 0 & 0 & -2\\
0 & 0 & \leading{1} & 0 & 0 & 2\\
0 & 0 & 0 & \leading{1} & 0 & 0\\
0 & 0 & 0 & 0 & \leading{1} & -1
\end{bmatrix}
;
\vect{B}_2=\colvector{3\\-2\\2\\0\\-1}
\end{align*}
Row-reduce the augmented matrix of the linear system \(\linearsystem{A}{\vect{e}_3}\text{,}\)
\begin{align*}
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 & 0\\
-2 & -3 & 0 & -5 & -1 & 0\\
1 & 1 & 0 & 2 & 1 & 1\\
-2 & -3 & -1 & -3 & -2 & 0\\
-1 & -3 & -1 & -3 & 1 & 0
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & 0 & 0 & 6\\
0 & \leading{1} & 0 & 0 & 0 & -5\\
0 & 0 & \leading{1} & 0 & 0 & 4\\
0 & 0 & 0 & \leading{1} & 0 & 1\\
0 & 0 & 0 & 0 & \leading{1} & -2
\end{bmatrix}
;
\vect{B}_3=\colvector{6\\-5\\4\\1\\-2}
\end{align*}
Row-reduce the augmented matrix of the linear system \(\linearsystem{A}{\vect{e}_4}\text{,}\)
\begin{align*}
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 & 0\\
-2 & -3 & 0 & -5 & -1 & 0\\
1 & 1 & 0 & 2 & 1 & 0\\
-2 & -3 & -1 & -3 & -2 & 1\\
-1 & -3 & -1 & -3 & 1 & 0
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & 0 & 0 & -1\\
0 & \leading{1} & 0 & 0 & 0 & -1\\
0 & 0 & \leading{1} & 0 & 0 & 1\\
0 & 0 & 0 & \leading{1} & 0 & 1\\
0 & 0 & 0 & 0 & \leading{1} & 0
\end{bmatrix}
;
\vect{B}_4=\colvector{-1\\-1\\1\\1\\0}
\end{align*}
Row-reduce the augmented matrix of the linear system \(\linearsystem{A}{\vect{e}_5}\text{,}\)
\begin{align*}
\begin{bmatrix}
1 & 2 & 1 & 2 & 1 & 0\\
-2 & -3 & 0 & -5 & -1 & 0\\
1 & 1 & 0 & 2 & 1 & 0\\
-2 & -3 & -1 & -3 & -2 & 0\\
-1 & -3 & -1 & -3 & 1 & 1
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & 0 & 0 & -2\\
0 & \leading{1} & 0 & 0 & 0 & 1\\
0 & 0 & \leading{1} & 0 & 0 & -1\\
0 & 0 & 0 & \leading{1} & 0 & 0\\
0 & 0 & 0 & 0 & \leading{1} & 1
\end{bmatrix}
;
\vect{B}_5=\colvector{-2\\1\\-1\\0\\1}
\end{align*}
We can now collect our 5 solution vectors into the matrix \(B\text{,}\)
\begin{align*}
B=
&[\vect{B}_1|\vect{B}_2|\vect{B}_3|\vect{B}_4|\vect{B}_5]\\
=&
\left[\colvector{-3\\0\\1\\1\\1}
\left\lvert\colvector{3\\-2\\2\\0\\-1}\right.
\left\lvert\colvector{6\\-5\\4\\1\\-2}\right.
\left\lvert\colvector{-1\\-1\\1\\1\\0}\right.
\left\lvert\colvector{-2\\1\\-1\\0\\1}\right.
\right]
=
\begin{bmatrix}
-3 & 3 & 6 & -1 & -2 \\
0 & -2 & -5 & -1 & 1 \\
1 & 2 & 4 & 1 & -1 \\
1 & 0 & 1 & 1 & 0 \\
1 & -1 & -2 & 0 & 1
\end{bmatrix}\text{.}
\end{align*}
By this method, we know that
\(AB=I_5\text{.}\) Check that
\(BA=I_5\text{,}\) and then we will know that we have the inverse of
\(A\text{.}\)