Find the general solution of the linear system
\begin{align*}
2x_2+2x_3-2x_4 \amp= 10\\
x_1+3x_2+2x_3-2x_4 \amp= 9\\
2x_1+3x_2+3x_3+x_4 \amp= 5\\
-x_1+x_3-x_4 \amp= 6
\end{align*}
Solution.
Step 1: Write the augmented matrix.
\begin{equation*}
[A\mid\mathbf{b}] =
\begin{bmatrix}
0 \amp 2 \amp 2 \amp -2 \amp 10 \\
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
2 \amp 3 \amp 3 \amp 1 \amp 5 \\
-1 \amp 0 \amp 1 \amp -1 \amp 6
\end{bmatrix}
\end{equation*}
Step 2: Forward elimination to Row Echelon Form.
(2.1) Swap rows to place a nonzero entry in the pivot position:
\begin{equation*}
\xrightarrow{R_1 \leftrightarrow R_2}
\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 2 \amp 2 \amp -2 \amp 10 \\
2 \amp 3 \amp 3 \amp 1 \amp 5 \\
-1 \amp 0 \amp 1 \amp -1 \amp 6
\end{bmatrix}
\end{equation*}
(2.2) Eliminate the first column below the pivot:
\begin{align*}
\xrightarrow{-2R_1+R_3}
\amp\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 2 \amp 2 \amp -2 \amp 10 \\
0 \amp -3 \amp -1 \amp 5 \amp -13 \\
-1 \amp 0 \amp 1 \amp -1 \amp 6
\end{bmatrix}\\
\xrightarrow{R_1+R_4}
\amp \begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 2 \amp 2 \amp -2 \amp 10 \\
0 \amp -3 \amp -1 \amp 5 \amp -13 \\
0 \amp 3 \amp 3 \amp -3 \amp 15
\end{bmatrix}
\end{align*}
(2.3) Scale \(R_2\) to create the next pivot, then eliminate the second column:
\begin{align*}
\xrightarrow{\frac{1}{2}R_2}
\amp \begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 1 \amp 1 \amp -1 \amp 5 \\
0 \amp -3 \amp -1 \amp 5 \amp -13 \\
0 \amp 3 \amp 3 \amp -3 \amp 15
\end{bmatrix}
\xrightarrow{3R_2+R_3}
\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 1 \amp 1 \amp -1 \amp 5 \\
0 \amp 0 \amp 2 \amp 2 \amp 2 \\
0 \amp 3 \amp 3 \amp -3 \amp 15
\end{bmatrix}\\
\xrightarrow{-3R_2+R_4}
\amp\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 1 \amp 1 \amp -1 \amp 5 \\
0 \amp 0 \amp 2 \amp 2 \amp 2 \\
0 \amp 0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{align*}
The zero row confirms the system is consistent and that \(x_1,x_2,x_3\) are pivot variables and \(x_4\) is a free variable.
Scale \(R_3\text{:}\)
\begin{equation*}
\xrightarrow{\frac{1}{2}R_3}
\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 1 \amp 1 \amp -1 \amp 5 \\
0 \amp 0 \amp 1 \amp 1 \amp 1 \\
0 \amp 0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
This is Row Echelon Form.
Step 3: Back elimination to Reduced Row Echelon Form.
Eliminate \(x_3\) from rows above using the pivot in \(R_3\text{:}\)
\begin{equation*}
\xrightarrow{-R_3+R_2}
\begin{bmatrix}
1 \amp 3 \amp 2 \amp -2 \amp 9 \\
0 \amp 1 \amp 0 \amp -2 \amp 4 \\
0 \amp 0 \amp 1 \amp 1 \amp 1 \\
0 \amp 0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\xrightarrow{-2R_3+R_1}
\begin{bmatrix}
1 \amp 3 \amp 0 \amp -4 \amp 7 \\
0 \amp 1 \amp 0 \amp -2 \amp 4 \\
0 \amp 0 \amp 1 \amp 1 \amp 1 \\
0 \amp 0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
Eliminate \(x_2\) from \(R_1\) using the pivot in \(R_2\text{:}\)
\begin{equation*}
\xrightarrow{-3R_2+R_1}
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 2 \amp -5 \\
0 \amp 1 \amp 0 \amp -2 \amp 4 \\
0 \amp 0 \amp 1 \amp 1 \amp 1 \\
0 \amp 0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
This is the RREF.
Step 4: Identify variables and write the general solution.
The pivot columns are 1, 2, 3, so \(x_1, x_2, x_3\) are pivot variables. Column 4 has no pivot, so \(x_4\) is a free variable. Reading from the RREF:
\begin{align*}
x_1 \amp= -5 - 2x_4\\
x_2 \amp= 4 + 2x_4\\
x_3 \amp= 1 - x_4
\end{align*}
Setting \(x_4 = t\) for any \(t \in \mathbb{R}\text{,}\) the general solution in vector form is:
\begin{equation*}
\begin{bmatrix}x_1\\x_2\\x_3\\x_4\end{bmatrix}
=
\begin{bmatrix}-5\\4\\1\\0\end{bmatrix}
+ t
\begin{bmatrix}-2\\2\\-1\\1\end{bmatrix}, \quad t \in \mathbb{R}.
\end{equation*}
The solution set is a line in \(\mathbb{R}^4\text{.}\)
