We believe math and science education should be free and accessible to everyone. Why education matters >

Loading calculator…

Matrix Rank Calculator

Find the rank of any 2x2, 3x3, or 4x4 matrix using Gaussian elimination. This calculator performs row reduction to echelon form and counts the non-zero rows to determine the rank.

The rank of a matrix is the number of linearly independent rows (or equivalently, columns). It tells you the dimension of the vector space spanned by the matrix's rows.

How to Find the Rank

  1. Write the matrix.
  2. Use row operations (swap rows, multiply a row by a scalar, add a multiple of one row to another) to reduce it to row echelon form (REF).
  3. Count the non-zero rows. That count is the rank.

Worked Example

Matrix: [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Row reduce:

  • R2 = R2 - 4R1: [0, -3, -6]
  • R3 = R3 - 7R1: [0, -6, -12]
  • R3 = R3 - 2R2: [0, 0, 0]

REF: [[1, 2, 3], [0, -3, -6], [0, 0, 0]]

Two non-zero rows, so rank = 2. This means the three rows are not all independent; the third row is a linear combination of the first two.

Key Concepts

  • Full rank: A square n x n matrix has full rank if rank = n. This means it is invertible and its determinant is non-zero.
  • Nullity: The dimension of the null space = number of columns minus rank. Rank + nullity = number of columns (rank-nullity theorem).
  • Rank and systems of equations: A system Ax = b has a solution only if rank(A) = rank([A|b]).

Did this solve your problem?

Frequently Asked Questions