Linear Algebra › Section B · Matrix algebra › Topic B.9

Dimension and rank

A basis turns a subspace into a coordinate system, and the number of vectors in it, the dimension, measures how big the subspace is. Counting dimensions gives the rank theorem, a simple equation that answers many questions about a matrix without solving anything.

Counting directions

A line through the origin needs one vector to describe it, and a plane needs two. That count does not depend on which vectors you choose, as long as they form a basis. This topic makes the idea precise. First, a basis gives every vector in a subspace a unique set of coordinates. Then the number of basis vectors becomes the dimension, and applying dimension to the column space and null space of a matrix gives its rank and the rank theorem.

Coordinates relative to a basis

Let \(\mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_p\}\) be a basis for a subspace \(H\). Because \(\mathcal{B}\) spans \(H\), each \(\mathbf{x}\) in \(H\) can be written \(\mathbf{x} = c_1\mathbf{b}_1 + \cdots + c_p\mathbf{b}_p\). Because \(\mathcal{B}\) is independent, the weights are unique: two sets of weights would subtract to a non-trivial combination equal to \(\mathbf{0}\). The weights are the coordinates of \(\mathbf{x}\) relative to \(\mathcal{B}\), and the vector \([\mathbf{x}]_{\mathcal{B}} = (c_1, \dots, c_p)\) is its \(\mathcal{B}\)-coordinate vector. Notice that \([\mathbf{x}]_{\mathcal{B}}\) lies in \(\mathbb{R}^p\), even when \(H\) sits inside a bigger space.

Worked example: coordinates on a plane

In the previous topic, the plane \(\text{Col}\,A\) in \(\mathbb{R}^3\) had basis \(\mathbf{b}_1 = (1, 2, -1)\) and \(\mathbf{b}_2 = (-1, 0, 3)\). Find the coordinates of \(\mathbf{x} = (1, 6, 3)\). 1. Solve \(c_1\mathbf{b}_1 + c_2\mathbf{b}_2 = \mathbf{x}\): the entries give \(c_1 - c_2 = 1\), \(2c_1 = 6\) and \(-c_1 + 3c_2 = 3\). 2. The second equation gives \(c_1 = 3\), and the first then gives \(c_2 = 2\). 3. Check the third: \(-3 + 6 = 3\). So \(\mathbf{x}\) is in the plane and \([\mathbf{x}]_{\mathcal{B}} = (3, 2)\). The basis turns the plane into a copy of \(\mathbb{R}^2\): each point of the plane matches one pair of numbers.

Dimension

A key fact, proved in "The dimension of a vector space", is that every basis of a subspace \(H\) has the same number of vectors. That number is the dimension of \(H\), written \(\dim H\). The zero subspace has no basis vectors and is given dimension 0. Since the standard basis of \(\mathbb{R}^n\) has \(n\) vectors, \(\dim \mathbb{R}^n = n\). A line through the origin has dimension 1, and a plane through the origin has dimension 2. Any subspace of \(\mathbb{R}^n\) has dimension at most \(n\), and the only \(n\)-dimensional subspace of \(\mathbb{R}^n\) is \(\mathbb{R}^n\) itself.

Rank and nullity

The rank of a matrix \(A\) is the dimension of its column space: \(\text{rank}\,A = \dim \text{Col}\,A\). Since the pivot columns of \(A\) form a basis for \(\text{Col}\,A\), the rank is the number of pivot columns. The dimension of the null space, sometimes called the nullity, is the number of basis vectors from the parametric solution of \(A\mathbf{x} = \mathbf{0}\), one per free variable. So one echelon form tells you both numbers: count the pivot columns for the rank, and count the other columns for \(\dim \text{Nul}\,A\).

The rank theorem

Every column of \(A\) is either a pivot column or the column of a free variable, so the two counts add up to the number of columns. For a matrix with \(n\) columns,

\text{rank}\,A + \dim \text{Nul}\,A = n

This is the rank theorem. In the language of transformations, the \(n\) input dimensions of \(\mathbf{x} \mapsto A\mathbf{x}\) split into those that survive, forming the column space, and those crushed to \(\mathbf{0}\), forming the null space. Because the rank counts pivots, and a matrix has at most one pivot per row and per column, the rank of an \(m \times n\) matrix is at most the smaller of \(m\) and \(n\).

