How to find the dimensionality, nullity, and rank of a vector space

 
 
 
 
 

Defining the dimensionality of a vector set

In this lesson we want to talk about the dimensionality of a vector set, which we should start by saying is totally different than the dimensions of a matrix.

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

As we already know, the dimensions of a matrix are always given by the number of rows and columns, as

???\text{dimensions}=\text{\#rows}\times\text{\#columns}???

But the dimensionality of a vector space refers to something completely different. There are lots of different ways to describe dimensionality, and we can draw lots of conclusions about the space by knowing its dimension, but for now let’s just say that the dimension of a vector space is given by the number of basis vectors required to span that space.

And speaking of vector spaces, we’ve just been looking at two really important ones: the null space and the column space. So let’s take some time now to talk about the dimension of each of those spaces.

Dimension of the null space (nullity)

The dimension of the null space of a matrix ???A??? is also called the nullity of ???A???, and can written as either ???\text{Dim}(N(A))??? or ???\text{nullity}(A)???.

The nullity of the matrix will always be given by the number of free variables (non-pivot variables) in the system. So if we put the matrix into reduced row-echelon form, we’ll be able to quickly identify both the pivot columns (with the pivot variables) and the free columns (with the free variables). The number of free variables is the nullity of the matrix.

The reason that we can get the nullity from the free variables is because every free variable in the matrix is associated with one linearly independent vector in the null space. Which means we’ll need one basis vector for each free variable, such that the number of basis vectors required to span the null space is given by the number of free variables in the matrix.

 
 

How to find the dimensionality, nullity, and rank for any matrix


 
 

Take the course

Want to learn more about Linear Algebra? I have a step-by-step course for that. :)

 
 

 
 

Finding the nullity of a matrix

Example

Find the nullity of ???K???.

Screen Shot 2021-08-16 at 3.50.01 PM.png

To find the nullity of the matrix, we need to first find the null space, so we’ll set up the augmented matrix for ???K\vec{x}=\vec{O}???, then put the matrix in reduced row-echelon form.

Screen Shot 2021-08-16 at 3.50.19 PM.png

Normally at this point, we’d rewrite this matrix as a system of equations on our way toward finding the null space. But we can actually find the nullity directly from the rref matrix. We can see that the first column is a pivot column, and the other three columns are free columns, with free variables. Because there are three free variables, the nullity is

???\text{Dim}(N(K))=\text{nullity}(K)=3???

We can confirm this if we go forward with finding the null space. The rref matrix can be written as just the equation

???x_1-2x_2+x_3+3x_4=0???

which we can solve for the single pivot variable.

???x_1=2x_2-x_3-3x_4???

We can rewrite this as a linear combination.

???\begin{bmatrix}x_1\\ x_2\\ x_3\\ x_4\end{bmatrix}=x_2\begin{bmatrix}2\\ 1\\ 0\\ 0\end{bmatrix}+x_3\begin{bmatrix}-1\\ 0\\ 1\\ 0\end{bmatrix}+x_4\begin{bmatrix}-3\\ 0\\ 0\\ 1\end{bmatrix}???

Then the null space of ???K??? is the span of the vectors in this linear combination equation.

???N(K)=\text{Span}\Big(\begin{bmatrix}2\\ 1\\ 0\\ 0\end{bmatrix},\begin{bmatrix}-1\\ 0\\ 1\\ 0\end{bmatrix},\begin{bmatrix}-3\\ 0\\ 0\\ 1\end{bmatrix}\Big)???

The null space confirms what we found already about the dimension of the null space. We found ???3??? spanning vectors that form a basis for the null space, which matches the dimension of the null space, ???\text{Dim}(N(K))=\text{nullity}(K)=3???.



Dimension of the column space (rank)

Similarly, the dimension of the column space of a matrix ???A??? is also called the rank of ???A???, and can written as either ???\text{Dim}(C(A))??? or ???\text{rank}(A)???.

The rank of the matrix will always be given by the number of pivot variables in the system. So if we put the matrix into reduced row-echelon form, we’ll be able to quickly identify the pivot columns (with the pivot variables). The number of pivot variables is the rank of the matrix.

The reason that we can get the rank from the pivot variables is because every pivot variable in the matrix is associated with one linearly independent vector in the column space. Which means we’ll need one basis vector for each pivot variable, such that the number of basis vectors required to span the column space is given by the number of pivot variables in the matrix.

Let’s look at an example where we bring back a matrix from the lesson on the column space of a matrix.


Example

Find the rank of ???A???.

Screen Shot 2021-08-16 at 3.50.45 PM.png

To find the rank of the matrix, we need to first put the matrix in reduced row-echelon form. We already did this in the previous lesson, so we’ll abbreviate the steps here.

Screen Shot 2021-08-16 at 3.51.06 PM.png

Now that the matrix is in reduced row-echelon form, we can find the rank directly from the matrix. We can see that the first three columns are pivot columns (with pivot variables), and the last column is a free column. Because there are three pivot variables, the rank is

???\text{Dim}(C(A))=\text{rank}(A)=3???

Then the column space of ???A??? is the span of the first three column vectors of ???A???, since those were the columns that became the pivot columns when we put the matrix into rref.

And this confirms what we found already about the dimension of the column space. We’re saying that there are ???3??? spanning vectors that form a basis for the column space, which matches the dimension of the column space, ???\text{Dim}(C(A))=3???.


The reason that we can get the nullity from the free variables is because every free variable in the matrix is associated with one linearly independent vector in the null space.

Nullity vs. rank

Notice how, in every matrix, every column is either a pivot column or a free column. What we can say then is that the sum of the nullity and the rank of a matrix will be equal to the total number of columns in the matrix.

???\text{\#columns}=\text{rank}+\text{nullity}???

For instance, in a ???5???-column matrix, if the rank is ???3??? (because you put the matrix into rref and found ???3??? pivot columns), then the nullity is ???5-3=2???. Or in a ???3???-column matrix, if the nullity is ???1??? (because you put the matrix into rref and found ???1??? free column), then the rank is ???3-1=2???.

 
 

Get access to the complete Linear Algebra course