Why Row Operations Are Useful
A system of linear equations can be recorded in a matrix, so calculations on its rows provide a compact way to organize calculations on the equations. For a system with \(m\) equations and \(n\) unknowns, its coefficient matrix has \(m\) rows and \(n\) columns: each row contains the coefficients from one equation. The augmented matrix includes one additional column containing the right-hand-side constants. For example, the system \(x+2y=5\), \(3x-y=4\) has coefficient matrix \(\begin{bmatrix}1&2\\3&-1\end{bmatrix}\) and augmented matrix \(\begin{bmatrix}1&2&5\\3&-1&4\end{bmatrix}\).
An elementary row operation changes one or more rows according to a specific rule. When working with a coefficient matrix, the operation acts on its coefficient entries. When working with an augmented matrix, it acts on the entire selected row, including its right-hand-side entry. Keeping this distinction in view prevents a frequent error: treating the last column as though it were exempt from the operation.
The scalar field here is \(\mathbb{R}\), so the multiplier \(c\) may be any real number subject to the stated conditions. For a row replacement, \(c\) may be zero; in that case the row does not change. By contrast, a row scaling requires \(c\ne0\). The two row indices in a row replacement must be different: the operation uses row \(j\) to update row \(i\), leaving row \(j\) as it was.
Row Swaps
A row swap exchanges the complete contents of two rows. It can be useful when a desired row is not in the position where you need it. In an augmented matrix, the constant must move with its equation; swapping only the coefficients would mix up which constant belongs to which equation.
Worked Example: Swapping the Equations
Consider the system \(x+2y=5\), \(3x-y=4\). Its coefficient matrix and augmented matrix are
Interchange rows 1 and 2. The coefficient matrix becomes
Applying the same swap to the augmented matrix exchanges the constants along with the coefficients:
Check: swapping the rows a second time returns \(\begin{bmatrix}1&2&5\\3&-1&4\end{bmatrix}\). In particular, the first row after the swap is \(3x-y=4\), so the constant \(4\) has stayed with its original equation.
Nonzero Row Scalings
To scale a row, multiply every entry in it by the same nonzero number. This includes a right-hand-side constant when the matrix is augmented. Scaling by a fraction is allowed, and it can make entries easier to work with. The requirement \(c\ne0\) matters: if \(c=0\), the original row is erased, and the operation cannot be undone by multiplying by a reciprocal.
Worked Example: Scaling an Augmented Row
For the system \(2x-y=3\), \(4x+3y=11\), the coefficient and augmented matrices are
Scale row 1 by \(\tfrac12\). In the coefficient matrix this gives
In the augmented matrix, each entry of row 1, including \(3\), is multiplied by \(\tfrac12\):
Check: scale the new first row by \(2\). Its entries become \(2\), \(-1\), and \(3\), recovering the original first row. The inverse operation therefore returns the original augmented matrix exactly.
Row Replacements
In a row replacement, a multiple of one row is added to a different row. The source row remains unchanged, while every entry of the target row is updated. The same addition must be carried out across the whole row. Choosing the multiplier appropriately can produce a zero in a coefficient position, but the operation itself is defined whether or not it produces a zero.
Worked Example: Adding a Multiple of One Row to Another
Take the three equations \(x-y=2\), \(2x+y=5\), and \(-3x+4y=1\). Their coefficient matrix and augmented matrix are
Apply \(R_3\to R_3+2R_1\). For the coefficient matrix, row 3 changes entry by entry: \(-3+2(1)=-1\) and \(4+2(-1)=2\). Thus
For the augmented matrix, the same calculation also updates the constant in row 3: \(1+2(2)=5\). The result is
Check: subtract twice the unchanged row 1 from the new row 3: \((-1,2,5)-2(1,-1,2)=(-3,4,1)\). This recovers the original third row, including its constant.
Reversing Each Operation
Undoing a row operation provides a direct way to check the arithmetic. A swap undoes itself. A nonzero scaling by \(c\) is undone by scaling by \(1/c\). A replacement \(R_i\to R_i+cR_j\) is undone by \(R_i\to R_i-cR_j\), because row \(j\) was not changed. These inverse operations act on coefficient and augmented matrices in the same way as the original operations.
Proof. Let the original matrix be any matrix with the rows involved in the operation. If the operation is a swap \(R_i\leftrightarrow R_j\), swapping \(R_i\) and \(R_j\) again restores both rows to their original positions, and all other rows were unchanged. If the operation is a scaling \(R_i\to cR_i\), its hypothesis gives \(c\ne0\); scaling that row by \(1/c\) gives \((1/c)(cR_i)=R_i\), and leaves every other row unchanged. If the operation is a replacement \(R_i\to R_i+cR_j\) with \(i\ne j\), row \(j\) is unchanged. Replacing the updated row by \(R_i-cR_j\) therefore gives \((R_i+cR_j)-cR_j=R_i\), while all other rows remain unchanged. These cases cover all three operations and prove the claim. \(\square\)
This result gives a simple checking procedure for a sequence of row operations. Record each operation, then undo them in reverse order: reverse the last operation first, and continue until the first. If the original matrix is recovered, the sequence passes this arithmetic check. This checks that the matrix calculations were performed and recorded consistently; deciding what a row operation implies about a system’s solutions is a separate question.
Common Pitfalls
Leaving the constant unchanged when scaling an augmented row. In the scaling example, a mistaken calculation might change the first row of the augmented matrix from \((2,-1,3)\) to \((1,-\tfrac12,3)\), multiplying the coefficients by \(\tfrac12\) but leaving the constant at \(3\). That is not the result of \(R_1\to \tfrac12R_1\). The corrected row is \((1,-\tfrac12,\tfrac32)\), since \(\tfrac12(2,-1,3)=(1,-\tfrac12,\tfrac32)\).
Updating the source row during a replacement. In \(R_3\to R_3+2R_1\), row 1 is the source and must remain as it was. If a calculation changes row 1 as well, it has performed a different operation. The replacement example can be checked by confirming that the first two rows are unchanged and that subtracting twice row 1 from the new row 3 recovers the original row 3.
Scaling by zero is not an allowed row scaling. The expression \(R_i\to0R_i\) replaces row \(i\) by a zero row, and no scaling can recover the original nonzero row from it. This is why the definition requires a nonzero multiplier. Row replacement, in contrast, allows any real multiplier; when that multiplier is zero, the target row is simply unchanged.
A Reliable Calculation Routine
Before carrying out a row operation, identify the target row and, when needed, the source row. Then apply the operation to every entry in the target row; for an augmented matrix, include the right-hand-side column. Finally, check the result using the inverse operation. Keeping these steps separate makes it easier to locate an arithmetic error and makes the written row-operation notation an accurate record of the calculation.
For example, specify \(R_3\to R_3+2R_1\), not merely “combine rows.”
For a replacement, add the stated multiple of the source entry to each target entry, including the constant if the matrix is augmented.
A swap changes the two named rows; a scaling changes one; a replacement changes its target row only.
Use the same swap, reciprocal scaling, or opposite replacement multiplier and confirm that the original row or rows return.
Check Your Understanding
For each question, write the row operation explicitly and check the resulting rows.
- Apply \(R_1\leftrightarrow R_2\) to \(\begin{bmatrix}1&3&7\\2&-1&4\end{bmatrix}\). What operation returns the original matrix?
- Apply \(R_2\to -\tfrac12R_2\) to \(\begin{bmatrix}2&1&5\\4&-6&8\end{bmatrix}\). Include the constant column.
- Apply \(R_3\to R_3-3R_1\) to \(\begin{bmatrix}1&2&4\\0&1&3\\5&-1&2\end{bmatrix}\), then verify by reversing the replacement.
- Why is \(R_1\to 0R_1\) not one of the permitted nonzero row scalings?
- A student scales the coefficient entries of an augmented row by \(2\) but leaves its constant unchanged. Explain what is wrong and state the correct rule.