100% Free No Sign-Up Unlimited Use No Limits Secure & Private
PDF Tools Calculators Categories Guides Contact No Sign-Up Needed to Use This Site
Matrix A

Find the rank of any matrix by reducing it to row-echelon form, with every row swap, scaling, and elimination step shown along the way.

How It Works

How Matrix Rank Calculator Works

The calculator performs Gaussian elimination with partial pivoting: for each column, it picks the row with the largest absolute value in that column as the pivot (for numerical stability), swaps it into position if needed, scales that row so the pivot becomes 1, and then eliminates every entry below it in that column using row subtraction.

This repeats column by column until no more pivots can be found. The rank of the matrix is simply the number of non-zero rows remaining once this row-echelon form is reached — equivalently, the number of pivot positions located during elimination.

The nullity (number of "free" directions with no pivot) is then reported as columns − rank, following the rank-nullity theorem, along with a verdict of whether the matrix is "full rank" (rank equals the smaller of its row/column count) or "rank-deficient."

Worked Example

See It In Action

For the matrix [[1,2,3],[2,4,6],[1,0,-1]]: row 2 is exactly twice row 1, so eliminating it leaves an all-zero row; row 3 reduces to a non-zero row that is independent of row 1. Row reduction leaves exactly 2 non-zero rows, so rank = 2 (not the full 3), and nullity = 3 − 2 = 1 — confirming the matrix is rank-deficient because one row was a multiple of another.
Real-World Use Cases

Who Uses Matrix Rank Calculator and Why

  • Determining how many equations in a system are truly independent before attempting to solve it.
  • Checking whether a set of vectors is linearly independent by finding the rank of the matrix they form.
  • Diagnosing why a system has infinitely many solutions by identifying that its coefficient matrix is rank-deficient.
  • Confirming a matrix is full rank before relying on operations, like inversion, that require it.
Common Mistakes

Mistakes to Avoid

  • Assuming rank always equals the number of rows — a row that's a multiple of, or a combination of, another row reduces the rank below the full row count, as in a matrix where row 2 is exactly twice row 1.
  • Confusing rank with the determinant — rank is defined even for non-square or singular matrices, where a determinant either doesn't apply or is simply zero.
  • Overlooking that "full rank" for a non-square matrix means the rank equals the smaller of its row or column count, not necessarily both.
Pro Tips

Tips for Best Results

  • Use a rank lower than the row count as a direct explanation for redundant equations in a system, rather than treating it as an unexpected result.
  • Check the reported nullity (columns − rank) to understand how many free (unconstrained) directions the matrix leaves in a related system.
Troubleshooting

Fixing Common Problems

The rank came out lower than the number of rows I entered. — This means at least one row is linearly dependent on the others (a multiple or combination of them) — this is a valid result, not an error, and reflects genuine redundancy in your data.

I'm not sure if my matrix is full rank. — Compare the reported rank to the smaller of the row count or column count — if they match, the matrix is full rank; if the rank is lower, it's rank-deficient.

Glossary

Terms Explained

Rank: The number of linearly independent rows (or columns) in a matrix, found as the number of non-zero rows after row reduction.

Rank-nullity theorem: The rule stating rank + nullity always equals the number of columns in a matrix.

FAQ

Frequently Asked Questions

What does the "rank" of a matrix actually tell you?
Rank measures how many rows (or columns) of the matrix are truly independent of each other — it tells you the dimension of the space the matrix's rows or columns actually span, which is central to knowing whether a linear system has a unique solution.
Why does the calculator swap rows during elimination?
Swapping in the row with the largest pivot value at each step (partial pivoting) avoids dividing by very small or zero numbers, which keeps the elimination numerically stable and avoids rounding errors blowing up.
What is the rank-nullity theorem?
It states that for any matrix, rank + nullity = number of columns — in other words, the "independent" directions (rank) and the "free" directions (nullity) always add up to the total number of columns.
Can a non-square matrix have full rank?
Yes — full rank for a non-square matrix simply means its rank equals the smaller of its row count or column count, since that's the maximum possible rank for that shape.