Skip to main content

Section 2.9 Dimension and Rank

Handout 2.9 Dimension and Rank

Key idea: Many different bases may be chosen for a given subspace. The choice can dramatically affect coordinate representations.

Example 2.49.

Sketch \(\vec b_1 + \vec b_2\) in each coordinate system below.
Two coordinate systems showing different basis orientations.
Two grids with different bases; vectors \(\vec b_1\) and \(\vec b_2\) are drawn.

Definition 2.50 Coordinates Relative to a Basis.

Let \(\mathcal{B}=\{\vec b_1,\dots,\vec b_p\}\) be a basis for a subspace \(H\text{.}\) For any \(\vec x\in H\text{,}\) the coordinates of \(\vec x\) relative to \(\mathcal B\) are the scalars \(c_1,\dots,c_p\) such that
\begin{equation*} \vec x = c_1\vec b_1 + \cdots + c_p\vec b_p. \end{equation*}
The coordinate vector of \(\vec x\) relative to \(\mathcal B\) is:
\begin{equation*} [\vec x]_{\mathcal B} = \begin{bmatrix} c_1\\ \vdots\\ c_p \end{bmatrix}. \end{equation*}

Example 2.51.

\begin{equation*} \vec v_1=\begin{bmatrix}1\\0\\1\end{bmatrix},\qquad \vec v_2=\begin{bmatrix}1\\1\\1\end{bmatrix},\qquad \vec x=\begin{bmatrix}5\\3\\5\end{bmatrix}. \end{equation*}
Verify that \(\vec x\) is in the span of \(\mathcal B=\{\vec v_1,\vec v_2\}\text{,}\) and compute \([\vec x]_{\mathcal B}\text{.}\)
Solution.
Let \(H = \Span\{\vec v_1, \vec v_2\}\text{.}\) Note that \(\mathcal{B}\) is a basis for \(H\) since the vectors in \(\mathcal{B}\) both span \(H \) and are linearly independent.
We determine if \(\vec x \in H\) by seeing whether \(\vec x\) can be written as a linear combination of the basis vectors; that is, we need to find whether there exists \(c_1, c_2 \in \mathbb{R}\) so that \(\vec x = c_1\vec v_1 + c_2 \vec v_2\text{.}\) Note that
\begin{equation*} \begin{bmatrix} \vec v_1 \amp \vec v_2 \amp \rvert \amp \vec x\end{bmatrix} = \begin{bmatrix} 1 \amp 1 \amp \rvert \amp 5 \\ 0 \amp 1 \amp \rvert \amp 3 \\ 1 \amp 1 \amp \rvert \amp 5 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 0 \amp \rvert \amp 2 \\ 0 \amp 1 \amp \rvert \amp 3 \\ 0 \amp 0 \amp \rvert \amp 0 \end{bmatrix} \end{equation*}
Therefore, we have that \(\vec x = 2\vec v_1 +3\vec v_2 \in H\text{.}\) Since there were no free variables, we see that this is the ONLY way of expressing \(\vec x \) as a linear combination of the basis vectors. Therefore,
\begin{equation*} [\vec x]_{\mathcal{B}} = \begin{bmatrix} 5 \\ 3 \\ 5 \end{bmatrix}_{\mathcal{B}} = \begin{bmatrix} 2 \\ 3 \end{bmatrix} \end{equation*}
The coordinate vector of \(\vec x\) relative to \(\mathcal{B}\) being a vector in \(\mathbb{R}^2\) is not a mistake. This must happen since the basis \(\mathcal{B}\) contains two vectors. If you chose a different basis for \(H\text{,}\) say \(\mathcal{C} = \left\{2\vec v_1, \vec v_1 + \vec v_2\right\}\text{,}\) then \([\vec x]_{\mathcal{C}}\) would still be a vector in \(\mathbb{R}^2\text{,}\) but would most likely be different.

Example 2.52.

\begin{equation*} \vec v_1=\begin{bmatrix}-1\\0\\1\\0\end{bmatrix},\qquad \vec v_2=\begin{bmatrix}0\\1\\3\\2\end{bmatrix},\qquad \vec v_3=\begin{bmatrix}3\\6\\2\\-1\end{bmatrix},\qquad \vec x=\begin{bmatrix}3\\11\\4\\-4\end{bmatrix}, \end{equation*}
and \(H = \textrm{Span}\{\vec v_1, \vec v_2, \vec v_3\}\text{.}\)

(a)

