Reduced Row Echelon Form

Reduced row echelon form (RREF) is a row echelon form in which every pivot is 1 and is the only nonzero entry in its column. Gauss-Jordan elimination reaches it by also clearing the entries above each pivot, so the solution of a linear system can be read straight from the matrix. Every matrix has exactly one RREF.

Before this lesson: Gaussian Elimination and Augmented Matrices

From row echelon form to reduced row echelon form

Gaussian elimination stops at row echelon form and finishes with back substitution. Gauss-Jordan elimination does the back substitution inside the matrix instead. It scales each pivot to 1 and uses it to clear the rest of its column, above as well as below.

A matrix is in reduced row echelon form when it is in row echelon form and also

  • every pivot (leading entry) is 1, and
  • every pivot is the only nonzero entry in its column.
Three augmented matrices, each with 3 rows and 3 coefficient columns plus a right-hand column after a vertical bar. Left, row echelon form: navy pivot squares on the diagonal with stars (any number) above them and zeros below. Middle, reduced row echelon form: each pivot is a 1 in a navy square, and every other entry in a pivot column is 0, so the right-hand column gives the solution. Right, reduced row echelon form with a free variable: pivots 1 in columns 1 and 3, a star in column 2, which has no pivot, and a bottom row of zeros.
In RREF each pivot is 1 with zeros above and below it. A column with no pivot belongs to a free variable.

Uniqueness of the reduced row echelon form

A matrix has many row echelon forms, but only one reduced row echelon form, no matter which row operations you use. That is why RREF is the standard answer to “row reduce this matrix,” and why calculators and software report it.

Gauss-Jordan elimination steps

  1. Forward phase: use Gaussian elimination to reach row echelon form.
  2. Start with the rightmost pivot. Divide its row by the pivot so the pivot becomes 1.
  3. Add multiples of that row to the rows above it to make every entry above the pivot 0.
  4. Move to the next pivot to the left and repeat steps 2 and 3, until every pivot has been handled.
  5. Read the solution: each pivot row gives a basic variable in terms of the free variables.

Working from the bottom pivot up keeps the zeros you already made, because the rows below a pivot are 0 in that pivot’s column.

Reduced row echelon form examples

Example 1: Gauss-Jordan elimination with one solution

Solve x + y + z = 2, 2x + 3y + z = 1, x − y − 2z = −2.

\left[\begin{array}{rrr|r} 1 & 1 & 1 & 2 \\ 0 & 1 & -1 & -3 \\ 1 & -1 & -2 & -2 \end{array}\right]

R₂ − 2R₁ → R₂: 3 − 2 = 1, 1 − 2 = −1, 1 − 4 = −3.

\left[\begin{array}{rrr|r} 1 & 1 & 1 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & -2 & -3 & -4 \end{array}\right]

R₃ − R₁ → R₃: −1 − 1 = −2, −2 − 1 = −3, −2 − 2 = −4.

\left[\begin{array}{rrr|r} 1 & 1 & 1 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & 0 & -5 & -10 \end{array}\right]

R₃ + 2R₂ → R₃: −3 − 2 = −5, −4 − 6 = −10. Row echelon form.

\left[\begin{array}{rrr|r} 1 & 1 & 1 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & 0 & 1 & 2 \end{array}\right]

−(1/5)R₃ → R₃: the pivot becomes 1.