Worked example: using the rank theorem

1. In the previous topic, the \(3 \times 4\) matrix with rows (1, 3, −1, 2), (2, 6, 0, 2), (−1, −3, 3, −4) had 2 pivot columns. So its rank is 2 and \(\dim \text{Nul}\,A = 4 - 2 = 2\), matching the two null-space basis vectors found there. 2. A \(7 \times 9\) matrix has a 3-dimensional null space. Its rank is \(9 - 3 = 6\). Then \(\text{Col}\,A\) is a 6-dimensional subspace of \(\mathbb{R}^7\), so it is not all of \(\mathbb{R}^7\), and some systems \(A\mathbf{x} = \mathbf{b}\) are inconsistent. 3. Can a \(4 \times 6\) matrix have a 1-dimensional null space? Its rank is at most 4, so \(\dim \text{Nul}\,A \ge 6 - 4 = 2\). No.

The basis theorem

If you already know the dimension, half the work of checking a basis disappears. Let \(H\) be a \(p\)-dimensional subspace of \(\mathbb{R}^n\), with \(p \ge 1\). Then any set of exactly \(p\) linearly independent vectors in \(H\) is automatically a basis for \(H\), and so is any set of exactly \(p\) vectors in \(H\) that spans \(H\). For example, to show that two vectors in a plane through the origin form a basis for that plane, it is enough to check that neither is a multiple of the other.

Rank and the invertible matrix theorem

Dimension adds new statements to "The invertible matrix theorem". For an \(n \times n\) matrix \(A\), each of the following is equivalent to \(A\) being invertible: (m) the columns of \(A\) form a basis of \(\mathbb{R}^n\); (n) \(\text{Col}\,A = \mathbb{R}^n\); (o) \(\dim \text{Col}\,A = n\); (p) \(\text{rank}\,A = n\); (q) \(\text{Nul}\,A = \{\mathbf{0}\}\); (r) \(\dim \text{Nul}\,A = 0\). The rank theorem links the last four directly: for a square matrix, rank \(n\) and nullity 0 are the same statement.

Common mistakes to avoid

First, using the number of rows in the rank theorem; it counts columns. Second, saying \(\text{Col}\,A\) is \(\mathbb{R}^2\) because it is a plane: a plane in \(\mathbb{R}^3\) has dimension 2 but is not \(\mathbb{R}^2\), although coordinates make it look like a copy. Third, assuming that a matrix whose rank equals its number of rows has independent columns; that needs rank equal to the number of columns. Fourth, using the basis theorem with the wrong number of vectors, or with vectors that are not in \(H\).

Key takeaways

A basis B of a subspace gives each vector unique coordinates, collected in the coordinate vector [x]_B. Every basis of a subspace has the same number of vectors, its dimension; dim Rⁿ = n and the zero subspace has dimension 0. The rank of A is dim Col A, the number of pivot columns, and dim Nul A is the number of free variables. The rank theorem: rank A + dim Nul A = n, the number of columns. In a p-dimensional subspace, p independent vectors or p spanning vectors form a basis. For an n × n matrix, rank n, Col A = Rⁿ and Nul A = {0} each mean A is invertible.

Flashcards

Flashcard

Coordinates relative to B

The unique weights c₁, …, cₚ with x = c₁b₁ + ⋯ + cₚbₚ

Unique because B is independent.

Test your understanding

Question 1 of 5

B = {(1, 1), (1, −1)} is a basis of R². What is the B-coordinate vector of x = (5, 1)?

Question 2 of 5

A 6 × 10 matrix has rank 4. What is the dimension of its null space?

Question 3 of 5

An 8 × 5 matrix has linearly independent columns. What are its rank and the dimension of its null space?

Question 4 of 5

H is a 3-dimensional subspace of R⁵, and u, v, w are three linearly independent vectors in H. What follows?

Question 5 of 5

A is a 5 × 5 matrix whose null space has dimension 1. Which statement is true?

← Previous topicNext topic →