Math calculator

Row Echelon Form Calculator

Elimination, with every step shown.

Reduce it, exactly

With the rank, the pivots and the null space.

Any shape. One row per line.

3 × 3

rank 2

The rows span a 2-dimensional space and the nullity is 1. Rank plus nullity is 3, the column count — that is the rank-nullity theorem, and it holds for every matrix.

Original

The 3 by 3 matrix as entered.
123
456
789

Reduced row echelon form

The reduced form, with the 2 pivot columns marked.
10−1
012
000

Null space basis

1 vector, one per free column. The matrix sends each of them to exactly zero.
1−21

Rank

2

number of independent rows

Nullity

1

dimension of the null space

Pivot columns

1, 2

where the leading 1s sit

Free columns

3

one basis vector each

Full row rank

no

a row is a combination of others

Full column rank

no

a column is a combination of others

The elimination, step by step

  1. 1Step 1Subtract 4 × row 1 from row 2 to clear column 1.
  2. 2Step 2Subtract 7 × row 1 from row 3 to clear column 1.
  3. 3Step 3Divide row 2 by −3 to make the pivot exactly 1.
  4. 4Step 4Subtract 2 × row 2 from row 1 to clear column 2.
  5. 5Step 5Subtract −6 × row 2 from row 3 to clear column 2.

Every operation is one of three: swap two rows, scale a row, or subtract a multiple of one row from another.

  • Every step is exact. Deciding whether a pivot is zero is what fixes the rank, and in floating point a pivot that should be zero arrives as 1e−17 — so a matrix with a genuine dependency comes back with its rank one too high, and no tolerance setting fixes that in general.
  • The rank is 2, so the rows span a 2-dimensional space. The nullity is 1, and rank plus nullity is 3 — the number of columns, which is the rank-nullity theorem.
  • The rank is below both dimensions, so there are genuine dependencies: at least one row is a combination of the others, and so is at least one column.

Rank is a yes/no question about zero pivots, which is exactly the kind of question floating point answers wrongly.

What this tool shows

Rank is decided entirely by which pivots are zero — which is why this page keeps every entry exact. In floating point a pivot that should be zero arrives as 1e−17, and a matrix with a genuine dependency comes back full rank.

  • Reduced row echelon form, step by step
  • The rank of any matrix
  • Pivot columns and free columns
  • A basis for the null space
  • The rank-nullity theorem, with your numbers
  • Why floating point gets rank wrong
Every step shown Rank and nullity Exact pivots Null space basis

Any shape. The rank, pivots and null space come with it.

Updated 7 September 2026 · Works in any browser, no installation

Reduced row echelon form has a leading 1 in each row, each further right than the last, and zeros above and below it. The number of those leading 1s is the rank. Everything else — independence, solvability, the null space — can be read off from there.

At a glance

Formula shown
Reduced row echelon form has a leading 1 in each non-zero row, each further right than the one above, and zeros everywhere else in a pivot column. The rank is the number of pivots, and rank plus nullity equals the number of columns.
Scenario support
Solving a system of equations; finding whether a set of vectors is independent; finding a basis for a null space or a column space.
Educational estimate
Planning support from the values you enter — not professional advice.

The three row operations

Elimination uses exactly three moves, and no others are needed.

Swap two rows. Multiply a row by a non-zero number.Add a multiple of one row to another.

What makes them safe is that every one is reversible, so none of them changes the solution set of the system the matrix represents. You are rewriting the same equations, not different ones.

The “non-zero” in the second is essential. Multiplying a row by zero destroys an equation and cannot be undone, which is exactly why it is excluded.

Echelon and reduced echelon

Two forms, and the difference is how far the work is taken.

Row echelon form clears only below each pivot, leaving a staircase. Solving from it needs back-substitution, and it is what Gaussian elimination produces.

Reduced row echelon form also clears above each pivot and scales every pivot to 1. The solution can be read straight off, with no substitution at all.

Reduced form has one property that plain echelon form lacks: it is unique. Any two people reducing the same matrix reach the same reduced form, whatever order they work in. Plain echelon form depends on the choices made along the way, which is why this page produces the reduced one.

Why exactness matters

This is the section that justifies how the page is built.

