ZestCalc

RREF Calculator

Reduce any matrix to reduced row echelon form with exact fractions, watch every row operation on your own numbers, and practice doing them yourself.

Matrix

Enter your matrix below, or start from an example.

Up to 12 rows and 12 columns.

Use integers, decimals, or fractions such as 1/3. Paste rows from a spreadsheet or a Python list into any cell.

Input

A=[21−18−3−12−11−212−3]A = \begin{bmatrix} 2 & 1 & -1 & 8 \\ -3 & -1 & 2 & -11 \\ -2 & 1 & 2 & -3 \end{bmatrix}

Reduced row echelon form

Updates as you type.

1002
0103
001-1

Exactly one solution: x1=2,  x2=3,  x3=−1x_{1} = 2,\; x_{2} = 3,\; x_{3} = -1.

Rank of the augmented matrix
3
Pivot columns
1, 2, 3
Free columns
None

Row echelon form

A matrix can have many row echelon forms, but only one reduced form. This is the one reached by the steps below.

11/2-1/24
0112
001-1

Row operations, one at a time

21-18
-3-12-11
-212-3

This is your starting matrix. Press next or play to begin.

Step 0 of 9
Show all 9 row operations

What reduced row echelon form means

A matrix is in reduced row echelon form (RREF) when all of these hold:

  • Any rows of all zeros are at the bottom.
  • The first nonzero entry of each other row, called its pivot, is 11.
  • Each pivot is to the right of the pivot in the row above.
  • Each pivot is the only nonzero entry in its column.

For example:

[123258]⟶[10−1012]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 5 & 8 \end{bmatrix} \longrightarrow \begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \end{bmatrix}

Row echelon form (REF) only needs the first three conditions, with zeros below each pivot. A matrix can have many row echelon forms, but it has exactly one reduced row echelon form.

How row reduction works

Three row operations are allowed, because none of them changes the solutions of the underlying system:

  • Swap two rows: R1↔R2R_1 \leftrightarrow R_2
  • Multiply a row by a nonzero number: R1←12R1R_1 \leftarrow \tfrac{1}{2}R_1
  • Add a multiple of one row to another: R2←R2−3R1R_2 \leftarrow R_2 - 3R_1

Gaussian elimination works through the columns from left to right, creating a pivot in each one that can have it and clearing the entries below. That gives a row echelon form. Gauss-Jordan elimination then clears the entries above each pivot, which gives the RREF. The number of pivots is the rank of the matrix, and columns without a pivot are free.

Tips for using the calculator

  • Enter integers, decimals, or fractions such as 1/3. Results are exact; switch to Decimals for a rounded view.
  • Turn on Last column is the right-hand side to read the result as a system of equations and see whether it has one, none, or infinitely many solutions.
  • Open Steps to watch each operation, using the player to pause, go back, or jump to any step.
  • Open Practice to do the row operations yourself. A hint is always available if you get stuck, and any route to the RREF counts.
  • Paste a block from a spreadsheet, or a Python list such as [[1, 2], [3, 4]], into any cell to fill the grid at once.

To multiply matrices instead, try the Matrix Multiplication Calculator.