๐งฎ Linear Algebra Kingdom ยท Linear Algebra
Row Reduction & Gaussian Elimination
The one procedure the whole subject leans on: apply a row operation and say what it did, clear a column below a pivot, drive a matrix all the way to reduced row echelon form, count the pivots, and recognise when a matrix is not in that form yet and which rule it breaks.
In short
- There are exactly three row operations, each one touches a single row, and each one is reversible โ which is why they cannot change the solutions of a system.
- The multiplier that clears an entry is that entry divided by the pivot above it, in that order.
- Reduced row echelon form means four things: leading entries of 1, pivot columns clear, leading 1s stepping to the right, and zero rows at the bottom.
- Counting pivots and free columns tells you whether the answer is one solution, a whole line of them, or none at all.
Three moves, and nothing else
Millwright Orin clears a column the way a miller clears a sluice: one small move at a time, always working downstream, and never disturbing what is already settled. There are exactly three row operations, and every reduction in this kingdom is a sequence of them.
Swap two rows. R1 <-> R2 Multiply a row by a number that is not zero. R2 -> 3R2 Add a multiple of one row to another row. R3 -> R3 - 2R1
Two things about that list matter more than the list itself.
First, each operation touches one row. In R3 -> R3 - 2R1, row 3 changes and row 1 does not: row 1 is only being read, the way you read a recipe without eating it. Copy every other row down unchanged, every time.
Second, every one of the three is reversible, and that is the whole reason they are allowed. Swap back, multiply by the reciprocal, add the multiple back on. If a matrix stands for a system of equations, a reversible move cannot gain or lose a single solution โ so the tidy matrix at the end has exactly the same solutions as the messy one at the start.
A matrix of coefficients with the right-hand sides carried along beside it is an augmented matrix, and the bar is just where the equals sign used to be:
2x + 3y = 8 [[2, 3 | 8], x - y = 1 [1, -1 | 1]]
Forward elimination: clearing a column
Gaussian elimination works downwards, one column at a time. Pick the first entry of the first column that is not zero โ the pivot โ and use its row to make every entry below it zero.
To clear an entry, you need a multiplier. If the pivot is p and the entry below it is e, the operation is
R(below) -> R(below) - m R(pivot), with m = e / p
because that is exactly the m for which e - mp comes out as 0. Read it as "the entry being cleared, divided by the pivot", in that order. Turning the fraction over is the usual slip, and it is easy to catch: a multiplier of 2 should visibly cancel an entry that is twice the pivot.
Work the columns left to right. Once the first column is clear below the pivot, move to the second column, take the pivot from the row below the one you just used, and clear underneath it. The result is echelon form: a staircase of leading entries stepping to the right, with zeros beneath it.
[[2, 1, -1], [[2, 1, -1], [4, 5, 3], -> [0, 3, 5], [6, 3, 0]] [0, 0, 3]]
The rows already settled at the top are never touched again while you work downwards. That is what keeps the staircase a staircase.
Reduced row echelon form: four conditions
Echelon form is enough to solve a system by working backwards up the rows. Going one step further gives a matrix whose answer can simply be read off. A matrix is in reduced row echelon form when all four of these hold:
- every leading entry โ the first entry of a row that is not zero โ is 1;
- each column holding a leading 1 has zeros everywhere else;
- the leading 1s move to the right as you go down the rows;
- any rows of all zeros sit at the bottom.
Getting there from echelon form takes two more kinds of move. Divide each pivot row by its own leading entry to turn it into a 1, then use each leading 1 to clear the entries above it as well as below.
[[2, 4 | 10], [[1, 2 | 5], [[1, 0 | 1], [0, 1 | 2]] -> [0, 1 | 2]] -> [0, 1 | 2]]
The last matrix says x = 1 and y = 2, with no back-substitution left to do at all.
When a matrix is not reduced, it is worth naming which of the four conditions it breaks, because each one names its own missing step: a leading entry that is not 1 needs a division, a pivot column with something else in it needs one more subtraction, a leading 1 too far left needs a swap, and a zero row too high needs a swap as well.
Pivots, free columns, and what the answer looks like
A pivot is a leading 1 in the reduced form, and each pivot owns a column to itself. A column without one is a free column. Counting them is how you learn what the solution set looks like before writing a single value down.
[[1, 0 | 3], two pivots, no free column among the unknowns: [0, 1 | 5]] exactly one solution, x = 3 and y = 5
[[1, 2 | 7], one pivot, one free column: [0, 0 | 0]] a whole line of solutions
[[1, 2 | 0], the last column has taken a pivot of its own, [0, 0 | 1]] and the bottom row says 0 = 1: no solution at all
That third case is worth staring at. A pivot in the augmented column is the system telling you that the equations disagree; no arithmetic slip has happened, and there is nothing left to solve.
Two habits make row reduction much less painful. Work left to right and never go back to a column you have already cleared, or you will undo it. And check as you go: if the numbers turn into awkward fractions in a problem whose answer should be whole, the mistake is usually one operation back, in a multiplier that was turned over or a sign that was added where it should have been taken away.
Worked examples
Example 1
Reduce the augmented matrix [[2, 3 | 8], [1, -1 | 1]] to reduced row echelon form.
- Swap the rows so the pivot is a 1 and the arithmetic stays whole: [[1, -1 | 1], [2, 3 | 8]].
- Clear below the pivot. The entry to clear is 2 and the pivot is 1, so the multiplier is 2: R2 -> R2 - 2R1 gives [[1, -1 | 1], [0, 5 | 6]].
- Make the second leading entry a 1: R2 -> (1/5)R2 gives [[1, -1 | 1], [0, 1 | 6/5]].
- Clear above it: R1 -> R1 + R2 gives [[1, 0 | 11/5], [0, 1 | 6/5]].
- Both columns hold a pivot, so there is exactly one solution: x = 11/5 and y = 6/5.
Example 2
Run forward elimination on A = [[1, 2, -1], [3, 8, 1], [2, 3, -4]]. What is the entry in row 3, column 2 after the first column is cleared?
- The pivot is the 1 in row 1, column 1.
- For row 2 the entry to clear is 3, so the multiplier is 3/1 = 3: R2 -> R2 - 3R1 gives [0, 2, 4].
- For row 3 the entry to clear is 2, so the multiplier is 2: R3 -> R3 - 2R1 gives [0, -1, -2].
- The matrix is now [[1, 2, -1], [0, 2, 4], [0, -1, -2]], so the entry in row 3, column 2 is -1.
Example 3
Is M = [[1, 0, 4], [0, 3, 5]] in reduced row echelon form? If not, which condition does it break?
- Check the leading entries: row 1 begins with 1, and row 2 begins with 3.
- The first condition asks that every leading entry be 1, and the 3 in row 2 is not.
- The other three conditions do hold: the pivot column of row 1 is clear, the leading entries step to the right, and there are no zero rows to misplace.
- So M is not reduced, and the condition it breaks is the leading entry not being 1. Dividing row 2 by 3, then clearing above the new 1, would settle it.
Practice problems, with solutions
Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.
Problem 1
Difficulty 1 of 5A = [[1, -2, 1], [-1, 3, 4]] Carry out this row operation on A: Swap R1 and R2. What is the entry in the 2nd row and the 2nd column of the new matrix?
Answer: -2
- The 2nd row of A is [-1, 3, 4].
- After Swap R1 and R2, that row becomes [1, -2, 1].
- Its 2nd entry is -2.
Problem 2
Difficulty 3 of 5A = [[3, -6, 6], [0, 1, 4]] B = [[3, -6, 6], [12, -23, 28]] One row operation turned A into B. Which one?
- Swap R1 and R2
- R2 -> R2 - 4R1
- R2 -> R2 + 4R1
- R2 -> R2 + 5R1
Answer: C. R2 -> R2 + 4R1
- Rows that are unchanged: every row but the 2nd.
- The 2nd row went from [0, 1, 4] to [12, -23, 28].
- That is exactly R2 -> R2 + 4R1.
Problem 3
Difficulty 4 of 5The augmented matrix [[-1, 0 | -6], [2, 0 | 12]] stands for two equations in two unknowns. Write its reduced row echelon form as a 2 by 3 matrix (the bar is not typed). Write the matrix row by row, entries separated by commas and rows by a semicolon, like 1,2;3,4.
Answer: [[1,0,6],[0,0,0]]
- Start from [[-1, 0, -6], [2, 0, 12]] and clear the first column.
- The second row is a multiple of the first, so it clears out entirely and a row of zeros is left.
- 1 pivot in all, and the reduced form is [[1, 0, 6], [0, 0, 0]].
Common mistakes
- Changing the row that is only being read. In R3 -> R3 - 2R1, row 1 is copied down untouched and only row 3 takes new values.
- Turning the multiplier over: dividing the pivot by the entry instead of the entry by the pivot, so the entry never clears.
- Adding the multiple where it should be taken away. The operation subtracts a multiple of the pivot row, and the sign follows through every column of it.
- Stopping at echelon form when the reduced form was asked for, leaving the entries above the leading 1s uncleared.
- Reading a pivot in the augmented column as a solution. That row says 0 = 1, which means the system has no solution at all.
What you should be able to do
- Apply a row operation to a matrix and give the resulting entry, or name the operation that turned one matrix into another.
- Find the multiplier that clears an entry below a pivot, and carry out forward elimination.
- Reduce a matrix to reduced row echelon form.
- Count the pivots of a matrix and decide whether it is already in reduced row echelon form.
Where this fits in the curriculum
Common Core
- HSA-REI.C.8
High school โ Represent a system of linear equations as a single matrix equation in a vector variable.
HSA-REI.C.8 is a (+) standard โ beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.
- HSA-REI.C.9
High school โ Find the inverse of a matrix if it exists and use it to solve systems of linear equations (using technology for matrices of dimension 3 ร 3 or greater).
HSA-REI.C.9 is a (+) standard โ beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II. The Common Core hands a 3 ร 3 to technology. Row reduction is the procedure behind that button, and it is nobody's standard on its own.