Rank is the number of non-zero pivots, so computing it is a sequence of questions of the form “is this entry zero?”. That is precisely the kind of question floating point answers badly.

Take a matrix whose third row is exactly row one plus row two. Its rank is 2, and elimination should leave the third row entirely zero. In double precision the subtractions leave something like 2.2e−16 instead, the algorithm sees a non-zero pivot, and the reported rank is 3.

The usual fix is a tolerance: treat anything below some ε as zero. It helps, and it cannot be made correct in general — a matrix with genuinely tiny entries then has its real pivots discarded. Any threshold is wrong for some matrix.

Exact rational arithmetic sidesteps the question entirely. Zero is zero, the rank is right, and there is no parameter to tune. The cost is that it only works for the modest sizes this page handles — which is exactly the range where a person is trying to understand the answer rather than just consume it.

Rank, nullity and the null space

Rank is the number of pivots: how many genuinely independent rows there are, and the dimension of the space they span.

Nullity is the number of free columns: how many independent vectors the matrix sends to zero.

Rank + nullity = number of columns. Always, for every matrix. Every input dimension is either preserved by the transformation or crushed by it, and the two counts have to add up.

The null space basis falls straight out of the reduced form: set one free variable to 1, the rest to 0, and solve for the pivots. One vector per free column, and the page checks that the matrix sends each of them to exactly zero.

For a system of equations these numbers are the whole answer. Full column rank means at most one solution; a nullity above zero means infinitely many, with the null space describing exactly how they vary.

Where it gets used

Solving systems. Reduce the augmented matrix and read off the answer. It is what elimination was invented for.

Testing independence. Stack vectors as rows and reduce: the rank is how many are genuinely independent, and a zero row shows one was redundant.

Finding bases. The pivot columns of the original matrix form a basis for its column space, and the free columns generate the null space.

Inverting. Reducing [A | I] to [I | A⁻¹] is the same algorithm applied to a wider matrix.

Sources and methodology

Gaussian elimination and the rank-nullity theorem are standard; these are the references.

Method. Every entry stays an exact rational through the whole elimination. That is not a refinement here, it is the difference between a right and a wrong answer: rank is decided entirely by which pivots are zero, and a floating-point pivot that should be zero arrives as a tiny non-zero number, so a rank-deficient matrix is reported as full rank. The suite builds matrices with a deliberate dependency — a third row that is an exact combination of the first two — and requires the reported rank to be at most 2. That engine is verified on every change against 104 hand-written assertions, including that a row built as an exact combination of two others never raises the reported rank above two, across three hundred generated cases, and that every null space basis vector is sent to exactly zero. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

MatrixAdd, multiply, transpose and power matrices with exact fractions — showing both AB and BA, because those are different matrices and often not even the same shape.
DeterminantThe determinant of any square matrix up to 8×8, exact — by fraction-free elimination rather than the cofactor expansion that becomes unusable past 4×4.
Matrix InverseThe inverse in exact fractions, with the product A × A⁻¹ displayed — and it is exactly the identity, not the identity plus rounding noise.
System of EquationsSolve linear systems in up to six unknowns with exact fractions — row operations, the matrix form, Cramer’s rule, and the parametric family when there is no single answer.
EigenvalueEigenvalues and the characteristic polynomial up to 6×6 — the polynomial exact and the roots decimal, because roots of a polynomial are generally irrational.
Matrix DecompositionLU, QR and Cholesky — with LU exact and the other two decimal, because square roots are irrational, and the page labels which is which rather than presenting them alike.

More in Math, or browse all calculators.

Read the guide

Elimination on an augmented matrix is how a system of equations gets solved — the System of Equations Calculator does that directly.

Educational use disclaimer

This is an educational tool. Elimination is exact, so a rank-deficient matrix is reported as rank-deficient rather than as full rank with a small pivot.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the row echelon page keeping every entry exact, because rank is decided entirely by which pivots are zero — and in floating point a pivot that should be zero arrives as 1e−17, so a matrix with a genuine dependency comes back full rank.
  2. Explains why a tolerance cannot fix that in general: any threshold discards the real pivots of a matrix with genuinely tiny entries, so it only moves the boundary to a different matrix.
  3. Reports the rank-nullity theorem with the reader's own numbers, and gives a null space basis the page verifies is sent to exactly zero.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.