Euler Hall — free maths guides

Define the rank as the number of pivots

Count the pivots of a matrix after elimination. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

The definition, and the three things it is not

The rank ofAA is the number of pivots after elimination.

That is the whole definition. Three things it is emphatically not:

| Not the rank | Why not | |---|---| | the number of rowsmm | a zero row loses its pivot | | the number of columnsnn | a dependent column loses its pivot | | the number of nonzero entries | a matrix full of nonzeros can have rank 1 |

The rank is bounded bymin⁡(m,n)\min(m,n) and can be anything from00 (the zero matrix) up to that bound.

Why "number of pivots" is the same as "number of independent columns"

Two statements that have to match:

  • - Pivot columns are independent. Look at the reduced matrix. Each pivot column has a 1 in its own row and zeros in the other pivot rows, so no combination of the pivot columns can give zero unless all coefficients are zero.
  • - Every other column is a combination of them. In the reduced form, a free column is visibly a combination of the pivot columns — its entries are the coefficients. Row operations do not change which combinations of columns give zero, so the same relation holds in the original matrix.

So the pivot columns form a maximal independent set, and their number is both the pivot count and the size of the largest independent set of columns. That is why the two readings agree.

The rank is also the dimension of the column space, and — a genuinely surprising fact proved later in the module — equal to the dimension of the row space.

Reading a rank off a matrix

Question. What is the rank ofA=[103215103]A=\begin{bmatrix}1&0&3\\2&1&5\\1&0&3\end{bmatrix}?

Step 1. Row 3 equals row 1. Subtract it away: the third row becomes zero.

Step 2. Now row 2 is(2,1,5)(2,1,5) and row 1 is(1,0,3)(1,0,3). Subtract twice row 1 from row 2:(0,1,−1)(0,1,-1).

Step 3. The matrix is[10301−1000]\begin{bmatrix}1&0&3\\0&1&-1\\0&0&0\end{bmatrix}.

Verdict. Two pivots, so the rank is 2. Three rows, three columns, two pivots — and column 3 is3⋅(column 1)−1⋅(column 2)3\cdot(\text{column 1})-1\cdot(\text{column 2}), which is exactly the dependence that costs a pivot.

A sanity check that costs nothing: the matrix is square with a zero row, so its rank must be below 3. It is, so the answer is at least consistent.

By the end you can
  • Count the pivots of a matrix after elimination
  • Recognise a rank from the shape of the matrix
  • Match matrices to their ranks
Test yourself

<ol class="steps"> <li>Rank of[1224]\begin{bmatrix}1&2\\2&4\end{bmatrix}? <em>(1: row 2 is twice row 1.)</em></li> <li>Rank of the all-ones4×44\times4 matrix? <em>(1: every row is a multiple of the first.)</em></li> <li>Largest possible rank of a5×35\times3 matrix? <em>(3, since there are only three columns.)</em></li> <li>Rank of[012003]\begin{bmatrix}0&1&2\\0&0&3\end{bmatrix}? <em>(2: pivots in columns 2 and 3.)</em></li> <li>If a3×33\times3 matrix has rank 3, what is its determinant? <em>(Nonzero — the three columns are independent, so the matrix is invertible.)</em></li> </ol>

Answers
  1. 1. 1. Subtracting twice row 1 from row 2 leaves a zero row.
  2. 2. 1. Subtracting row 1 from each other row leaves three zero rows.
  3. 3. 3, the column count, which is the smaller dimension.
  4. 4. 2. The first column is entirely zero, so it cannot pivot.
  5. 5. Nonzero. Rank 3 on a square matrix means invertible, and invertible means the determinant is not zero.
Work out where to start — free, no accountAnswer six real questions — free, no account