Systems of Linear Equations and Row Reduction
Before The overview solved a system of 2 equations by elimination. Row reduction does the same work for any size. Builds on: What Is Linear Algebra?
Next Row reduction is the tool behind span, the matrix equation, solution sets, and inverses. Leads to: Vector Equations and the Span · The Matrix Equation Ax = b · Solution Sets of Linear Systems and Free Variables · Matrix Operations and Invertibility
Before You Start: Prerequisite Check
Can you do these? (Click to reveal self-test)
Test yourself on these prerequisite skills:
Algebra: Solve $2x + 3 = 7$ for $x$.
Check
$2x = 4$, so $x = 2$.
Substitution: Evaluate $3x - 2y$ when $x = 2$ and $y = -1$.
Check
$3(2) - 2(-1) = 6 + 2 = 8$.
Solution verification: Is $(x, y) = (1, 2)$ a solution to both $x + y = 3$ and $2x - y = 0$?
Check
$1 + 2 = 3$ (yes) and $2(1) - 2 = 0$ (yes). So $(1, 2)$ is a solution to the system.
If you struggled: Review solving single-variable equations and substitution from precalculus. This topic is the entry point to linear algebra; you need only comfort with basic algebra and arithmetic.
Try This First
Before any matrices or terminology, solve the following problem. Write your two equations, then solve the system.
Two numbers add to 11. The first is 3 more than the second. Find both numbers.
Show Solution
Let $p$ = first number, $q$ = second number.
Equation 1: $p + q = 11$
Equation 2: $p - q = 3$
Add the two equations:
\[ (p + q) + (p - q) = 11 + 3 \implies 2p = 14 \implies p = 7 \]
Then $q = 11 - 7 = 4$.
What you just did: You added one equation to another. That is a row operation. Row reduction is the systematic, generalized version of exactly this process, organized so that a computer, or your own careful hand, can execute it on any size system without guessing.
The Encoding Principle
Any linear system can be encoded as a matrix. Once encoded, three simple operations on the rows, none of which changes the solution set, reduce the matrix to a form where the answer is readable.
This matters because the same encoding works whether the system has two variables or two thousand. The algorithm is the same; only the size changes. Every numerical solver in science, engineering, and data science is built on this idea.
Two facts make this work:
- Encoding: Strip the variable names and write only the coefficients and constants.
- Preservation: Row operations transform the matrix into an equivalent one with the same solution set.
Prerequisite Map
graph LR
subgraph Entry["Entry Point"]
A["Basic<br/>Algebra"]
end
subgraph ThisSkill["This Skill"]
B["Systems and<br/>Row Reduction"]
end
subgraph Unlocks
C["Vector Equations<br/>and Span"]
D["Matrix Equation<br/>Ax = b"]
E["Solution Sets<br/>and Free Variables"]
F["Matrix Operations<br/>and Invertibility"]
end
A --> B
B --> C
B --> D
B --> E
B --> F
style B fill:#d1fae5,stroke:#a565f0,stroke-width:3px
click C "../ch20-sec13/la231-vector-equations-span.html"
click D "../ch20-sec14/la231-matrix-equation-axb.html"
click E "../ch20-sec15/la231-solution-sets-free-variables.html"
click F "../ch20-sec21/la231-matrix-operations-invertibility.html"
Quick Reference
| Property | Value |
|---|---|
| Course | MATH 231 |
| Difficulty | Beginner |
| Time | ~30 minutes |
| Source | Lay, Linear Algebra and Its Applications, Sections 1.1 and 1.2 |
Row Operations at a Glance
| Operation | Notation | What It Does |
|---|---|---|
| Swap two rows | $R_i \leftrightarrow R_j$ | Reorder equations |
| Scale a row | $R_i \to k R_i$, $k \neq 0$ | Multiply an equation by a nonzero constant |
| Replace a row | $R_i \to R_i + k R_j$ | Add a multiple of one equation to another |
All three operations preserve the solution set.
Reading the Result
| What You See in the Final Matrix | What It Means |
|---|---|
| Row $[\,0 \; 0 \; \cdots \; 0 \mid c\,]$ with $c \neq 0$ | No solution (inconsistent) |
| Every column of the coefficient part has a pivot | Unique solution |
| At least one column of the coefficient part has no pivot | Free variable: infinitely many solutions |
Key Concepts
The Augmented Matrix
Given a linear system, the augmented matrix records the coefficients and the constants in a rectangular array. The vertical bar separates the coefficient columns from the constant column. Variable names are dropped; position carries all the information.
\[ \begin{cases} x_1 - 2x_2 + x_3 = 0 \\ 2x_2 - 8x_3 = 8 \\ -4x_1 + 5x_2 + 9x_3 = -9 \end{cases} \longrightarrow \left[\begin{array}{rrr|r} 1 & -2 & 1 & 0 \\ 0 & 2 & -8 & 8 \\ -4 & 5 & 9 & -9 \end{array}\right] \]
The three rows correspond to the three equations. The four columns correspond to $x_1$, $x_2$, $x_3$, and the constant.
Source: Lay, Linear Algebra and Its Applications, Section 1.1: Systems of Linear Equations.
Row Operations
Three operations on the rows of an augmented matrix produce an equivalent system, one with exactly the same solution set:
- Swap two rows: $R_i \leftrightarrow R_j$
- Scale a row by a nonzero constant: $R_i \to k R_i$ where $k \neq 0$
- Replace a row by itself plus a scalar multiple of another: $R_i \to R_i + k R_j$
These correspond exactly to the elimination steps you performed in the opening problem. The matrix is a compact recording of those steps.
Important: Only row operations are allowed. Column operations on the coefficient portion of the matrix reassign which variable corresponds to which column, producing a different system.
Echelon Forms
Row echelon form (REF) requires:
- All zero rows are at the bottom.
- In each nonzero row, the first nonzero entry, called the pivot, lies strictly to the right of the pivot in the row above it.
Reduced row echelon form (RREF) adds:
- Each pivot equals 1.
- Every other entry in a pivot column equals 0 (above and below).
RREF is unique. Every matrix has exactly one RREF, regardless of the sequence of row operations used to reach it.
Row Echelon Form: Reduced Row Echelon Form:
[ 2 5 -1 | 3 ] [ 1 0 0 | 2 ]
[ 0 3 2 | 1 ] -----> [ 0 1 0 | -1 ]
[ 0 0 -4 | 8 ] [ 0 0 1 | 3 ]
Pivot columns 1, 2, 3: unique solution.
Pivot Positions and What They Tell You
A pivot position is the location of a leading entry in a row of an echelon form. A pivot column is any column containing a pivot position.
| Situation | Conclusion |
|---|---|
| Pivot in every row and every variable column | Unique solution |
| Pivot in every row, but at least one free (non-pivot) variable column | Infinitely many solutions |
| A row reads $[\,0 \; 0 \; \cdots \; 0 \mid c\,]$ with $c \neq 0$ | No solution (inconsistent) |
The consistency test: A system is consistent if and only if the augmented column (the rightmost column) does not become a pivot column.
Source: Lay, Linear Algebra and Its Applications, Section 1.2: Row Reduction and Echelon Forms.
The Row Reduction Algorithm
Input: The augmented matrix $[A \mid \mathbf{b}]$.
Forward phase (to REF):
- Find the leftmost column with a nonzero entry. Call this the current pivot column.
- If the top entry of the pivot column is zero, swap the current row with a row below that has a nonzero entry in this column.
- Apply row replacements to create zeros in all positions below the pivot.
- Move down one row. Ignore the rows above and to the left. Repeat steps 1-3 on the remaining submatrix.
Backward phase (to RREF):
- Scale each pivot row so the pivot equals 1.
- Apply row replacements to create zeros in all positions above each pivot.
Worked Example: A Complete Row Reduction
Reduce the system from the Augmented Matrix section to RREF and give the solution.
Start: \[ \left[\begin{array}{rrr|r} 1 & -2 & 1 & 0 \\ 0 & 2 & -8 & 8 \\ -4 & 5 & 9 & -9 \end{array}\right] \]
Step 1. Pivot in column 1 is already $1$ in row 1. Eliminate below: $R_3 \to R_3 + 4R_1$. \[ \left[\begin{array}{rrr|r} 1 & -2 & 1 & 0 \\ 0 & 2 & -8 & 8 \\ 0 & -3 & 13 & -9 \end{array}\right] \]
Step 2. Pivot in column 2 will be $2$ in row 2. Scale: $R_2 \to \frac{1}{2} R_2$. \[ \left[\begin{array}{rrr|r} 1 & -2 & 1 & 0 \\ 0 & 1 & -4 & 4 \\ 0 & -3 & 13 & -9 \end{array}\right] \]
Step 3. Eliminate below the pivot in column 2: $R_3 \to R_3 + 3R_2$. \[ \left[\begin{array}{rrr|r} 1 & -2 & 1 & 0 \\ 0 & 1 & -4 & 4 \\ 0 & 0 & 1 & 3 \end{array}\right] \]
This is REF. Now the backward phase.
Step 4. Use the pivot $1$ in row 3, column 3 to eliminate above: $R_2 \to R_2 + 4R_3$, then $R_1 \to R_1 - R_3$. \[ \left[\begin{array}{rrr|r} 1 & -2 & 0 & -3 \\ 0 & 1 & 0 & 16 \\ 0 & 0 & 1 & 3 \end{array}\right] \]
Step 5. Eliminate above the pivot in column 2: $R_1 \to R_1 + 2R_2$. \[ \left[\begin{array}{rrr|r} 1 & 0 & 0 & 29 \\ 0 & 1 & 0 & 16 \\ 0 & 0 & 1 & 3 \end{array}\right] \]
Solution: $x_1 = 29$, $x_2 = 16$, $x_3 = 3$.
Verify: Row 1: $1(29) - 2(16) + 1(3) = 29 - 32 + 3 = 0$ (correct); Row 2: $2(16) - 8(3) = 32 - 24 = 8$ (correct); Row 3: $-4(29) + 5(16) + 9(3) = -116 + 80 + 27 = -9$ (correct).
Common Pitfalls
| Mistake | Why It Is Wrong | Correct Approach |
|---|---|---|
| Performing a column operation on the coefficient part | Column ops swap or scale variable names, changing the system | Only row operations are legal |
| Stopping at REF when the question asks for RREF | REF still has nonzero entries above pivots | Continue the backward phase until all pivot columns have zeros above and below |
| Assuming a square $n \times n$ system always has a unique solution | A square system can be inconsistent or have free variables | Count pivots; only $n$ pivots in $n$ columns guarantees uniqueness |
| Calling a variable “eliminated” when its column has no pivot | That column is a free variable, not an absent one | Assign it a parameter and write the parametric solution |
| Forgetting to re-translate matrix columns back to variable names | The matrix drops names by design | Column $j$ corresponds to $x_j$; restore the names at the end |
What Happens When You Use a Column Operation
Consider the system $x_1 + x_2 = 2$, $x_1 - x_2 = 0$, with augmented matrix: \[ \left[\begin{array}{rr|r} 1 & 1 & 2 \\ 1 & -1 & 0 \end{array}\right] \]
Legal row operation $R_2 \to R_2 - R_1$: \[ \left[\begin{array}{rr|r} 1 & 1 & 2 \\ 0 & -2 & -2 \end{array}\right] \] This gives $x_2 = 1$, $x_1 = 1$. Correct.
Illegal: swapping columns 1 and 2 (without tracking the swap in a separate column permutation record) silently reassigns which variable is $x_1$ and which is $x_2$. On a small system the error may go unnoticed; on a large system, it produces wrong answers with no visible warning.
Practice Problems
Write the augmented matrix for the following system. Do not perform any row operations.
\[ \begin{cases} 2x_1 - x_2 = 5 \\ x_1 + 3x_2 = 1 \end{cases} \]
Starting from
\[ \left[\begin{array}{rr|r} 2 & -1 & 5 \\ 1 & 3 & 1 \end{array}\right] \]
apply $R_1 \leftrightarrow R_2$ followed by $R_2 \to R_2 - 2R_1$. What does the resulting matrix tell you about the system?
Row-reduce the following augmented matrix to RREF, showing each step, and give the solution.
\[ \left[\begin{array}{rrr|r} 1 & 3 & 4 & 7 \\ 3 & 9 & 7 & 6 \end{array}\right] \]
Before you begin: predict the structure of the solution set. Is this system likely to have a unique solution, no solution, or infinitely many solutions? Why?
Row-reduce the following augmented matrix far enough to determine whether the system is consistent or inconsistent. State your conclusion and the row that justifies it.
\[ \left[\begin{array}{rrr|r} 1 & -3 & 4 & -4 \\ 3 & -7 & 7 & -8 \\ -4 & 6 & -1 & 7 \end{array}\right] \]
The augmented matrix below is already in RREF. Find all solutions. Identify every pivot column and every free variable. Write the solution in parametric vector form and describe the solution set geometrically.
\[ \left[\begin{array}{rrrr|r} 1 & 0 & -5 & 0 & -3 \\ 0 & 1 & 4 & 0 & 6 \\ 0 & 0 & 0 & 1 & 8 \end{array}\right] \]
Challenge: What would happen to the solution set if the entry $8$ in the augmented column were changed to $0$? What if the row were removed entirely?
Common Misconceptions
column operations are permitted alongside row operations. Only the three row operations preserve the solution set. A column swap on the coefficient part silently exchanges two variable names; a column scale changes what that variable represents. On a small problem the error may cancel itself out, but on a larger system it produces wrong values with no indication that anything went wrong. Row operations are the only legal moves.
a square $n \times n$ system always has a unique solution. Square means equal numbers of equations and variables. It does not mean the system is consistent or that every column contains a pivot. A square system can produce a row of all zeros (infinitely many solutions) or a contradictory row (no solution). The number of pivots, not the shape of the matrix, determines the solution structure.
row echelon form and reduced row echelon form are the same thing. REF requires that pivots move to the right as you go down, but it allows nonzero entries above a pivot. RREF additionally requires that every entry above and below each pivot is zero and that each pivot equals 1. REF is useful for checking consistency quickly; RREF is required for reading solutions directly. They are different destinations, not different names for the same thing.
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Mental Model
The Systematic Elimination Machine
Think of the augmented matrix as a table: rows are equations, columns are variables, and entries are coefficients. Row operations are the allowed moves: you can reorder rows, scale a row, or replace a row by a combination of itself and another. Each move preserves everything that matters (the solution set) while changing the appearance of the table.
The forward phase clears below each pivot, building a staircase from the top left. The backward phase clears above each pivot, erasing everything that obscures the answer. When the machine stops, each variable is either pegged to a specific value (pivot column) or left open as a free parameter (non-pivot column).
The deeper point: row operations are equivalences, not approximations. The original system and the RREF system have exactly the same solution set. Algebra is preserved; appearance changes. This is why the algorithm is trustworthy.
Connections
Looking ahead in MATH 231:
- Vector Equations and Span: the question “does $\mathbf{b}$ lie in the span of the columns of $A$?” is answered by row-reducing the augmented matrix $[A \mid \mathbf{b}]$, the same object you built here
- The Matrix Equation $Ax = \mathbf{b}$: matrix-vector multiplication reframes the same problem as a column combination; row reduction answers it
- Solution Sets and Free Variables: the parametric vector form from Level 5 becomes the systematic language for all solution sets
Real-world connections:
- Every circuit analysis based on Kirchhoff’s laws produces a linear system; row reduction solves it.
- Structural engineering load calculations produce systems of tens or hundreds of equations; computers apply the same algorithm.
- Data fitting by least squares requires solving a system of normal equations whose structure is governed by the pivot count.
Source: Lay, Linear Algebra and Its Applications, Section 1.1: Systems of Linear Equations; Section 1.2: Row Reduction and Echelon Forms.
| Previous | Up | Next |
|---|---|---|
| MATH231 Skills Index | Vector Equations and Span |
Last updated: 2026-06-16
Watch and Read
- Lynch, MATH 231 lecture playlists (YouTube)Recorded MATH 231 lectures at EWU. Use them to see each topic worked through in a full class session.