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):
- Perform elementary row operations to reduce the matrix to REF.
- Count the number of non-zero rows (rows that contain at least one non-zero entry, which will be the leading 1s or pivots).
- 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.