maths.free › Linear Algebra › The rank of a matrix

The rank of a matrix

Counting pivots after row reduction, and what the rank says about solutions and independence.

The rank of a matrix is the number of pivots left after row reduction: the number of rows that are not combinations of the others, which always equals the number of independent columns. Row operations never change it, so reduce until the echelon form shows it.

The worked example reduces \( \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \). Clearing the first column and then the second leaves a row of zeros: the third row was \( 2 \times \) row 2 \( - \) row 1 all along, so the rank is 2, not 3. Consequences follow at once. The determinant is 0, the matrix has no inverse, and \( A\mathbf{x} = \mathbf{b} \) has a solution only for the \( \mathbf{b} \) in a plane.

Picture it: the three columns are arrows in space, and here they all lie in one plane; the rank is the dimension of the space they reach. Think it: for an \( m \times n \) matrix, rank plus nullity equals \( n \), the rank-nullity theorem. Every column is either a pivot (it adds a new direction) or free (it adds a direction to the null space).

Worked example · rank of [[1,2,3],[4,5,6],[7,8,9]]

Rank of [[1,2,3],[4,5,6],[7,8,9]]

\left[\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{matrix}\right]

Step by step

  1. \left[\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{matrix}\right]

    Row-reduce; the rank is the number of non-zero rows (pivots).

  2. \left[\begin{matrix}1 & 2 & 3\\0 & -3 & -6\\7 & 8 & 9\end{matrix}\right]

    R2 ← R2 − (\(4\))·R1 to clear column 1.

  3. \left[\begin{matrix}1 & 2 & 3\\0 & -3 & -6\\0 & -6 & -12\end{matrix}\right]

    R3 ← R3 − (\(7\))·R1 to clear column 1.

  4. \left[\begin{matrix}1 & 2 & 3\\0 & 1 & 2\\0 & -6 & -12\end{matrix}\right]

    R2 ← R2 / \(-3\) to make the pivot 1.

  5. \left[\begin{matrix}1 & 0 & -1\\0 & 1 & 2\\0 & -6 & -12\end{matrix}\right]

    R1 ← R1 − (\(2\))·R2 to clear column 2.

  6. \left[\begin{matrix}1 & 0 & -1\\0 & 1 & 2\\0 & 0 & 0\end{matrix}\right]

    R3 ← R3 − (\(-6\))·R2 to clear column 2.

  7. \operatorname{rank} A = 2

Reveal the answer
\operatorname{rank} A = 2

Now you Pick a problem, or type or draw your own. Every step, a picture, the answer hidden until you ask.

Keep your own working

A free account adds notes on every lesson, a record of what you have finished, your solved problems in one place, and a tutor you can ask about this page. The maths itself is open to everyone, signed in or not.

Sign Up Login

Symbols used here

Tap any symbol for the full definition, a picture, and what every letter in it means.

How to: The rank of a matrix

  1. Row-reduce the matrix to echelon form.
  2. Count the non-zero rows, equivalently the pivots.
  3. That count is the rank; a square matrix is invertible exactly when the rank equals its size.
  4. The nullity is the number of columns minus the rank.

Questions people ask

Is the row rank always equal to the column rank?

Yes. Row reduction shows the number of independent rows and the number of pivot columns are the same number, so a matrix has one rank whichever way you read it.

What does a determinant mean geometrically?

It is the factor by which the matrix scales area (2×2) or volume (3×3), with a negative sign if orientation flips. Zero means the matrix flattens space and cannot be undone.

What is an eigenvector?

A direction the matrix does not turn: it only stretches it by the eigenvalue. Along eigenvectors a complicated matrix acts like multiplication by a number.

Why is matrix multiplication not commutative?

Because a matrix is a transformation and AB means "do B, then A". Rotating then reflecting is not the same as reflecting then rotating.

More in Linear Algebra