Matrix Rank Calculator

Find the rank of a matrix using row reduction.
Enter a 2x2, 3x3, or 4x4 matrix and get the rank, RREF form, and nullity computed step by step.

Matrix Rank

The rank of a matrix is the number of linearly independent rows, or equivalently the number of linearly independent columns. They always match. Rank tells you the dimension of the column space: how many distinct directions the matrix can produce in its output.

A full-rank square matrix (rank = n for an n x n matrix) is invertible. A rank-deficient matrix is singular, meaning it collapses some inputs to zero output. For a square matrix these two facts are the same fact: rank = n exactly when the determinant is non-zero, and rank below n exactly when the determinant is zero.

For a system of equations Ax = b, rank determines solvability. If rank(A) equals rank of the augmented matrix [A|b] and both equal n (the number of unknowns), there is exactly one solution. If rank(A) = rank([A|b]) but both are less than n, there are infinitely many solutions. If rank(A) is less than rank([A|b]), there is no solution.

Nullity = n - rank. It counts the dimensions of the null space, the set of all vectors x for which Ax = 0. The rank-nullity theorem guarantees that rank + nullity always equals the number of columns.

This calculator uses Gaussian elimination with partial pivoting. Each step: find the largest absolute value in the current column at or below the current pivot row, swap it to the pivot position, scale to make the pivot 1, then eliminate that column in all other rows.

Enter format: “1,2,3;4,5,6;7,8,9” for a 3x3 matrix. Semicolons separate rows.

Example: the 3x3 matrix with rows [1,2,3], [4,5,6], [7,8,9] has rank 2, not 3. The third row is twice the second minus the first: 2×[4,5,6] − [1,2,3] = [8,10,12] − [1,2,3] = [7,8,9]. Because the third row can be built from the other two it adds no new direction, so only two of the three rows are independent. Nullity = 3 - 2 = 1.

That relationship is easy to miss by eye, which is the point of row reducing rather than guessing. A determinant of zero tells you dependence exists somewhere; the reduced form shows you how many independent directions actually survive.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.