Verify that \(\mathcal B=\{\vec v_1,\vec v_2,\vec v_3\}\) is a basis for \(H\text{.}\)
Solution.
Note that the matrix
\begin{equation*} \begin{bmatrix} \vec v_1 \amp \vec v_2 \amp \vec v_3 \end{bmatrix} = \begin{bmatrix} -1 \amp 0 \amp 3 \\ 0 \amp 1 \amp 6 \\ 1 \amp 3 \amp 2 \\ 0 \amp 2 \amp -1 \end{bmatrix} \sim \begin{bmatrix} -1 \amp 0 \amp 3 \\ 0 \amp 1 \amp 6 \\ 0 \amp 3 \amp 5 \\ 0 \amp 2 \amp -1 \end{bmatrix} \sim \begin{bmatrix} -1 \amp 0 \amp 3\\ 0 \amp 1 \amp 6 \\ 0 \amp 0 \amp -13 \\ 0 \amp 0 \amp -13 \end{bmatrix} \end{equation*}
has a pivot in each column. Therefore, the columns are linearly independent. Since the vectors in \(\mathcal{B}\) span \(H \) and are linearly independent, \(\mathcal{B}\) is a basis for \(H\text{.}\)

(b)

Determine if \(\vec x \in H\text{.}\)
Solution.
Note that
\begin{equation*} \begin{bmatrix} \vec v_1 \amp \vec v_2 \amp \vec v_3 \amp \rvert \amp \vec x \end{bmatrix} = \begin{bmatrix} -1 \amp 0 \amp 3 \amp \rvert \amp 3 \\ 0 \amp 1 \amp 6 \amp \rvert \amp 11 \\ 1 \amp 3 \amp 2 \amp \rvert \amp 4 \\ 0 \amp 2 \amp -1 \amp \rvert \amp -4 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 0 \amp 0 \amp \rvert \amp 3 \\ 0 \amp 1 \amp 0 \amp \rvert \amp -1 \\ 0 \amp 0 \amp 1 \amp \rvert \amp 2 \\ 0 \amp 0 \amp 0 \amp \rvert \amp 0 \end{bmatrix}\text{.} \end{equation*}
So, \(\vec x = 3\vec v_1 - 1\vec v_2 + 2\vec v_3 \in H\text{.}\)

(c)

Compute \([\vec x]_{\mathcal B}\text{.}\)
Solution.
Since \(\vec x = 3\vec v_1 - 1\vec v_2 + 2\vec v_3\text{,}\) we have
\begin{equation*} [\vec x]_{\mathcal{B}} = \begin{bmatrix} 3 \\ 11 \\ 4 \\ -4 \end{bmatrix}_{\mathcal{B}} = \begin{bmatrix} 3 \\ -1 \\ 2 \end{bmatrix}\text{.} \end{equation*}

Definition 2.53 Dimension.

The dimension of a nonzero subspace \(H\text{,}\) written \(\operatorname{dim}(H)\text{,}\) is the number of vectors in any basis of \(H\text{.}\) We define \(\operatorname{dim}(\{0\})=0\text{.}\)

Note 2.55.

Some Examples:
  1. \(\operatorname{dim}(\mathbb{R}^n)=n\text{.}\)
  2. \(H=\{(x_1,\dots,x_n): x_1+\cdots+x_n=0\}\) has dimension \(n-1\text{.}\)
  3. \(\operatorname{dim}(\operatorname{Nul}A)\) is the number of free variables.
  4. \(\operatorname{dim}(\operatorname{Col}A)\) is the number of pivotal columns.

Definition 2.56 Rank.

The rank of a matrix \(A\) is the dimension of its column space.

Example 2.57.

