Matrix Rank Calculator

Free online Matrix Rank Calculator. Compute the rank of any m×n matrix using Gaussian elimination with full RREF steps, pivot positions, and row operations shown.

950.0K uses Updated · 2026-05-05 Runs locally · zero upload
AD

How to Use Matrix Rank Calculator

The Matrix Rank Calculator computes the rank of any real matrix through a transparent, step-by-step Gaussian elimination. Enter the matrix dimensions, fill in each cell, and the Matrix Rank Calculator instantly shows the rank, the RREF, and every row operation applied.

  1. Set rows and columns – Choose any size from 1×1 to 6×6.
  2. Enter the matrix – Fill each cell with a real number (decimals accepted).
  3. Read the rank – The Matrix Rank Calculator displays rank(A) prominently at the top of the results panel.
  4. Review the RREF – Examine the fully reduced row echelon form and trace each elimination step.

The elimination steps show every swap, scale, and elimination applied, making the Matrix Rank Calculator ideal for checking homework or understanding the algorithm.

Formula & Theory - Matrix Rank Calculator

The Matrix Rank Calculator uses Gaussian elimination with partial pivoting:

rank(A) = number of non-zero rows in the RREF of A
        = number of pivot columns in row echelon form
ConceptMeaning
PivotLeading non-zero entry in a row after elimination
RREFReduced Row Echelon Form: each pivot = 1, column has zeros elsewhere
Row spaceSpan of row vectors; has dimension equal to rank
Column spaceSpan of column vectors; has dimension equal to rank
Nullityn − rank(A); dimension of the null space (kernel)

Algorithm steps inside the Matrix Rank Calculator:

  1. Scan each column for the entry with the largest absolute value (partial pivoting) to minimize rounding errors.
  2. Swap the candidate row to the current pivot row.
  3. Scale the pivot row so the leading entry equals 1.
  4. Eliminate all entries above and below the pivot in that column.
  5. Advance to the next row and column; repeat until all columns are processed.

The rank equals the number of pivots found.

Assumptions and Limits

Entries below 10⁻¹⁰ in absolute value are treated as zero during pivot search. This threshold is appropriate for most educational examples but may misclassify near-zero pivots in highly ill-conditioned matrices. For production numerical work, use a dedicated library such as LAPACK.

Use Cases for Matrix Rank Calculator

The Matrix Rank Calculator is invaluable whenever you need to analyze the structure of a linear system:

  • Linear independence – Check whether a set of vectors is linearly independent (rank equals the number of vectors).
  • System solvability – A system Ax = b has a solution when rank(A) = rank([A|b]); it is unique when rank equals the number of unknowns.
  • Matrix invertibility – A square matrix is invertible if and only if its rank equals its order.
  • Dimension of subspaces – Determine the dimension of the column space, row space, and null space.
  • Data analysis – Identify redundant features in a design matrix by checking if the rank is smaller than the number of columns.

After running the Matrix Rank Calculator, use the pivot column positions to identify a basis for the column space, or use the nullity (n − rank) to count the free variables in the corresponding homogeneous system.

Frequently asked questions about Matrix Rank Calculator

How does the Matrix Rank Calculator compute rank?

The Matrix Rank Calculator performs Gaussian elimination with partial pivoting to reduce the matrix to its row echelon form, then counts the non-zero rows (pivot rows) to obtain the rank.

What does the rank of a matrix tell me?

The rank equals the dimension of the column space (or row space) of the matrix. It tells you how many linearly independent rows or columns exist, which determines whether a linear system has a unique solution, no solution, or infinitely many solutions.

Can the Matrix Rank Calculator handle rectangular matrices?

Yes. The Matrix Rank Calculator works with any m×n matrix up to 6×6. The rank is always at most min(m, n).

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.