Why the Right-Hand Side Must Be Included
A system \(\mathbf{A}\mathbf{x}=\mathbf{b}\) asks whether some combination of the columns of \(\mathbf{A}\), using the entries of \(\mathbf{x}\) as coefficients, equals \(\mathbf{b}\). Row reduction is useful for answering that question, but a row operation changes the equations as they are written. To keep an equivalent system, we must apply the operation to the right-hand side as well as to the coefficient matrix.
Throughout this tutorial, the scalars are real. Suppose \(\mathbf{A}\in\mathbb{R}^{m\times n}\), \(\mathbf{x}\in\mathbb{R}^n\), and \(\mathbf{b}\in\mathbb{R}^m\). The augmented matrix \([\mathbf{A}\mid\mathbf{b}]\) records the coefficients and right-hand sides of the \(m\) equations in \(\mathbf{A}\mathbf{x}=\mathbf{b}\). An elementary row operation on this augmented matrix acts on every entry in a row, including the entry from \(\mathbf{b}\).
Equivalence is about the solutions, not about whether the equations look the same. A row operation may produce different equations, but if the operation is applied to the entire augmented matrix, the new equations impose exactly the same conditions on \(\mathbf{x}\).
The Solution-Preservation Result
Proof. Each row of the augmented matrix represents one equation, and a solution must satisfy every equation. Swapping two rows only changes their order, so the same vectors satisfy all the equations. Multiplying one row by a nonzero scalar \(c\) replaces an equation \(L(\mathbf{x})=d\) with \(cL(\mathbf{x})=cd\). The new equation holds exactly when the old one holds: multiplying by \(c\) preserves equality, and dividing by \(c\ne0\) recovers \(L(\mathbf{x})=d\). Finally, replacing row \(i\) by row \(i\) plus \(c\) times row \(j\) replaces \(L_i(\mathbf{x})=d_i\) by \(L_i(\mathbf{x})+cL_j(\mathbf{x})=d_i+cd_j\). Any solution of the original system satisfies this new equation. Conversely, if the new equation and the unchanged row \(j\) hold, subtracting \(cL_j(\mathbf{x})=cd_j\) recovers \(L_i(\mathbf{x})=d_i\). Thus each operation preserves the solutions in both directions. \(\square\)
The two directions matter. It is not enough that every original solution remains a solution after the operation; we also need every solution of the transformed system to solve the original system. The reverse steps in the proof show why this holds: a row swap can be undone by a swap, a scaling by \(c\ne0\) can be undone by scaling by \(1/c\), and adding \(c\) times another row can be undone by adding \(-c\) times that row.
Proof. After the first operation, the solution set is unchanged by the theorem. The second operation preserves the solution set of the system it acts on, so it also preserves the original solution set. Repeating this reasoning for each operation in the finite sequence shows that the final system has exactly the original solutions. \(\square\)
This result explains why row reduction can answer a question about the original system: each step replaces it with an equivalent system. It does not say that the individual columns of the coefficient matrix stay the same, or that the column space of that matrix stays the same. The right-hand side changes in step with the rows of the coefficient matrix, and it is the solution set of the whole system that is preserved.
Using an Augmented Matrix to Test Membership
The column space \(\operatorname{Col}\mathbf{A}\) is the set of all linear combinations of the columns of \(\mathbf{A}\). If those columns are \(\mathbf{a}_1,\dots,\mathbf{a}_n\), the definition of matrix-vector multiplication gives \(\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\). Thus asking whether \(\mathbf{b}\) belongs to \(\operatorname{Col}\mathbf{A}\) is asking whether there is a solution to \(\mathbf{A}\mathbf{x}=\mathbf{b}\).
Proof. If \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\), then by the definition of column space there are scalars \(x_1,\dots,x_n\) such that \(\mathbf{b}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\). Set \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\). The matrix-vector product is \(\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n=\mathbf{b}\), so the system has a solution. Conversely, if \(\mathbf{A}\mathbf{x}=\mathbf{b}\) for some \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\), then \(\mathbf{b}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\), which is a linear combination of the columns. Therefore \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\). \(\square\)
Combining these results gives a practical test: row-reduce \([\mathbf{A}\mid\mathbf{b}]\), applying every operation across the entire row. If the reduced equations include \(0=c\) for a nonzero \(c\), the system is inconsistent and \(\mathbf{b}\notin\operatorname{Col}\mathbf{A}\). If no such equation occurs, the system has at least one solution, so \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\). The examples show both outcomes and how to check the resulting answer.
Worked Systems
Worked Example: A System with One Solution
Solve \(\mathbf{A}\mathbf{x}=\mathbf{b}\) for \(\mathbf{A}=\begin{bmatrix}1&2\\3&4\end{bmatrix}\) and \(\mathbf{b}=\begin{bmatrix}5\\11\end{bmatrix}\). The augmented matrix is
Replace row 2 by row 2 minus \(3\) times row 1. Then multiply row 2 by \(-\tfrac12\), and replace row 1 by row 1 minus \(2\) times row 2:
The transformed equations give \(x_1=1\) and \(x_2=2\). The row operations preserve solutions, so this is a solution of the original system. Direct substitution checks it: \(\begin{bmatrix}1&2\\3&4\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix}=\begin{bmatrix}1+4\\3+8\end{bmatrix}=\begin{bmatrix}5\\11\end{bmatrix}\).
Worked Example: Detecting a Right-Hand Side Outside the Column Space
Determine whether \(\mathbf{b}=\begin{bmatrix}3\\7\end{bmatrix}\) belongs to the column space of \(\mathbf{A}=\begin{bmatrix}1&2\\2&4\end{bmatrix}\). Row-reduce the augmented matrix by replacing row 2 by row 2 minus \(2\) times row 1:
The second row says \(0x_1+0x_2=1\), or \(0=1\), which no vector \(\mathbf{x}\) can satisfy. The system has no solution, so the column-space membership theorem gives \(\mathbf{b}\notin\operatorname{Col}\mathbf{A}\).
Check: the first column of \(\mathbf{A}\) is \(\begin{bmatrix}1\\2\end{bmatrix}\), and the second is \(\begin{bmatrix}2\\4\end{bmatrix}=2\begin{bmatrix}1\\2\end{bmatrix}\). Every linear combination therefore has the form \(\begin{bmatrix}c\\2c\end{bmatrix}\). The vector \(\begin{bmatrix}3\\7\end{bmatrix}\) is not of this form, since its second entry \(7\) is not twice its first entry \(3\).
Worked Example: A Parameterized Membership Test
For which real values of \(s\) does \(\mathbf{b}=\begin{bmatrix}3\\s\\1\end{bmatrix}\) belong to the column space of \(\mathbf{A}=\begin{bmatrix}1&2\\2&4\\1&1\end{bmatrix}\)? Reduce the augmented matrix. First use \(R_2\to R_2-2R_1\) and \(R_3\to R_3-R_1\):
Swap rows 2 and 3, multiply the new row 2 by \(-1\), then use \(R_1\to R_1-2R_2\):
The last row requires \(0=s-6\). Therefore the system has a solution exactly when \(s=6\), and \(\mathbf{b}\) belongs to \(\operatorname{Col}\mathbf{A}\) exactly for that value. When \(s=6\), the first two rows give \(x_1=-1\) and \(x_2=2\).
Check: \(\mathbf{A}\begin{bmatrix}-1\\2\end{bmatrix}=\begin{bmatrix}-1+4\\-2+8\\-1+2\end{bmatrix}=\begin{bmatrix}3\\6\\1\end{bmatrix}\), which is the target when \(s=6\). For \(s\ne6\), the last row is \(0=s-6\) with a nonzero right-hand side, so there is no solution.
Common Mistake: Changing Only the Coefficient Matrix
A row operation on \(\mathbf{A}\) alone does not preserve the system \(\mathbf{A}\mathbf{x}=\mathbf{b}\). For example, consider \(\begin{bmatrix}1&0\\2&1\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}1\\3\end{bmatrix}\). Its augmented matrix is \(\left[\begin{array}{cc|c}1&0&1\\2&1&3\end{array}\right]\). The correct operation \(R_2\to R_2-2R_1\) gives \(\left[\begin{array}{cc|c}1&0&1\\0&1&1\end{array}\right]\), so the solution is \(\begin{bmatrix}1\\1\end{bmatrix}\).
The wrong calculation applies \(R_2\to R_2-2R_1\) to the coefficient matrix but leaves the right-hand side unchanged. It produces \(\left[\begin{array}{cc|c}1&0&1\\0&1&3\end{array}\right]\), suggesting \(\begin{bmatrix}1\\3\end{bmatrix}\). But substitution into the original system gives \(\begin{bmatrix}1&0\\2&1\end{bmatrix}\begin{bmatrix}1\\3\end{bmatrix}=\begin{bmatrix}1\\5\end{bmatrix}\ne\begin{bmatrix}1\\3\end{bmatrix}\). The error is that the transformed second equation should have right-hand side \(3-2(1)=1\), not \(3\). Always apply row operations to the whole augmented matrix.
Reading the Result Correctly
Row reduction is a test of whether the system has a solution, not a claim that the original columns have stayed fixed during the computation. The distinction is useful: earlier work on span explains what membership asks, while the preservation result explains why row reduction can decide it reliably.
| Reduced equation | Conclusion about the system | Conclusion about column-space membership |
|---|---|---|
| A row \(0= c\) with \(c\ne0\) | No solution | \(\mathbf{b}\notin\operatorname{Col}\mathbf{A}\) |
| No equation of the form \(0=c\) with \(c\ne0\) | At least one solution | \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\) |
| Every variable has a determined value | Exactly one solution | \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\) |
| Some variables are free and the system is consistent | More than one solution | \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\) |
In every case, it is the right-hand side of the transformed system—not the untouched original vector—that must be read alongside the transformed coefficient matrix. The solution-preservation theorem ensures that this paired calculation answers the original question.
Check Your Understanding
For each question, explain how the augmented system or a direct substitution supports your conclusion.
- What happens to the solution set when two equations are swapped? Why?
- Why must a row be multiplied by a nonzero scalar, rather than by zero, for the scaling operation to preserve solutions?
- Does \(\begin{bmatrix}4\\8\end{bmatrix}\) belong to the column space of \(\begin{bmatrix}1&2\\2&4\end{bmatrix}\)? Show the consistency test.
- For which \(t\in\mathbb{R}\) is \(\begin{bmatrix}1\\t\end{bmatrix}\) in the column space of \(\begin{bmatrix}1&1\\1&-1\end{bmatrix}\)?
- In one sentence, identify the error in row-reducing the coefficient matrix while leaving the right-hand side unchanged.