Lecture 9 · Week 3· 12:32

Reduced row echelon form

Pivots, free variables, uniqueness of RREF.

Play: Lecture 9: Reduced row echelon form
Lecture · 12:32 · Open on YouTube · Report a problem with this video
TranscriptThe full text of the lecture. Click any sentence to play the video from there.

Beyond the staircase

Welcome back. Last time, we used Gaussian elimination to bring a system to row echelon form, a staircase, and then solved it from the bottom up, by back substitution. Here is the staircase we reached in our first example. Its last row gave z equals three. Substituting upwards gave y equals minus one, and then x equals two. But there is a catch. Echelon forms are not unique. For example, suppose we also add row two to row one.

In the first column, one plus zero is one. In the second column, two plus one is three. In the third column, one plus one is two. And after the bar, three plus two is five. The result is still a staircase, with the same solutions, but with different entries. Neither of the two echelon forms is more correct than the other. Today we keep row reducing until there is nothing left to choose. The result, the reduced row echelon form, is unique: every matrix has exactly one. And the solutions of the system can be read straight off it, with no back substitution at all.

Along the way, we meet basic and free variables, and the pivots of a matrix.

Reduced row echelon form

A matrix is in reduced row echelon form when it is in row echelon form, and two more conditions hold. Third, every pivot equals one. Fourth, each pivot is the only nonzero entry in its column. So it is not only the entries below a pivot that are zero, as before, but also the entries above it.

Here is an example. Its pivots are the ones in columns one, two and four. Every other entry in those three columns is zero. The other columns, here columns three and five, may hold any numbers. Conditions three and four only speak about the pivot columns. So in reduced form, every pivot column is as simple as a column can be: all zeros, except for a single one, and these ones step down the staircase.

Let's test the definition on three matrices. The first one is in reduced row echelon form. Its pivots are ones, and each is alone in its column. The second is not, because its second pivot is a two, not a one. The third is not either. It is in echelon form, and its pivots are ones, but there is a five above its second pivot.

The backward phase

Let's bring our echelon form into reduced form. Its pivots are already ones, so condition three holds. What is left is to clear the entries above the pivots. We work backwards, starting with the last pivot, in row three, column three. Above it are two ones. To clear the one in row two, we replace row two by row two minus row three.

In the first column, zero minus zero is zero. In the second column, one minus zero is one. In the third column, one minus one is zero. And after the bar, two minus three is minus one. To clear the one in row one, we replace row one by row one minus row three. In the first column, one minus zero is one. In the second, two minus zero is two. In the third, one minus one is zero. And after the bar, three minus three is zero.

The third column is now clear. Next comes the pivot in row two, column two. Above it is a two, so we replace row one by row one minus two times row two. In the first column, one minus two times zero is one. In the second, two minus two times one is zero. In the third, zero minus two times zero is zero. And after the bar, zero minus two times minus one is two. The matrix is now in reduced row echelon form. Each pivot is a one, alone in its column.

Read as equations, it says x equals two, y equals minus one, and z equals three. The solution is simply written in the last column, (two, minus one, three), exactly as we found by back substitution. Why start from the last pivot? Look at row two when we used it to clear row one. Its entry in the third column was already zero, so subtracting it could not bring back the zero we had just made. Working backwards, nothing we have cleared is ever undone.

Gauss-Jordan elimination

Here is the whole method. It is called Gauss–Jordan elimination, and it has two phases. The forward phase is Gaussian elimination, from the last lecture. It brings the matrix to row echelon form. The backward phase starts at the last pivot, and moves up. Scale the pivot's row so that the pivot becomes one. Then use replacements with that row to make every entry above the pivot zero. Then move on to the pivot before it.

Every step is a row operation, so the solutions never change. And the backward phase never moves a pivot. It only clears the entries above them. So the staircase stays a staircase, and at the end, the matrix is in reduced row echelon form. This proves the theorem: every matrix is row equivalent to a matrix in reduced row echelon form. Like Gaussian elimination, the method only adds, subtracts, multiplies and divides, so it works over any field. And in lecture sixteen, the same method will compute the inverse of a matrix.

Basic and free variables

Now a system where something new happens. At the end of the last lecture, we met this one. x plus y plus two z equals one. Two x plus three y plus five z equals four. And x plus two y plus three z equals three. Its augmented matrix holds the coefficients, row by row, and the right hand sides after the bar. The forward phase clears the first column just as before. Row two minus two times row one is (zero, one, one, two), and row three minus row one is (zero, one, one, two) as well.

Then row three minus row two is a row of zeros. It says zero equals zero, which holds for every x, y and z, so it puts no condition on them at all. Now the backward phase. The pivots are in columns one and two, and they are already ones. Above the second pivot is a one, so we replace row one by row one minus row two. In the first column, one minus zero is one. In the second, one minus one is zero. In the third, two minus one is one. And after the bar, one minus two is minus one.

This is the reduced row echelon form. Read as equations, it says x plus z equals minus one, and y plus z equals two. Here is the key distinction of today's lecture. The variables x and y belong to pivot columns. We call them basic variables, or pivot variables. The variable z belongs to a column with no pivot. We call it a free variable. A free variable really is free. We may give z any value we like, say z equals t. Each equation of the reduced form contains exactly one basic variable, so it tells us that variable's value.

The first equation gives x equals minus one minus t. The second gives y equals two minus t. So every solution has the form (minus one minus t, two minus t, t), for some number t. Let's check one. Take t equals one. Then x is minus two, y is one, and z is one. In the first equation, minus two plus one plus two is one. In the second, minus four plus three plus five is four. In the third, minus two plus two plus three is three. Each value of t gives a different solution. So this system has infinitely many solutions, one for each value of the free variable. In space, the three planes meet along a whole line.

