Matrix Rank Calculator

Find the rank of a matrix by reducing it to Row Echelon Form. View full row operations and learn about the Rank-Nullity Theorem.

×

Matrix A

Step-by-Step Row Working

What is the Rank of a Matrix?

The rank of a matrix A is a fundamental metric in linear algebra. It represents the maximum number of linearly independent row vectors or column vectors in the matrix. An important theorem in linear algebra states that the row rank (dimension of the row space) always equals the column rank (dimension of the column space), so we simply refer to this shared value as the rank of the matrix.

If an m x n matrix has the maximum possible rank, which is the smaller of m and n, we say it has full rank. If the rank is less than this maximum, the matrix is rank-deficient, indicating linear dependency among its rows or columns.

How to Calculate Matrix Rank using Row Reduction

The easiest way to find the rank of a matrix by hand is to use Gaussian elimination to reduce the matrix to Row Echelon Form (REF) or Reduced Row Echelon Form (RREF):

  1. Perform elementary row operations to reduce the matrix to REF.
  2. Count the number of non-zero rows (rows that contain at least one non-zero entry, which will be the leading 1s or pivots).
  3. The number of non-zero rows is exactly equal to the rank of the matrix.

This works because row operations do not change the span of the row vectors. By reducing the matrix, we isolate the linearly dependent rows (which become rows of all zeros at the bottom) and highlight the independent basis vectors.

The Rank-Nullity Theorem

The rank of a matrix is directly tied to its null space via the Rank-Nullity Theorem. For any matrix A with n columns:

rank(A) + nullity(A) = n

where nullity(A) is the dimension of the null space (the solution set of Ax = 0). This means that if you know the number of columns and the rank, you can instantly determine the number of free parameters in the solution space.

Frequently Asked Questions

What is the rank of a matrix?

The rank of a matrix is the number of linearly independent rows or columns. In RREF or REF, the rank is simply the count of non-zero rows (rows containing at least one pivot).

What is the Rank-Nullity Theorem?

The Rank-Nullity Theorem states that for any matrix A with n columns, the rank of A plus the nullity (dimension of the null space) of A equals n: rank(A) + nullity(A) = n.

What is the difference between REF and RREF?

Row Echelon Form (REF) only requires that entries below each pivot are zero. Reduced Row Echelon Form (RREF) is more restrictive, requiring that entries both below and above each pivot are zero, and that all pivot values are scaled exactly to 1. RREF is unique for any given matrix, while REF is not.

What does it mean if columns are linearly independent?

A set of columns is linearly independent if no column can be written as a linear combination of the others. In this case, the null space of the matrix contains only the zero vector.