Lesson 2: Gaussian Elimination and Row Echelon Form
Estimated time: 35 to 45 minutes
Learning Objectives
By the end of this lesson, you will be able to:
- Define row echelon form (REF) and identify pivots
- Apply Gaussian elimination (forward elimination) to reach REF
- Solve a system by back substitution from REF
- Handle systems with 2 and 3 unknowns
Row Echelon Form (REF)
Gaussian elimination transforms an augmented matrix into a specific shape called row echelon form. Once in this form, the system can be solved easily by back substitution.
Row Echelon Form (REF): A matrix is in row echelon form if:
- All rows of all zeros are at the bottom.
- The first nonzero entry (the pivot or leading entry) in each nonzero row is to the right of the pivot in the row above.
- All entries below a pivot are zero.
Pivot: The first nonzero entry in each row of a row echelon form. Pivots mark the "staircase" pattern descending from left to right.
Example: Matrices in REF
This matrix IS in row echelon form (pivots shown with *):
[ 0 *2 1 | 3 ]
[ 0 0 *4 | 8 ]
Notice the staircase: each pivot is to the right of and below the previous one, with zeros below each pivot.
This matrix is NOT in REF:
[ 2 1 | 7 ]
The entry below the first pivot (the 2 in row 2, column 1) is not zero.
The Gaussian Elimination Algorithm
The algorithm works left to right, top to bottom, creating zeros below each pivot:
Gaussian Elimination Steps
- Find the pivot: In the leftmost column that has a nonzero entry, find the topmost nonzero entry. Swap rows if necessary to move it to the current pivot row.
- Create zeros below the pivot: For each row below the pivot row, use row replacement to make the entry in the pivot column equal to zero.
- Move to the next pivot position: Move one row down and one column right. Repeat from step 1.
- Stop when all rows below are processed or all remaining rows are zero.
Worked Example: Full 3x3 Gaussian Elimination
Solve the system:
2x + 5y + 3z = 23
-x + y + 2z = 5
Step 1: Write the augmented matrix.
[ 2 5 3 | 23 ]
[-1 1 2 | 5 ]
Step 2: Eliminate below pivot in column 1.
R_2 - 2R_1 → R_2: [2-2, 5-4, 3-2 | 23-18] = [0, 1, 1 | 5]
R_3 + R_1 → R_3: [-1+1, 1+2, 2+1 | 5+9] = [0, 3, 3 | 14]
[ 0 1 1 | 5 ]
[ 0 3 3 | 14 ]
Step 3: Eliminate below pivot in column 2.
R_3 - 3R_2 → R_3: [0-0, 3-3, 3-3 | 14-15] = [0, 0, 0 | -1]
[ 0 1 1 | 5 ]
[ 0 0 0 | -1 ]
Step 4: Interpret.
Row 3 says 0x + 0y + 0z = -1, which simplifies to 0 = -1. This is a contradiction!
This system has no solution (it is inconsistent).
Worked Example: A Consistent 3x3 System
Solve:
2x + 3y + z = 14
x + 2y - z = 2
Augmented matrix:
[ 2 3 1 | 14 ]
[ 1 2 -1 | 2 ]
R_2 - 2R_1 → R_2 and R_3 - R_1 → R_3:
[ 0 1 -1 | 2 ]
[ 0 1 -2 | -4 ]
R_3 - R_2 → R_3:
[ 0 1 -1 | 2 ]
[ 0 0 -1 | -6 ]
Back substitution:
From row 3: -z = -6, so z = 6.
From row 2: y - z = 2, so y = 2 + 6 = 8. Wait, let me recheck. y - 6 = 2, so y = 8.
From row 1: x + y + z = 6, so x + 8 + 6 = 6, x = -8.
Solution: (x, y, z) = (-8, 8, 6).
Verify in original equation 2: 2(-8) + 3(8) + 6 = -16 + 24 + 6 = 14.
Back Substitution
Once in REF, solve from the bottom row up:
- The bottom nonzero row gives one variable directly (or detects a contradiction).
- Substitute that value into the row above to find the next variable.
- Continue upward until all variables are found.
This is called back substitution because you work backwards through the rows.
Check Your Understanding
1. Is this matrix in row echelon form? [ 1 2 3 | 4 ] / [ 0 0 5 | 2 ] / [ 0 1 0 | 3 ]
2. Apply Gaussian elimination to: [ 1 -1 | 3 ] / [ 2 1 | 9 ]. Then solve by back substitution.
3. What does a row [0 0 0 | 5] in REF tell you about the system?
4. What does a row [0 0 0 | 0] in REF tell you?
Key Takeaways
- Row echelon form has a staircase pattern of pivots with zeros below each pivot
- Gaussian elimination uses row replacement to create zeros below each pivot, working left to right
- Back substitution solves the system from the bottom row upward
- A row [0 0 ... 0 | b] with b nonzero signals no solution
- A row of all zeros is always true and indicates possible free variables
Next Lesson
In Lesson 3, learn Gauss Jordan elimination to reach reduced row echelon form, where solutions can be read off directly.
Start Lesson 3