Matrix Rank — Row-Reduce and Count the Pivots

The rank = number of independent rows = number of nonzero pivots after Gaussian elimination. Watch each pivot get claimed and dependent rows collapse to all-zeros.

step 0

Matrix (row reduction)

Click Edit matrix to type your own integer entries, then press Step.
Scanning columns left to right; the first nonzero entry at/below the pivot row becomes a pivot.
pivot pivot row row being eliminated zero (dependent) row

Rank = pivot count

0
pivots found so far
Each pivot marks one independent row. Rows that reduce to all zeros were dependent and do not count.
rank-nullity: rank + nullity = n (columns)
Press Step to begin. We scan each column for a pivot, swap it up, eliminate the column from the other rows, and increment the rank counter.
Self-contained visualization over exact integer/rational arithmetic (no rounding here). Over the reals a tolerance eps decides "zero"; over Z/pZ and GF(2) zero is exact. See junior.md for the walkthrough and professional.md for the proof that #pivots = rank and that row rank = column rank.