Example 1.3. Solve the system by matrix method

\[
\begin{aligned}
& 2 x_{1}-x_{2}+x_{3}=2 \\
& 3 x_{1}+2 x_{2}+2 x_{3}=-2 . \\
& x_{1}-2 x_{2}+x_{3}=1
\end{aligned}
\]
Solution. For the given system

$$
A=\begin{array}{rrr}
2 & -1 & 1 \\
3 & 2 & 2 \\
1 & -2 & 1
\end{array} ; X=\begin{gathered}
x_{1} \\
x_{2} \\
x_{3}
\end{gathered} ; B=-\begin{array}{r}
2 \\
1
\end{array}
$$

To use formula (1.9), we need to find the inverse matrix of matrix $A$. The example shows that the matrix $A^{-1}$ has the form (1.7). Substituting into (1.9), we have:

$$
\begin{aligned}
& \begin{array}{llll}
\frac{6}{5} & -\frac{1}{5} & -\frac{4}{5} & \frac{12+2-4}{5}
\end{array} \\
& \begin{array}{l}
x_{1} \\
x_{2} \\
x_{3}
\end{array}=-\frac{1}{5} \quad \frac{1}{5} \quad-\frac{1}{5} \cdot-2=\frac{-2-2-1}{5}=\begin{array}{c}
2 \\
-1 \\
-3
\end{array} \\
& -\frac{8}{5} \quad \frac{3}{5} \quad \frac{7}{5} \quad \frac{-16-6+7}{5}
\end{aligned}
$$

Answer: $x_{1}=2 ; x_{2}=-1 ; x_{3}=-3$.