RREF Calculator (Row Echelon Form)

Row-reduce a matrix of up to 5 × 6 to reduced row echelon form with exact fractions. Shows every row operation, the rank and the solution of a system.

One row per line, entries separated by spaces. Up to 5 rows and 6 columns. Whole numbers, decimals (0.5) and fractions (3/4) are all fine.
Choose augmented to also get the solution of the system of equations. Each row is one equation.

Results

Reduced row echelon form (3 × 3)
[ 1 0 −1/5 ] [ 0 1 4/5 ] [ 0 0 0 ]
Rank
2
The number of pivots (leading 1s).
Pivot columns
column 1, column 2
Row operations
Step 1: R₁ ↔ R₂; R₃ → R₃ − 5R₁ [ 1 4 3 ] [ 0 −5 −4 ] [ 0 −10 −8 ] Step 2: R₂ → (−1/5)R₂; R₁ → R₁ − 4R₂; R₃ → R₃ + 10R₂ [ 1 0 −1/5 ] [ 0 1 4/5 ] [ 0 0 0 ]

How it’s calculated

A matrix is in reduced row echelon form (RREF) when every all-zero row is at the bottom, each row's first non-zero entry (its leading 1 or pivot) is 1 and sits to the right of the pivot above it, and every other entry in a pivot column is 0. Any matrix can be brought to its RREF, which is unique, with three row operations:

This calculator works column by column (Gauss–Jordan elimination): it finds a row with a non-zero entry, swaps it up, scales it to make the pivot 1, then clears every other entry in that column. All arithmetic uses exact fractions, so there is no rounding. The rank is the number of pivots. For an augmented matrix, a row 0 0 … 0 | b with b ≠ 0 means there is no solution, and each non-pivot column gives a free variable.

rank = number of pivots (leading 1s) free variables = number of unknowns − rank (when the system has a solution)

Example: A = [0 −5 −4; 1 4 3; 5 10 7]. Swap R₁ and R₂, then R₃ → R₃ − 5R₁ gives [1 4 3; 0 −5 −4; 0 −10 −8]. Scale R₂ by −1/5 to get [0 1 4/5], then R₁ → R₁ − 4R₂ and R₃ → R₃ + 10R₂. The result is [1 0 −1/5; 0 1 4/5; 0 0 0], with two pivots, so the rank is 2.

Frequently asked questions

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

In row echelon form each pivot sits to the right of the one above and below it are zeros. Reduced row echelon form also makes every pivot 1 and clears the entries above each pivot. A matrix has many row echelon forms but only one reduced row echelon form.

How do I solve a system of equations with RREF?

Write each equation as a row of coefficients followed by the right-hand side, choose "augmented matrix" and read the solution. For 2x + y = 5 and x − y = 1, enter 2 1 5 and 1 -1 1 to get x₁ = 2, x₂ = 1.

What does the rank tell me?

The rank is the number of independent rows (or columns). A square matrix has an inverse exactly when its rank equals its size. In a system, rank below the number of unknowns means free variables, so either no solution or infinitely many.

Why does the answer have fractions?

Row reduction divides by the pivots, so fractions appear naturally. Keeping them exact avoids the rounding errors decimals would bring, and 4/5 is easier to check by hand than 0.8000000001.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator