RREF Calculator

Row reduce any matrix to reduced row echelon form (RREF) with exact fractions. Every row operation is listed and animated: press Play to watch the rows swap, scale and cancel, or click any number in the matrix to change it. Tick “augmented” to solve a system of linear equations.

Answer

RREF

1002
0103
001−1
Rank3
Pivot columns1, 2, 3
Row operations9
SolutionsExactly one

x = 2, y = 3, z = −1

Watch the row reduction

Start: click any number to change itR1R2R321−18−3−12−11−212−3
Step 0 of 9

Press Next or Play. Each step is one row operation: the arrow shows which row is added to which, a ghost copy of the multiple slides over and cancels an entry. Leading 1s turn blue and zeros fade, so the staircase appears. On the start screen, click any number to type a new one.

Why this answer

  1. R1 ← 1/2 · R1: make the pivot 1.
  2. R2 ← R2 + 3 · R1: make the entry in the pivot column 0.
  3. R3 ← R3 + 2 · R1: make the entry in the pivot column 0.
  4. R2 ← 2 · R2: make the pivot 1.
  5. R1 ← R1 − 1/2 · R2: make the entry in the pivot column 0.
  6. R3 ← R3 − 2 · R2: make the entry in the pivot column 0.
  7. R3 ← −1 · R3: make the pivot 1.
  8. R1 ← R1 + 1 · R3: make the entry in the pivot column 0.
  9. R2 ← R2 − 1 · R3: make the entry in the pivot column 0.
  10. Done. Every pivot is 1, the only nonzero entry in its column, and each pivot sits to the right of the one above.

Why it works

How does row reduction solve equations?

R2 ← R2 + ? · R1R1R21131−11

Step 1 of 4

Cancel an entry

The system x + y = 3, x − y = 1 is the matrix shown: each row is an equation, and the last column holds the right-hand sides. Fill the blank so the 1 under the first pivot becomes 0, then Check.

R2 ← R2 + [ ? ] · R1

Make the bottom-left entry 0.

Put it to use

Where row reduction is used

Row reduction (Gauss–Jordan elimination) is how computers solve systems of linear equations, find the inverse of a matrix and the rank of a set of vectors, and check whether vectors are independent. For two or three equations with a graph, see the System of Equations Calculator; for products of vectors, the Dot Product Calculator.

How it works

The RREF calculator row reduces any matrix (up to 6 × 7) to reduced row echelon form with exact fractions, lists every row operation and animates them one by one. It also gives the rank and pivot columns and, for an augmented matrix, whether the system has one solution, none or infinitely many.

It uses Gauss–Jordan elimination: for each column, find a nonzero entry (swapping rows if needed), scale that row so the pivot is 1, then add multiples of it to every other row to make the rest of the column 0.

These three row operations (swap, scale by a nonzero number, add a multiple of another row) never change the solutions of the system, so the final matrix has the same solutions, but you can read them straight off.

Swap: Ri ↔ RjScale: Ri ← k · Ri (k ≠ 0)Replace: Ri ← Ri + k · RjRank = number of pivots; free variables = columns without a pivot

Worked example: Solve x + y = 3 and x − y = 1

  1. Augmented matrix: [1 1 | 3; 1 −1 | 1].
  2. R2 ← R2 − R1: [0 −2 | −2].
  3. R2 ← −½ · R2: [0 1 | 1], so y = 1.
  4. R1 ← R1 − R2: [1 0 | 2], so x = 2, y = 1.

Common mistakes

  • Changing only some entries of a row: an operation applies to the whole row, including the right-hand side.
  • Stopping at row echelon form: RREF also needs zeros above each pivot and every pivot equal to 1.
  • Reading a row of zeros (0 = 0) as 'no solution': it means a free variable.
  • Rounding decimals mid-way: use fractions to stay exact.

Frequently asked questions

What is reduced row echelon form?

A matrix where each nonzero row starts with a 1 (the pivot), each pivot is to the right of the one above, all-zero rows are at the bottom, and every pivot is the only nonzero entry in its column.

What is the difference between REF and RREF?

Row echelon form only needs zeros below each pivot. Reduced row echelon form also needs zeros above each pivot and every pivot equal to 1. A matrix has many echelon forms but exactly one RREF.

How do you tell if a system has no solution?

If a row of the RREF reads 0 0 … 0 | c with c ≠ 0, it says 0 = c, which is impossible, so the system has no solution.

What does the rank of a matrix mean?

The number of pivots in its RREF: how many rows (or columns) are linearly independent.

When does a system have infinitely many solutions?

When it is consistent and some variable column has no pivot. Those free variables can take any value.