\left[\begin{array}{rrr|r} 1 & 1 & 1 & 2 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₂ + R₃ → R₂: −3 + 2 = −1.

\left[\begin{array}{rrr|r} 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ − R₃ → R₁: 2 − 2 = 0.

\left[\begin{array}{rrr|r} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ − R₂ → R₁: 0 − (−1) = 1. This is RREF.

Answer: (x, y, z) = (1, −1, 2), read straight from the last column. Check: 2 − 3 + 2 = 1 and 1 + 1 − 4 = −2.

Example 2: Free variables from RREF

Solve x₁ + 2x₂ + x₃ + 3x₄ = 7, 2x₁ + 4x₂ + 3x₃ + 8x₄ = 18, x₁ + 2x₂ + 2x₃ + 5x₄ = 11.

\left[\begin{array}{rrrr|r} 1 & 2 & 1 & 3 & 7 \\ 0 & 0 & 1 & 2 & 4 \\ 1 & 2 & 2 & 5 & 11 \end{array}\right]

R₂ − 2R₁ → R₂: 4 − 4 = 0, 3 − 2 = 1, 8 − 6 = 2, 18 − 14 = 4.

\left[\begin{array}{rrrr|r} 1 & 2 & 1 & 3 & 7 \\ 0 & 0 & 1 & 2 & 4 \\ 0 & 0 & 1 & 2 & 4 \end{array}\right]

R₃ − R₁ → R₃.

\left[\begin{array}{rrrr|r} 1 & 2 & 1 & 3 & 7 \\ 0 & 0 & 1 & 2 & 4 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right]

R₃ − R₂ → R₃. The pivots are in columns 1 and 3.

\left[\begin{array}{rrrr|r} 1 & 2 & 0 & 1 & 3 \\ 0 & 0 & 1 & 2 & 4 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right]

R₁ − R₂ → R₁: 1 − 1 = 0, 3 − 2 = 1, 7 − 4 = 3. This is RREF.

x_1 = 3 - 2x_2 - x_4

Row 1, solved for the basic variable x₁.

x_3 = 4 - 2x_4

Row 2, solved for the basic variable x₃.

Answer: with free variables x₂ = s and x₄ = t, the solutions are (x₁, x₂, x₃, x₄) = (3 − 2s − t, s, 4 − 2t, t) for all real s and t.

Example 3: RREF of a coefficient matrix

Find the RREF of A = [1 2 −1; 2 4 1; 3 6 0] (rows separated by semicolons) and its pivot columns.

\begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 3 \\ 3 & 6 & 0 \end{bmatrix}

R₂ − 2R₁ → R₂: 1 + 2 = 3.

\begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 3 \\ 0 & 0 & 3 \end{bmatrix}

R₃ − 3R₁ → R₃: 0 + 3 = 3.

\begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 3 \\ 0 & 0 & 0 \end{bmatrix}

R₃ − R₂ → R₃.

\begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}

(1/3)R₂ → R₂.

\begin{bmatrix} 1 & 2 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}

R₁ + R₂ → R₁. This is RREF.

Answer: the RREF is [1 2 0; 0 0 1; 0 0 0], and the pivot columns of A are columns 1 and 3.

Example 4: Two systems with the same coefficients

Solve Ax = b₁ and Ax = b₂ for A = [1 2; 3 5], b₁ = (4, 11) and b₂ = (1, 2) at the same time.

\left[\begin{array}{rr|rr} 1 & 2 & 4 & 1 \\ 3 & 5 & 11 & 2 \end{array}\right]

Put both right-hand sides after the bar.

\left[\begin{array}{rr|rr} 1 & 2 & 4 & 1 \\ 0 & -1 & -1 & -1 \end{array}\right]

R₂ − 3R₁ → R₂: 5 − 6 = −1, 11 − 12 = −1, 2 − 3 = −1.

\left[\begin{array}{rr|rr} 1 & 2 & 4 & 1 \\ 0 & 1 & 1 & 1 \end{array}\right]

−R₂ → R₂.

\left[\begin{array}{rr|rr} 1 & 0 & 2 & -1 \\ 0 & 1 & 1 & 1 \end{array}\right]

R₁ − 2R₂ → R₁: 4 − 2 = 2, 1 − 2 = −1.

Answer: Ax = b₁ has x = (2, 1) and Ax = b₂ has x = (−1, 1). Using the identity matrix as the right side the same way gives A⁻¹, as in inverse matrices.

Example 5: Planning bouquets

A florist wants to use exactly 24 roses and 36 tulips. Bouquet A uses 1 rose and 2 tulips, bouquet B uses 2 roses and 3 tulips, and bouquet C uses 3 roses and 4 tulips. Find every possible number of each bouquet.

\left[\begin{array}{rrr|r} 1 & 2 & 3 & 24 \\ 2 & 3 & 4 & 36 \end{array}\right]

Roses: a + 2b + 3c = 24. Tulips: 2a + 3b + 4c = 36.

\left[\begin{array}{rrr|r} 1 & 2 & 3 & 24 \\ 0 & -1 & -2 & -12 \end{array}\right]

R₂ − 2R₁ → R₂: 3 − 4 = −1, 4 − 6 = −2, 36 − 48 = −12.

\left[\begin{array}{rrr|r} 1 & 2 & 3 & 24 \\ 0 & 1 & 2 & 12 \end{array}\right]

−R₂ → R₂.

\left[\begin{array}{rrr|r} 1 & 0 & -1 & 0 \\ 0 & 1 & 2 & 12 \end{array}\right]

R₁ − 2R₂ → R₁: 3 − 4 = −1, 24 − 24 = 0. This is RREF.

a = c, \quad b = 12 - 2c

Solve each row for its basic variable; c is free.

0 \le c \le 6

The counts must be whole numbers with b = 12 − 2c ≥ 0.

Answer: (a, b, c) = (c, 12 − 2c, c) for c = 0, 1, 2, 3, 4, 5 or 6, which gives 7 possible plans. For example, c = 4 gives 4 of A, 4 of B and 4 of C.

Common mistakes

MistakeExample of the errorFix
Stopping at row echelon formReading x = 2 from the row [1 1 1 | 2] in Example 1Clear the entries above each pivot first; RREF gives x = 1.
Leaving a pivot that is not 1Calling [1 0 0 | 1; 0 1 0 | −1; 0 0 −5 | −10] reducedDivide the row by its pivot: −(1/5)R₃.
Clearing from the top pivot firstUsing row 1 to clear column 1 after the lower rows already have zeros, and undoing themWork from the bottom pivot up; earlier zeros stay zero.
Treating a free variable as 0Answering (3, 0, 4, 0) in Example 2That is one solution. Write every solution with parameters s and t.
Forgetting the right-hand sideChanging the coefficient columns but not the last columnA row operation changes the whole row, including the constants.

Related methods

Gaussian elimination with back substitution

For a single system solved by hand, Gaussian elimination with back substitution usually takes fewer steps. RREF is worth the extra work when you need the pivot columns, have free variables, or solve several systems with the same coefficients.

Inverse matrices

Row reducing [A | I] to RREF gives [I | A⁻¹] when A is invertible. If the left side does not become I, A has no inverse.

Practice problems

  1. Which matrices are in RREF? A = [1 0 2; 0 1 −3], B = [1 3 0; 0 0 2], C = [1 0 0; 0 0 1; 0 1 0].
  2. Use Gauss-Jordan elimination to solve x + 2y = 5, 3x + 7y = 17.
  3. Use Gauss-Jordan elimination to solve x + y − z = 1, 2x + 3y + z = 10, x + 2y + 3z = 11.
  4. Find the RREF of [1 −1 2 | 3; 2 −2 5 | 8] and write all solutions.
  5. Find the RREF of [2 4; 1 3].
  6. Find the RREF of [1 2 3; 2 4 6].
  7. Solve Ax = b₁ and Ax = b₂ at once for A = [1 1; 2 3], b₁ = (3, 7) and b₂ = (0, 1).
  8. The RREF of an augmented matrix is [1 0 0 2 | 1; 0 1 0 −1 | 2; 0 0 1 3 | 0]. Write the solution.
  9. Find the RREF of [1 2 1 | 4; 3 6 2 | 10] and write all solutions.
  10. A shop packs 29 candles and 17 soaps into gift boxes. A small box holds 2 candles and 1 soap, and a large box holds 3 candles and 2 soaps. How many of each box does it pack?
Show answers

1.

A

Pivots are 1 in columns 1 and 2, with zeros above and below: RREF.

B

The leading entry of row 2 is 2, not 1, so B is in echelon form but not RREF.

C

Row 2’s leading entry (column 3) is right of row 3’s leading entry (column 2): not even echelon form.

Answer: only A is in RREF.

2.

\left[\begin{array}{rr|r} 1 & 2 & 5 \\ 0 & 1 & 2 \end{array}\right]

R₂ − 3R₁ → R₂: 7 − 6 = 1, 17 − 15 = 2.

\left[\begin{array}{rr|r} 1 & 0 & 1 \\ 0 & 1 & 2 \end{array}\right]

R₁ − 2R₂ → R₁: 5 − 4 = 1.

Answer: (1, 2)

3.

\left[\begin{array}{rrr|r} 1 & 1 & -1 & 1 \\ 0 & 1 & 3 & 8 \\ 1 & 2 & 3 & 11 \end{array}\right]

R₂ − 2R₁ → R₂: 3 − 2 = 1, 1 + 2 = 3, 10 − 2 = 8.

\left[\begin{array}{rrr|r} 1 & 1 & -1 & 1 \\ 0 & 1 & 3 & 8 \\ 0 & 1 & 4 & 10 \end{array}\right]

R₃ − R₁ → R₃: 2 − 1 = 1, 3 + 1 = 4, 11 − 1 = 10.

\left[\begin{array}{rrr|r} 1 & 1 & -1 & 1 \\ 0 & 1 & 3 & 8 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₃ − R₂ → R₃.

\left[\begin{array}{rrr|r} 1 & 1 & -1 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₂ − 3R₃ → R₂: 3 − 3 = 0, 8 − 6 = 2.

\left[\begin{array}{rrr|r} 1 & 1 & 0 & 3 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ + R₃ → R₁: −1 + 1 = 0, 1 + 2 = 3.

\left[\begin{array}{rrr|r} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ − R₂ → R₁.

Answer: (1, 2, 2)

4.

\left[\begin{array}{rrr|r} 1 & -1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₂ − 2R₁ → R₂: 5 − 4 = 1, 8 − 6 = 2.

\left[\begin{array}{rrr|r} 1 & -1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ − 2R₂ → R₁: 3 − 4 = −1.

Answer: x = −1 + t, y = t, z = 2 for every real t

5.

\begin{bmatrix} 1 & 2 \\ 1 & 3 \end{bmatrix}

(1/2)R₁ → R₁.

\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}

R₂ − R₁ → R₂.

\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

R₁ − 2R₂ → R₁.

Answer: the identity matrix I

6.

\begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \end{bmatrix}

R₂ − 2R₁ → R₂. The single pivot is already 1 with nothing above it.

Answer: [1 2 3; 0 0 0]

7.

\left[\begin{array}{rr|rr} 1 & 1 & 3 & 0 \\ 0 & 1 & 1 & 1 \end{array}\right]

R₂ − 2R₁ → R₂: 3 − 2 = 1, 7 − 6 = 1, 1 − 0 = 1.

\left[\begin{array}{rr|rr} 1 & 0 & 2 & -1 \\ 0 & 1 & 1 & 1 \end{array}\right]

R₁ − R₂ → R₁.

Answer: x = (2, 1) for b₁ and x = (−1, 1) for b₂

8.

x_4 = t

Column 4 has no pivot, so x₄ is free.

x_1 = 1 - 2t,\; x_2 = 2 + t,\; x_3 = -3t

Solve each row for its basic variable.

Answer: (1 − 2t, 2 + t, −3t, t) for every real t

9.

\left[\begin{array}{rrr|r} 1 & 2 & 1 & 4 \\ 0 & 0 & -1 & -2 \end{array}\right]

R₂ − 3R₁ → R₂: 2 − 3 = −1, 10 − 12 = −2.

\left[\begin{array}{rrr|r} 1 & 2 & 1 & 4 \\ 0 & 0 & 1 & 2 \end{array}\right]

−R₂ → R₂.

\left[\begin{array}{rrr|r} 1 & 2 & 0 & 2 \\ 0 & 0 & 1 & 2 \end{array}\right]

R₁ − R₂ → R₁.

Answer: x = 2 − 2t, y = t, z = 2 for every real t

10.

\left[\begin{array}{rr|r} 1 & 2 & 17 \\ 2 & 3 & 29 \end{array}\right]

Soaps: s + 2ℓ = 17 (written first). Candles: 2s + 3ℓ = 29.

\left[\begin{array}{rr|r} 1 & 2 & 17 \\ 0 & -1 & -5 \end{array}\right]

R₂ − 2R₁ → R₂.

\left[\begin{array}{rr|r} 1 & 2 & 17 \\ 0 & 1 & 5 \end{array}\right]

−R₂ → R₂.

\left[\begin{array}{rr|r} 1 & 0 & 7 \\ 0 & 1 & 5 \end{array}\right]

R₁ − 2R₂ → R₁: 17 − 10 = 7.

Answer: 7 small boxes and 5 large boxes

Reduced row echelon form FAQ

What is the difference between row echelon form and reduced row echelon form?

Row echelon form only needs zeros below each pivot. Reduced row echelon form also needs each pivot to be 1 and the only nonzero entry in its column.

Is the reduced row echelon form of a matrix unique?

Yes. Every matrix has exactly one RREF, while it can have many different row echelon forms.

What is Gauss-Jordan elimination?

It is the row reduction method that goes all the way to reduced row echelon form: Gaussian elimination first, then scaling each pivot to 1 and clearing the entries above it.

How do you read the solution from RREF?

Each nonzero row gives one basic variable in terms of the free variables. If there are no free variables, the last column is the solution.

Summary

  • RREF = row echelon form + every pivot is 1 + zeros above and below each pivot.
  • Gauss-Jordan elimination: forward phase to echelon form, then clear upward from the bottom pivot.
  • Every matrix has exactly one RREF.
  • Read basic variables from the pivot rows; columns without pivots give free variables.
  • Put several right-hand sides after the bar to solve several systems at once.

Previous lesson: Gaussian Elimination

Next lesson: Applications of Linear Systems

Back to the Linear Algebra Index