Skip to content
Glacius
Linear algebraConcept reference

Matrix rank

The rank of a matrix is the dimension of its column space, equal to the number of pivots.

On this page 7 sections
  1. Overview
  2. Rank is the dimension of a matrix’s column space
  3. For A with rows (1,2) and (2,4), subtract twice row 1 from row 2
  4. For a map y=Ax, the column space is the set of attainable outputs
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01Rank is the dimension of a matrix’s column space#

Rank is the dimension of a matrix’s column space. Each pivot column contributes one basis vector, so rank equals the number of pivots.

This matrix is in echelon form. The leading entries are in columns 1 and 3. There are two pivots, so its rank is 2.

An echelon matrix has rows (1,2,0), (0,0,3), and (0,0,0). Highlighted pivots are 1 at row 1, column 1 and 3 at row 2, column 3. There are two pivots, so rank is 2; the zero row contributes none.An echelon matrix has rows (1,2,0), (0,0,3), and (0,0,0). Highlighted pivots are 1 at row 1, column 1 and 3 at row 2, column 3. There are two pivots, so rank is 2; the zero row contributes none.
Figure 1An echelon matrix has rows (1,2,0), (0,0,3), and (0,0,0). Highlighted pivots are 1 at row 1, column 1 and 3 at row 2, column 3. There are two pivots, so rank is 2; the zero row contributes none.
Link to this figure ↗Download SVGDownload PNG
Check your reasoning

Find the rank of A. A=[1224]A=\begin{bmatrix}1&2\\2&4\end{bmatrix}

Show answer and explanation
1

Elimination leaves 1 pivot.

02For A with rows (1,2) and (2,4), subtract twice row 1 from row 2#

For A with rows (1,2) and (2,4), subtract twice row 1 from row 2. The second row becomes zero. Four nonzero entries in the original matrix produce only one pivot.

[1200]\begin{bmatrix}1&2\\0&0\end{bmatrix}
Check your reasoning

A learner counts entries and says rank 4. Correct it. A=[210034]A=\begin{bmatrix}2&1&0\\0&3&4\end{bmatrix}

Show answer and explanation
2

Elimination leaves 2 pivots.

03For a map y=Ax, the column space is the set of attainable outputs#

For a map y=Ax, the column space is the set of attainable outputs. If A has two pivots, those outputs form a two-dimensional subspace, even when each output has more than two entries.

Check your reasoning

For y=Ax, find the dimension of attainable outputs. A=[100111]A=\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix}

Show answer and explanation
2

Elimination leaves 2 pivots.

Key takeaway

Count pivot positions after elimination. Rank measures the dimension of the matrix’s attainable outputs.

  • Determine matrix rank from its pivots.

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Matrix rank.” Math behind ML. /learn/la-rank