Matrix Rank Calculator

Compute the rank of a matrix via row reduction.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a matrix to get its rank, the number of linearly independent rows. [1 2 3; 2 4 6; 1 0 1] has rank 2 because row 2 is twice row 1.

How to use

1
Step 1
Type the matrix, one row per line.
2
Step 2
Choose rank.
3
Step 3
Press Calculate to see the reduced form and the rank.

How it works

Row reduction turns the matrix into echelon form, and the rank is the count of non-zero rows left. The rank can never exceed the smaller of the row and column counts. A square matrix has full rank exactly when its determinant is non-zero.

rank(A) = number of pivots after row reduction      rank ≤ min(rows, columns)

Worked example

A dependent row

Input
[1 2 3; 2 4 6; 1 0 1]
Output
2
Walkthrough
Row 2 − 2×Row 1 = 0, so one row vanishes. The two remaining rows are independent, giving rank 2.

Limitations

  • Entries must be real numbers; complex entries are refused.
  • Works on rectangular matrices, e.g. a 2×4 one.
  • The matrix can be any size, but every row needs the same number of entries.

Questions

What is the rank of [1 2 3; 2 4 6; 1 0 1]?
The rank is 2, because the second row is twice the first and only two rows are independent.
What is the rank of [1 2; 3 4]?
2, because its determinant −2 is not zero.
What is the rank of [1 0 2 3; 0 1 1 1]?
2, the maximum for a matrix with two rows.

Features

  • Row reduction steps
  • Rectangular matrices
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Vectors | Essence of linear algebra

    3Blue1Brown

    Linear algebra intuition for matrix and vector tools.

    Watch on YouTube
  • Variables, expressions, and equations

    Khan Academy

    Expression language for scientific and expression calculators.

    Watch on YouTube