Compute \(\operatorname{rank}(A)\) and \(\operatorname{dim}(\operatorname{Nul}A)\) and find a basis for \(\Col(A)\) and \(\Nul(A)\text{,}\) where
\begin{equation*} A = \begin{bmatrix} 2 \amp -3 \amp -12 \amp 4 \amp -7\\ 4 \amp -5 \amp -22 \amp 3 \amp 1\\ -5 \amp 2 \amp 19 \amp -10 \amp -10\\ 0 \amp 2 \amp 4 \amp 7 \amp -4 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 0 \amp -3 \amp 0 \amp 8\\ 0 \amp 1 \amp 2 \amp 0 \amp 5\\ 0 \amp 0 \amp 0 \amp 1 \amp -2\\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \end{bmatrix}. \end{equation*}
Solution.
First, note that we can express the column space as the span of the columns of \(A \text{;}\) that is,
\begin{equation*} \Col(A) = \Span\left\{\begin{bmatrix} 2 \\ 4 \\ -5 \\ 0 \end{bmatrix}, \begin{bmatrix} -3 \\ -5 \\ 2 \\ 2 \end{bmatrix}, \begin{bmatrix} -12 \\ -22 \\ 19 \\ 4 \end{bmatrix}, \begin{bmatrix} 4 \\ 3\\ -10 \\ 7 \end{bmatrix}, \begin{bmatrix} -7 \\ 1 \\ -10 \\ -4 \end{bmatrix}\right\}\text{.} \end{equation*}
This does not mean that the set containing those five vectors forms a basis. In fact, we know from TheoremΒ 1.47 that no set containing five vectors from \(\mathbb{R}^4\) can form a basis. Since Columns 3 and 5 of \(A \) do not correspond to pivot columns, they are linearly dependent on the other vectors and are not needed in the span. Therefore, we have that a basis for \(\Col(A)\) is
\begin{equation*} \mathcal{B} = \left\{\begin{bmatrix} 2 \\ 4 \\ -5 \\ 0 \end{bmatrix}, \begin{bmatrix} -3 \\ -5 \\ 2 \\ 2 \end{bmatrix}, \begin{bmatrix} 4 \\ 3\\ -10 \\ 7 \end{bmatrix}\right\}\text{.} \end{equation*}
Thus, \(\rank(A) = 3\text{.}\)
From NoteΒ 2.55, \(\dim(\Nul(A))\) is equal to the number of free variables. Therefore, \(\dim(\Nul(A)) = 2\text{.}\) We can find a basis for \(\Nul(A)\) by finding two vectors which are linearly independent satisfy \(A\vec x = \vec 0\text{.}\) You can attempt to find such vectors by guessing (strategically). If that fails, you can proceed to following our normal procedure. Note that we have already been given an echelon form of \(A\) and can see that Columns 3 and 5 correspond to free variables. Solving for the pivot varialbes in terms of \(x_3\) and \(x_5\) yields \(x_1 = 3x_3 - 8x_5\text{,}\) \(x_2 = -2x_3 - 5x_5\text{,}\) and \(x_4 = 2x_5\text{.}\) It follows that
\begin{equation*} \Nul(A) = \left\{\begin{bmatrix} 3x_3 - 8x_5 \\ -2x_3 - 5x_5 \\ x_3 \\ 2x_5 \\ x_5 \end{bmatrix} \ {\Large \rvert} \ x_3,x_5 \in \mathbb{R}\right\} = \Span\left\{\begin{bmatrix} 3 \\ -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} -8 \\ -5 \\ 0 \\ 2 \\ 1 \end{bmatrix}\right\}\text{.} \end{equation*}
Thus, a basis for \(\Nul(A)\) is
\begin{equation*} \mathcal{C} = \left\{\begin{bmatrix} 3 \\ -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} -8 \\ -5 \\ 0 \\ 2 \\ 1 \end{bmatrix}\right\}\text{.} \end{equation*}

Example 2.61.

For each part below, give an example of a \(2\times 3\) matrix \(A\) in RREF with the stated property, if possible.

(a)

\(\operatorname{rank}(A)=3\)
Solution.
In order for \(\rank(A) = 3\text{,}\) NoteΒ 2.55 states that \(A\) must have 3 pivots. Since \(A\) only has two rows, it cannot have 3 pivots. Therefore, this is not possible.

(b)

\(\operatorname{rank}(A)=2\)
Solution.
In order for \(\rank(A) = 2\text{,}\) the matrix \(A\) must have 2 pivots. This is possible, for example \(A = \begin{bmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \end{bmatrix}\text{.}\) In this case,
\begin{equation*} \Col(A) = \Span\left\{\begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\} = \mathbb{R}^2\text{.} \end{equation*}

(c)

\(\operatorname{dim}(\operatorname{Null}A)=2\)
Solution.
In order for \(\dim(\Nul(A)) = 2\text{,}\) NoteΒ 2.55 states that \(A\) must have two free variables. Therefore, \(A = \begin{bmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \end{bmatrix}\) works. In this case,
\begin{equation*} \Nul(A) = \Span\left\{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}\right\}\text{.} \end{equation*}

(d)

\(\operatorname{Nul}(A)=\{\vec 0\}\)
Solution.
Recall from DefinitionΒ 2.53 that \(\dim\left(\left\{\vec 0\right\}\right) = 0\text{.}\) Therefore, \(A\) should have no free variables, or equivalently, \(A \) should have a pivot in every column. This is impossible for a matrix with more columns than rows. Therefore, there is no \(2 \times 3\) matrix \(A\) such that \(\Nul(A) = \{\vec 0 \}\text{.}\)