Rank of a Matrix and Consistency of Linear Equations

By Engr. Henry Akpan

How Much Information Does a Matrix Hold?

Three equations in three unknowns usually have exactly one solution. But sometimes one equation is secretly a combination of the others and adds no new information, and sometimes two equations contradict each other. The rank of a matrix measures how many genuinely independent rows (or columns) it has, and it tells you at once whether a system of linear equations has one solution, infinitely many, or none. This tutorial explains how to find the rank by row reduction, the link between rank and determinants, the rank test for consistency (the Rouché–Capelli theorem), and worked examples of each case, as taught in first- and second-year linear algebra courses.

Definition of Rank

The rank of a matrix A is the maximum number of linearly independent rows of A. It is always equal to the maximum number of linearly independent columns, so "row rank = column rank". Equivalent descriptions:

  • The number of non-zero rows left after reducing A to row echelon form.
  • The number of leading entries (pivots) in the echelon form.
  • The size of the largest square submatrix with a non-zero determinant.
  • The dimension of the space spanned by the columns (the column space).

For an m × n matrix, rank ≤ the smaller of m and n. A square n × n matrix has full rank (rank n) exactly when its determinant is non-zero, which is exactly when it is invertible.

Finding the Rank of a Matrix by Row Reduction

Use the elementary row operations, which never change the rank:

  • swap two rows;
  • multiply a row by a non-zero number;
  • add a multiple of one row to another.

Reduce to row echelon form (each leading entry is to the right of the one above, with zeros below it), then count the non-zero rows.

Example 1. Find the rank of the matrix with rows (1, 2, 3), (2, 4, 6) and (1, 1, 1).

  • R2 → R2 − 2R1: (2, 4, 6) − (2, 4, 6) = (0, 0, 0).
  • R3 → R3 − R1: (1, 1, 1) − (1, 2, 3) = (0, −1, −2).
  • Swap R2 and R3 to put the zero row at the bottom: rows (1, 2, 3), (0, −1, −2), (0, 0, 0).

There are two non-zero rows, so the rank is 2. This was visible from the start: row 2 is exactly twice row 1, so it adds no new information.

Example 2. Find the rank of the 2 × 3 matrix with rows (1, 3, −2) and (−2, −6, 4).

R2 + 2R1 = (0, 0, 0), so the rank is 1.

Rank and Determinants

For a square matrix, a quick first test is the determinant.

  • If det A ≠ 0, the n × n matrix has rank n.
  • If det A = 0, the rank is less than n; look at smaller submatrices (minors) to find it.

Example 3. For what value of k does the matrix with rows (1, 1, 1), (1, 2, 3) and (1, 4, k) have rank less than 3?

Expand the determinant along the first row: 1 × (2k − 12) − 1 × (k − 3) + 1 × (4 − 2) = 2k − 12 − k + 3 + 2 = k − 7. The determinant is zero when k = 7. For k = 7 the rank is 2 (the 2 × 2 minor from the first two rows and columns, 1 × 2 − 1 × 1 = 1, is non-zero); for every other k the rank is 3.

Systems of Linear Equations and Rank

Write a system as Ax = b, where A is the coefficient matrix. Form the augmented matrix [A | b] by attaching b as an extra column. The Rouché–Capelli theorem says:

  • If rank A ≠ rank [A | b], the system is inconsistent: no solution.
  • If rank A = rank [A | b] = n (the number of unknowns), there is a unique solution.
  • If rank A = rank [A | b] = r < n, there are infinitely many solutions, with n − r free parameters.

Geometrically, for three unknowns each equation is a plane. A unique solution means the planes meet at one point; infinitely many means they share a line (or a plane); no solution means they have no common point.

Example 4: Infinitely Many Solutions

Solve x + 2y − z = 3, 2x − y + 3z = 1, 3x + y + 2z = 4.

Row reduce the augmented matrix, with rows (1, 2, −1 | 3), (2, −1, 3 | 1), (3, 1, 2 | 4):

  • R2 → R2 − 2R1: (0, −5, 5 | −5).
  • R3 → R3 − 3R1: (0, −5, 5 | −5).
  • R3 → R3 − R2: (0, 0, 0 | 0).

rank A = 2 = rank [A | b], but there are 3 unknowns. So the system is consistent with infinitely many solutions and 3 − 2 = 1 free parameter.

Let z = t. From row 2: −5y + 5t = −5, so y = 1 + t. From row 1: x + 2(1 + t) − t = 3, so x = 1 − t.

The solution is x = 1 − t, y = 1 + t, z = t for any real t: a line of solutions. For example, t = 0 gives (1, 1, 0); check the third equation: 3 + 1 + 0 = 4 ✓.

Example 5: No Solution

Change only the last right-hand side: x + 2y − z = 3, 2x − y + 3z = 1, 3x + y + 2z = 5.

The same row operations give R3 − 3R1 = (0, −5, 5 | −4), and then R3 − R2 = (0, 0, 0 | 1). The last row says 0 = 1, which is impossible. Now rank A = 2 but rank [A | b] = 3, so the system is inconsistent. The third plane is parallel to the line where the first two meet, and never touches it.

This shows why rank matters: the coefficient matrix is the same in Examples 4 and 5, but the right-hand side decides between infinitely many solutions and none.

Example 6: A Unique Solution

Solve x + y + z = 6, x + 2y + 3z = 14, x + 4y + 9z = 36.

  • R2 − R1: (0, 1, 2 | 8). R3 − R1: (0, 3, 8 | 30).
  • R3 − 3R2: (0, 0, 2 | 6).

There are three pivots, so rank A = rank [A | b] = 3 = n, and the solution is unique. Back-substitute: 2z = 6 gives z = 3; y + 6 = 8 gives y = 2; x + 2 + 3 = 6 gives x = 1. The solution is (1, 2, 3).

Homogeneous Systems

A homogeneous system has b = 0, so Ax = 0. It always has the trivial solution x = 0, so it is never inconsistent. It has non-trivial solutions exactly when rank A < n, which for a square matrix means det A = 0. This fact is the basis of finding eigenvectors, where you solve (A − λI)x = 0 after choosing λ to make the determinant zero.

The Rank–Nullity Theorem

For an m × n matrix A, the solutions of Ax = 0 form a subspace called the null space, and its dimension is the nullity. The rank–nullity theorem states:

rank A + nullity A = n (the number of columns).

In Example 4 the coefficient matrix has rank 2 and n = 3, so the nullity is 1: the solutions of Ax = 0 form a line, which is why the solutions of Ax = b form a line too (one particular solution plus every solution of the homogeneous system).

Summary

  • Rank = number of independent rows = number of non-zero rows in echelon form = number of independent columns.
  • A square matrix has full rank exactly when its determinant is non-zero.
  • Compare rank A with rank [A | b]: different means no solution; equal to n means a unique solution; equal but less than n means infinitely many.
  • The number of free parameters is n − rank.
  • rank A + nullity A = number of columns.

Related Tutorials