The rank-nullity theorem states that the dimension of the domain of a linear function is equal to the sum of the dimensions of its range (i.e., the set of values in the codomain that the function actually takes) and kernel (i.e., the set of values in the domain that are mapped to the zero vector in the codomain).

Table of contents

First of all, we need to define a linear map between two vector spaces and , that is, a function such thatfor any two vectors and any two scalars and .

The set is called the domain of .

Being a vector space, the domain has a dimension, denoted bywhich is equal to the number of elements of a basis of (any basis; remember that all the bases of a space have the same number of elements).

The range (or image) of is the subset of the codomain that comprises all the values taken by as varies over :

As we proved in the lecture on the range of a linear map, is a subspace of . Its dimension is called rank and is denoted by

The null space (or kernel) of is the subset of the domain that comprises all the values mapped by into the zero vector of :

As we proved in the lecture on the null space of a linear map, is a subspace of . Its dimension is called nullity and is denoted by

Here comes one of the most important theorems in linear algebra, called rank-nullity theorem.

Proposition Let and be two linear spaces. Let be a linear map. If is finite, then

Proof

Let and choose a basis for . Letand choose a basis for . By the basis extension theorem, we can form a new basis for that contains :possibly after re-numbering the vectors of the basis . Any can be uniquely written as a linear combination of the basis above:where are scalars. Then, we havewhere in step we have used the fact that belong to the null space of and, as a consequence, . The equation just derived holds for any , which implies that is spanned by the vectorsWe need to prove that these vectors are linearly independent. By contradiction, suppose they are not. Then, they can be linearly combined so as to obtain the zero vector:where are the coefficients of the linear combination (not all equal to zero). By the linearity of , we have thatwhich means that the vectorbelongs to . Since is a basis for , we can write the latter vector as a linear combination of with coefficients :orThus, there is a linear combination of the basis of , with coefficients not all equal to zero, that gives the zero vector as a result. This is impossible because the elements of a basis are linearly independent. Therefore, we have arrived at a contradiction, which means that the vectorsmust be linearly independent. We have already proved that they span . So, we conclude that they are a basis for . Hence,

Below you can find some exercises with explained solutions.

As we demonstrated in the lecture on linear maps, a linear map is completely specified by the values taken by on a basis for .

Let be a basis for and be a basis for .

Specify the function as follows:

Find the dimensions of and and then use the rank-nullity theorem to find the nullity of .

Solution

Since there are three vectors in the basis , we have thatAny vector can be written as a linear combinationwhere are scalars. The transformed vectorscan be written as linear combinations of and . As a consequence, is a basis for . Therefore,To conclude, we get

Please cite as:

Taboga, Marco (2017). "The rank-nullity theorem", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/rank-nullity-theorem.

The book

Most of the learning materials found on this website are now available in a traditional textbook format.