One more remark. Only the columns before the bar belong to variables. A pivot after the bar would mean a row that says zero equals one, and as we saw last time, then there is no solution at all. In lecture ten, we use these ideas to describe the solutions of any system: when there is one, when it is unique, and how to write them all down.

Uniqueness

Now the main theorem of the lecture. Every matrix is row equivalent to exactly one matrix in reduced row echelon form. We have already proved half of it: Gauss–Jordan elimination always produces one. The new claim is that however we row reduce, we always arrive at the same one. Let's watch it happen. Take the matrix with rows (two, four, six), and (one, three, four).

On the first path, we scale row one by one half, giving (one, two, three). Then we subtract it from row two, giving (zero, one, one). On the second path, we swap the rows first. Then we replace row two by row two minus two times row one, giving (zero, minus two, minus two). Two different echelon forms. But look: their pivots sit in the same places.

Now we finish both paths. On the first, row one minus two times row two gives (one, zero, one). On the second, we scale row two by minus one half, giving (zero, one, one). Then row one minus three times row two gives (one, zero, one) as well. Both paths end at exactly the same reduced form, just as the theorem promises.

Why must this happen? The full proof is in the course book. It is one of the longer arguments of this chapter, so here is its main idea. This part is demanding, so take it slowly, and feel free to pause or rewatch it. Look at the columns of the reduced form. The third column is the first column plus the second. And the same relation holds in the original matrix. (two, one) plus (four, three) is the column (six, four). Now move the third column to the other side. One times the first column, plus one times the second, minus one times the third, is the zero vector.

That is no accident. The relation says that x equals one, y equals one and z equals minus one solve the system with these coefficients and all right hand sides zero. Row operations never change solutions, so every such relation between the columns survives every row operation. And a reduced form is completely determined by these relations. Its pivot columns are exactly the columns that are not combinations of the columns before them. And every other column lists the coefficients of its own combination. So two reduced forms of the same matrix must be equal. Relations between columns are the heart of lecture eleven, on linear independence.

The theorem has an important consequence. The backward phase never moves a pivot, so every echelon form of a matrix has its pivots exactly where the reduced form has them. Since the reduced form is unique, every echelon form of a matrix has its pivots in the same positions. So we may speak of the pivot positions of a matrix, and of its number of pivots, no matter how it was reduced. In lecture twenty six, that number gets a name: the rank of the matrix.

Summary

Let's summarise. A matrix is in reduced row echelon form when it is in echelon form, every pivot is one, and each pivot is the only nonzero entry in its column. Gauss–Jordan elimination gets there. Forward elimination reaches an echelon form, and then a backward phase clears the entries above each pivot, from the last pivot up. In the reduced form, the solutions can be read off. Variables in pivot columns are basic. The others are free, and they can take any value.

Every matrix has exactly one reduced row echelon form. So the pivot positions of a matrix, and its number of pivots, do not depend on how we reduce it. Before the next lecture, read section two point four of the course book, where the uniqueness theorem is proved in full, try the reduced row echelon form problems on sheet three, and do the lecture check on this lecture's page at Open Semester dot com. Next time, we describe the solution set of any system. See you there.

Check yourself

3 questions, from warm-up to stretch

Work each one out on paper, type your answer and press Check. Stuck? Open a hint; the worked solution is there when you need it.

  1. Question 1 of 3 Warm-up

    The augmented matrix is in row echelon form, and both pivots are already . Finish the backward phase with . The reduced form is . What are and , and what is the solution ?

    Hint 1 of 2

    The backward phase clears the entry above the last pivot. Row 2 does not change; only row 1 does, column by column, including the entry after the bar.

    Hint 2 of 2

    In the second column, . After the bar, row 1 becomes .

    Worked solution
    1. Row 2 stays . In row 1: , , and after the bar .
    2. The reduced form is , so and .
    3. Read as equations it says and : the solution stands in the last column. Check in the echelon form: and .
  2. Question 2 of 3 Core

    Bring the system , , to reduced row echelon form. Which variable is free? Then give the solution in which the free variable equals .

    Free variable
    Hint 1 of 2

    Forward phase: and give the same row twice, so gives a zero row. Which columns then have pivots?

    Hint 2 of 2

    Backward phase: gives . The reduced form says and . Set .

    Worked solution
    1. The augmented matrix is .
    2. gives (, , , ), and gives (, , , ). Then gives a zero row, the equation .
    3. Backward phase: the pivots, in columns 1 and 2, are already . gives (, , , ).
    4. The reduced form says and . Columns 1 and 2 are pivot columns, so and are basic; column 3 has no pivot, so is free.
    5. With : , . For : .
    6. Check in the original equations: , , .
  3. Question 3 of 3 Stretch

    Find the reduced row echelon form of (not augmented). How many pivots does have? Is column 2 a pivot column? And what is the entry in row 1, column 2 of the reduced form?

    Column 2 a pivot column?
    Hint 1 of 2

    Clear the first column with and . Look at what is left in column 2 below row 1.

    Hint 2 of 2

    After those two replacements both lower rows are . Column 2 has no nonzero entry below row 1, so the next pivot is in column 3. Then and .

    Worked solution
    1. gives (, , ), and gives (, , ).
    2. Column 2 has no nonzero entry below row 1, so the second pivot is the in row 2, column 3. gives the zero row: the echelon form is .
    3. Backward phase: clears the above the second pivot (, , ). The reduced form is .
    4. So has two pivots, in columns 1 and 3. Column 2 is not a pivot column, and its entry in row 1 is . Since the reduced form is unique, every echelon form of has its pivots in these same two positions.

Found a mistake, or something not working on this page? Report it and we'll fix it. See what we've corrected.