Answer
The solution is,
$x=2,y=-1,z=3$
Work Step by Step
Consider the given equation system
$\begin{align}
& x-2y+z=7 \\
& 2x+y-z=0 \\
& 3x+2y-2z=-2
\end{align}$
Therefore, in matrix form, the system of equations can be written as
$AX=b$
Where
$A=\left[ \begin{array}{*{35}{r}}
1 & -2 & 1 \\
2 & 1 & -1 \\
3 & 2 & -2 \\
\end{array} \right];b=\left[ \begin{array}{*{35}{r}}
7 \\
0 \\
-2 \\
\end{array} \right];X=\left[ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right]$
Therefore, using Cramer’s rule, the solution of the system of equations is
$x=\frac{\left| {{A}_{x}} \right|}{\left| A \right|},y=\frac{\left| {{A}_{y}} \right|}{\left| A \right|},z=\frac{\left| {{A}_{z}} \right|}{\left| A \right|}$
Where
${{A}_{x}}=\left[ \begin{array}{*{35}{r}}
7 & -2 & 1 \\
0 & 1 & -1 \\
-2 & 2 & -2 \\
\end{array} \right],{{A}_{y}}=\left[ \begin{array}{*{35}{r}}
1 & 7 & 1 \\
2 & 0 & -1 \\
3 & -2 & -2 \\
\end{array} \right],{{A}_{z}}=\left[ \begin{array}{*{35}{r}}
1 & -2 & 7 \\
2 & 1 & 0 \\
3 & 2 & -2 \\
\end{array} \right]$
Consider the determinant of the matrix
$\begin{align}
& \left| A \right|=\left| \begin{array}{*{35}{r}}
1 & -2 & 1 \\
2 & 1 & -1 \\
3 & 2 & -2 \\
\end{array} \right| \\
& =\left( -2+2 \right)+2\times \left( -4+3 \right)+\left( 4-3 \right) \\
& =0-2+1 \\
& =-1
\end{align}$
It can be further solved as below:
$\begin{align}
& \left| {{A}_{x}} \right|=\left| \begin{array}{*{35}{r}}
7 & -2 & 1 \\
0 & 1 & -1 \\
-2 & 2 & -2 \\
\end{array} \right| \\
& =7\left( -2+2 \right)+2\left( 0-2 \right)+\left( 0+2 \right) \\
& =0-4+2 \\
& =-2
\end{align}$
$\begin{align}
& \left| {{A}_{y}} \right|=\left| \begin{array}{*{35}{r}}
1 & 7 & 1 \\
2 & 0 & -1 \\
3 & -2 & -2 \\
\end{array} \right| \\
& =\left( 0-2 \right)-7\left( -4+3 \right)+\left( -4-0 \right) \\
& =-2+7-4 \\
& =1
\end{align}$
$\begin{align}
& \left| {{A}_{z}} \right|=\left| \begin{array}{*{35}{r}}
1 & -2 & 7 \\
2 & 1 & 0 \\
3 & 2 & -2 \\
\end{array} \right| \\
& =\left( -2-0 \right)+2\left( -4-0 \right)+7\left( 4-3 \right) \\
& =-2-8+7 \\
& =-3
\end{align}$
Therefore, the solution of the system of equations is
$\begin{align}
& x=\frac{-2}{-1}=2 \\
& y=\frac{1}{-1}=-1 \\
& z=\frac{-3}{-1}=3
\end{align}$
The solutions are, $x=2,y=-1,z=3$.