Row Reduction and RREF, Explained

After reading this you can row-reduce any matrix by hand, read the reduced row echelon form as a system of equations, and tell at a glance whether that system has one solution, many, or none.

What row reduction does

Row reduction turns a matrix into a simpler matrix that has the same solutions. You apply three elementary row operations, over and over, until the left side of the matrix is as clean as it can get. The clean target is reduced row echelon form (RREF): every pivot is a 1, every pivot is the only non-zero entry in its column, and the pivots march down and to the right.

Take the system x + y + z = 6, 2x - y + z = 3, x + 2y - z = 2. Write it as an augmented matrix with a bar before the constants:

\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 2 \end{array}\right]

Reduce it and the left block becomes the identity matrix. The last column then reads off the answer directly: x = 1, y = 2, z = 3. You can check by hand: 1 + 2 + 3 = 6. No substitution needed, because RREF has already done all the substituting.

When to use it, and when not

Row reduction is the workhorse behind four separate questions. The tool's modes (reduced row echelon form, row echelon form with back substitution, inverse, and determinant) cover all of them:

Solve a linear system
Augment A with the constants b and reduce. The RREF tells you the full solution set.
Invert a matrix
Augment A with the identity to form [A \mid I], reduce until the left side is I, and the right side is A^{-1}.
Find a determinant
Reduce to triangular form, track what each operation does to the determinant, and multiply the pivots.
Find the rank
Count the pivots. The number of pivots is the rank, and every reduction reports it along with the pivot columns.

Reach for a different method when the structure is special. If you only need roots of a single polynomial, use the Quadratic solver or the Polynomial toolkit. For a quick numeric answer without the worked steps, the Matrix calculator is faster. Row reduction is the right choice when you want to see every operation, or when the matrix is larger than 3 by 3 and hand expansion of a determinant becomes unwieldy.

The three operations and why they are safe

Only three moves are allowed, and none of them changes the solution set:

  • Swap two rows. Reordering equations cannot change which values satisfy them.
  • Scale a row by a non-zero constant k. Multiplying both sides of an equation by k \ne 0 keeps the same truth.
  • Add a multiple of one row to another. If two equations hold, so does any combination of them.

Each move is reversible, which is the real reason the solution set is preserved: you can always undo it with another move of the same type. Scaling by 0 is banned because you cannot undo it.

These operations do change the determinant in predictable ways: a swap flips its sign, scaling a row by k multiplies it by k, and adding a multiple of one row to another leaves it unchanged. The determinant mode uses exactly these rules.

How the elimination proceeds

For each column from left to right the algorithm does four things. Pick a pivot entry. Swap it into the current pivot row if needed. Scale that row so the pivot becomes 1. Then clear every other entry in the column by adding multiples of the pivot row. Move to the next column and repeat.

The choice of pivot is where the Pivot choice setting matters. Strict textbook order takes the first non-zero entry. The default swaps up a row with a 1 or -1 in the pivot column whenever there is one, which keeps the arithmetic in whole numbers for longer, so you see fewer fractions mid-reduction. Either way the final RREF is identical. That uniqueness is a theorem: a matrix has exactly one RREF no matter which legal path you take to it.

\left[\begin{array}{ccc} p_{11} & * & * \\ 0 & p_{22} & * \\ 0 & 0 & p_{33} \end{array}\right] \;\longrightarrow\; \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right]

Row echelon form (REF) stops at the left triangular shape, with zeros below each pivot but not yet above. From there you recover the answer by back substitution: solve the bottom equation, substitute upward. RREF simply finishes that job inside the matrix.

Reducing the demo system step by step

Start from the augmented matrix above. This uses strict first-entry pivoting so you can follow every move.

  1. Pivot is the 1 in row 1, column 1. Clear below: subtract 2 × row 1 from row 2, and subtract row 1 from row 3. Rows become [0 -3 -1 | -9] and [0 1 -2 | -4].
  2. Pivot column 2. Scale row 2 by -\tfrac{1}{3} to get [0 1 1/3 | 3]. Clear the 1 in row 1 column 2 and the 1 in row 3 column 2. Row 1 becomes [1 0 2/3 | 3], row 3 becomes [0 0 -7/3 | -7].
  3. Pivot column 3. Scale row 3 by -\tfrac{3}{7} to get [0 0 1 | 3]. Clear above: row 1 loses \tfrac{2}{3} of row 3, row 2 loses \tfrac{1}{3} of row 3.
  4. The left block is now the identity and the last column reads x = 1, y = 2, z = 3.

