Skip to main content

Section 1.4 General Solutions

Recall from the previous section that after reducing an augmented matrix to RREF, variables fall into two categories: pivot variables (corresponding to leading entries) and free variables (the remaining variables). The general solution expresses all pivot variables in terms of the free variables, capturing every solution to the system. In this section we practice this process on two concrete examples—one consistent system and one inconsistent system—using elementary row operations on the augmented matrix.

Subsection 1.4.1 Finding the General Solution via Row Reduction

The procedure is always the same:
  1. Form the augmented matrix \([A \mid \mathbf{b}]\text{.}\)
  2. Apply elementary row operations to reach RREF.
  3. Check for consistency: if a row \([0\;0\;\cdots\;0\;|\;c]\) with \(c \neq 0\) appears, the system is inconsistent (no solution).
  4. Otherwise, identify pivot variables and free variables, then read off the general solution.

Example 1.4.1. A Consistent Linear System.

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{.}\)

Example 1.4.2. An Inconsistent Linear System.

Find the general solution of the linear system
\begin{align*} 2x_2+2x_3-2x_4 \amp= 6\\ x_1+3x_2+2x_3-2x_4 \amp= 1\\ 2x_1+3x_2+3x_3+x_4 \amp= 15\\ -x_1+x_3-x_4 \amp= 2 \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 6 \\ 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 2 \amp 3 \amp 3 \amp 1 \amp 15 \\ -1 \amp 0 \amp 1 \amp -1 \amp 2 \end{bmatrix} \end{equation*}
Note that this system has the same coefficient matrix as the previous example; only the right-hand side \(\mathbf{b}\) has changed.
Step 2: Forward elimination.
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 1 \\ 0 \amp 2 \amp 2 \amp -2 \amp 6 \\ 2 \amp 3 \amp 3 \amp 1 \amp 15 \\ -1 \amp 0 \amp 1 \amp -1 \amp 2 \end{bmatrix} \end{equation*}
Eliminate the first column below the pivot:
\begin{equation*} \xrightarrow{-2R_1+R_3} \begin{bmatrix} 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 0 \amp 2 \amp 2 \amp -2 \amp 6 \\ 0 \amp -3 \amp -1 \amp 5 \amp 13 \\ -1 \amp 0 \amp 1 \amp -1 \amp 2 \end{bmatrix} \xrightarrow{R_1+R_4} \begin{bmatrix} 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 0 \amp 2 \amp 2 \amp -2 \amp 6 \\ 0 \amp -3 \amp -1 \amp 5 \amp 13 \\ 0 \amp 3 \amp 3 \amp -3 \amp 3 \end{bmatrix} \end{equation*}
Scale \(R_2\text{,}\) then eliminate the second column below the pivot:
\begin{align*} \xrightarrow{\frac{1}{2}R_2} \amp \begin{bmatrix} 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 0 \amp 1 \amp 1 \amp -1 \amp 3 \\ 0 \amp -3 \amp -1 \amp 5 \amp 13 \\ 0 \amp 3 \amp 3 \amp -3 \amp 3 \end{bmatrix} \xrightarrow{3R_2+R_3} \begin{bmatrix} 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 0 \amp 1 \amp 1 \amp -1 \amp 3 \\ 0 \amp 0 \amp 2 \amp 2 \amp 22 \\ 0 \amp 3 \amp 3 \amp -3 \amp 3 \end{bmatrix}\\ \xrightarrow{-3R_2+R_4} \amp \begin{bmatrix} 1 \amp 3 \amp 2 \amp -2 \amp 1 \\ 0 \amp 1 \amp 1 \amp -1 \amp 3 \\ 0 \amp 0 \amp 2 \amp 2 \amp 22 \\ 0 \amp 0 \amp 0 \amp 0 \amp -6 \end{bmatrix} \end{align*}
Step 3: Detect inconsistency.
The last row reads
\begin{equation*} 0 \cdot x_1 + 0 \cdot x_2 + 0 \cdot x_3 + 0 \cdot x_4 = -6, \end{equation*}
i.e., \(0 = -6\text{,}\) which is a contradiction. No values of \(x_1, x_2, x_3, x_4\) can satisfy this equation.
Conclusion: The system is inconsistent and has no solution.
Geometrically, the four hyperplanes in \(\mathbb{R}^4\) described by these equations have no common point of intersection.

Consistency Test via RREF.

After row reducing the augmented matrix \([A \mid \mathbf{b}]\text{:}\)
  • If a row of the form \([0\;0\;\cdots\;0\;|\;c]\) with \(c \neq 0\) appears, the system is inconsistent (no solution exists).
  • Otherwise the system is consistent. It has a unique solution when there are no free variables, and infinitely many solutions when at least one free variable exists.
The general solution does something remarkable: it captures infinitely many solutions using only finitely many pieces of data. In Example Example 1.4.1, the entire solution set—a line in \(\mathbb{R}^4\) containing infinitely many points—is encoded completely by just two objects: one particular solution vector and one direction vector. This is the power of the vector form
\begin{equation*} \mathbf{x} = \mathbf{x}_p + t\,\mathbf{v}, \quad t \in \mathbb{R}. \end{equation*}
These finite objects are our handle on the infinite: by understanding them, we understand every solution at once.
This reflects a deeper philosophical principle. Infinity is vast and ungraspable directly, yet a finite description—one point, one (or more) direction vectors—can pin it down completely. The free variables are the exact record of how many independent directions of freedom the system leaves open; the particular solution anchors us to one concrete point. Together they make the infinite manageable, transforming an inexhaustible set into something we can write down, reason about, and compute with. This balance between the finite and the infinite runs throughout linear algebra.

Two Birds with One Stone.

Solve the two systems simultaneously:
\begin{equation*} \begin{aligned} x_1+x_2+x_3 \amp=1 \qquad \amp x_1+x_2+x_3 \amp=0\\ x_1+2x_2+4x_3 \amp=0 \qquad \amp x_1+2x_2+4x_3 \amp=1\\ x_1+3x_2+9x_3 \amp=0 \qquad \amp x_1+3x_2+9x_3 \amp=0 \end{aligned} \end{equation*}
Key Observation: Both systems share the same coefficient matrix. Row reduce the doubly-augmented matrix
\begin{equation*} [A\mid\mathbf{b}_1\mid\mathbf{b}_2] = \begin{bmatrix} 1 \amp 1 \amp 1 \amp 1 \amp 0\\ 1 \amp 2 \amp 4 \amp 0 \amp 1\\ 1 \amp 3 \amp 9 \amp 0 \amp 0 \end{bmatrix} \end{equation*}
once to solve both systems at the same time.