Verify in the second original equation: 2(1) - 2 + 3 = 3. Correct. Notice the fractions \tfrac{1}{3} and \tfrac{7}{3} that appeared along the way: the smart pivot option would have swapped rows to delay them, but the destination is the same.

Two pivoting strategies, strict first-entry and fraction-avoiding, reduce the same 3 by 3 matrix to the same RREF by different routes. Strict order hits fractions like 1/3 at step 2; the smart order swaps a row first and stays in integers one step longer. Both finish at the identity with solution x = 1, y = 2, z = 3.

Reading the result

The shape of the RREF answers the solvability question outright. Three outcomes are possible.

What the RREF of an augmented matrix tells you
Pattern in the RREFMeaningExample row
A pivot in every variable column, none past the barUnique solution[1 0 0 | 1]
A pivot sits in the constants columnNo solution[0 0 0 | 1]
A variable column with no pivotFree variable, infinitely many solutions[1 0 2 | 3]

A row like [0 0 0 | 5] says 0 = 5, which is false, so the system is inconsistent. The finished RREF scales that row to [0 0 0 | 1]: a pivot in the constants column. A column with no pivot means its variable is free: set it to a parameter t and the other variables depend on t. For example [1 0 2 | 3] with z free gives x = 3 - 2t, z = t.

Common mistakes

The errors below cost more marks than any others when students row-reduce by hand.

Writing the arithmetic as a decimal is the most common error. 1/3 rounded to 0.333 drifts, and after three or four operations the identity you expect is no longer exact. Keep everything as fractions. The tool does.

  • Combining two operations into one line. If you scale a row and add it elsewhere in a single scribble, a sign slips. Do one operation, write the new matrix, then the next.
  • Forgetting to clear above the pivot. REF only clears below. RREF needs zeros above every pivot too. Stopping early leaves you with a triangular matrix and no finished answer.
  • Scaling by zero. If a pivot slot holds a 0, you must swap a non-zero row up first, not scale.
  • Mislabeling free variables. A column with no pivot is free; a column with a pivot is determined. Reversing this breaks the parametric solution.

Related tools

Once you are comfortable with elimination, these pages handle the neighboring tasks. For LU, QR, singular value and eigenvalue decompositions, use the Matrix decompositions page. To solve a system without the full tableau, the Equation solver takes A \cdot x = b directly. For systems mixed with algebra and inequalities, the Step-by-step algebra solver shows the work. The Vector calculator covers dot and cross products once you move from systems to geometry.

Frequently asked questions

Is the RREF of a matrix unique?

Yes. A matrix has exactly one RREF regardless of which pivots you choose or in what order. Row echelon form is not unique, but reduced row echelon form is.

What is the difference between REF and RREF?

Row echelon form has zeros below each pivot and finishes with back substitution. RREF also has zeros above each pivot and every pivot equal to 1, so the answer appears directly. REF leaves a triangular matrix; RREF leaves the identity when the system has a unique solution.

How does row reduction find a determinant?

Reduce to triangular form while tracking the operations. Each swap multiplies the determinant by -1, each scale by k multiplies it by k, and adding a multiple of a row changes nothing. The determinant of the original is the product of the diagonal pivots divided back by the scalings you applied. The tool's determinant mode never scales a row, so it only has to count the swaps.

Why did fractions appear even though my matrix had only integers?

Scaling a pivot row to make the pivot 1 usually introduces a fraction, as \tfrac{1}{3} did in the worked example. The smart pivot option delays this by choosing integer-friendly pivots, but most reductions produce fractions somewhere. Keeping them exact is what guarantees a correct final answer.

Can a matrix with more rows than columns still be reduced?

Yes. Any matrix of any shape has an RREF. Extra rows typically reduce to all-zero rows at the bottom, which carry no information and can be ignored.