Chapter 4. Kernel, image, and rank
Two questions organize the study of a linear map. Which inputs have the same output, and which outputs can be reached? The kernel answers the first question through differences of inputs, and the image answers the second. Rank and nullity count the corresponding directions. Adapted bases make both visible in a matrix, and differentiation provides a function-space application of the same ideas.
4.1 Kernel
Definition 4.1.1. Let and be vector spaces and a linear map. Its kernel is1
The kernel is a subspace of the domain , consisting of the inputs mapped to the zero vector.
To verify the subspace assertion, linearity gives , so the kernel is nonempty. If and , then
Thus , proving closure under linear combinations.
Figure 4.1 emphasizes the defining property of the kernel. Every input in this subspace has the same output, the zero vector .
Null space, nullity, and homogeneous equations
The kernel is also called the null space. Here “null” refers to the zero output, while “space” refers to the subspace of inputs that produce it. A vector in the null space need not itself be zero.
The nullity of is the dimension of its null space,
When the kernel is finite-dimensional, its nullity is the number of vectors in any basis of . The null space is a subspace of inputs. Nullity counts its independent directions.
In finite dimensions, nullity is therefore a nonnegative integer. If , its basis is empty, so its nullity is . The zero vector is still in the kernel, but it contributes no independent direction. Since the kernel is a subspace of , for finite-dimensional we have
For a matrix , the same definition becomes
Thus finding the null space means solving a homogeneous system of linear equations (Margalit and Rabinoff 2019b), using the row operations of § 3.1. The dimension of this solution space is .
Information lost by the map
The kernel records changes to an input that leave its output unchanged. If , then
Conversely, if , linearity gives
so . Two inputs are indistinguishable under exactly when their difference lies in its kernel.
This matters whenever a linear map models measurements. An input can change by any vector in the kernel without changing the observed data. 2 Nullity therefore counts the independent directions of this ambiguity. § 4.3 defines rank as the dimension of the image. For finite-dimensional , the rank–nullity theorem (Theorem 4.3.10) gives
The independent output directions, counted by rank, and the input directions lost in the kernel, counted by nullity, together account for the dimension of the domain.
More generally, suppose is one solution of . Then all solutions are precisely
Indeed, adding preserves the output, and any other solution differs from by a kernel vector. For a matrix equation , this says that every solution is a particular solution plus a solution of (Margalit and Rabinoff 2019a). The image determines whether a solution exists. The kernel determines whether an existing solution is unique.
Injectivity
The general definition of injectivity is recalled in § B.2. The map is injective exactly when , or, in finite dimensions, when . If is injective, forces for every . Conversely, for a zero kernel, injectivity follows from the equivalences
4.2 Image
Definition 4.2.1. The image of is the set of its possible outputs, given by
It is a subspace of the codomain .
The image contains . For any two of its elements, write and . For scalars , linearity gives
The image is therefore nonempty and closed under linear combinations, so it is a subspace of .
Figure 4.2 shows the kernel and image inside and . The map sends every vector of to a vector in , and sends every vector of to . The codomain specifies the target space. The image consists of the outputs actually attained.
Recall surjectivity from § B.2. The codomain need not equal the image. For example, a map into need not take every real value. The map is surjective exactly when . For finite-dimensional , the subspace dimension criterion gives
4.3 Rank
Definition 4.3.1. The rank of a linear map is the dimension of its image, so
Its nullity, introduced in § 4.1, is .
Rank of a matrix
Let , with rows and columns. It represents the linear map from to . If its columns are , then
Thus is the maximum number of linearly independent columns of . Since there are columns and each belongs to ,
Both rank and nullity are nonnegative integers because they are dimensions. The kernel of is a subspace of , so
Here is the number of columns, the dimension of the domain. The rank–nullity theorem (Theorem 4.3.10) gives
Combining this identity with the rank bound yields the sharper range
Thus rank and nullity cannot be chosen independently. Their sum is .
Rank measures the non-degeneracy of a system of linear equations by counting its independent output directions. The matrix has full rank when its rank equals . A smaller rank reflects additional linear dependencies. The value of still determines whether the system is consistent, through the condition .
All columns of are independent precisely when , which requires . If , even a full-rank matrix has dependent columns, because its rank is at most . Full rank means the largest rank permitted by the input and output dimensions.
Example 4.3.2. Consider the matrix
There are three input coordinates and two output coordinates, so this defines a linear map . Its columns are
These are the images of the three standard basis vectors of . The first two span and are independent, while the third lies in their span, as shown in Figure 4.3. Consequently,
Thus has full rank, although its three columns are dependent. The images of an input basis need not be an output basis.
The same column relation identifies a nonzero kernel vector, since
Every vector of is reached, but some distinct inputs have the same output. The matrix therefore defines a surjective map with a nonzero kernel. This connects the columns’ spanning property to the image and their dependence to information lost by the map.
Examples in Euclidean spaces
Example 4.3.3. The inclusion , , has matrix
Its kernel is , and its image is the plane , with basis . The zero kernel has the empty basis, so its nullity is . The two-dimensional image gives rank .
Example 4.3.4. For , , the matrix is
The kernel is , with basis . The image is , with basis . Hence its nullity is and its rank is .
Example 4.3.5. The zero map has matrix
kernel , and image . Its nullity is and its rank is .
Example 4.3.6. For , , the matrix is
The kernel is , with basis , and the image is . Its nullity is and its rank is .
Example 4.3.7. For , , the matrix is
The kernel is , with basis . The image is , with basis . Its nullity is and its rank is .
Example 4.3.8. The zero map has matrix
kernel , and image . Its nullity is and its rank is .
Adapted bases and rank–nullity
The following lemma supplies a basis adapted to the kernel and image.
Lemma 4.3.9 (A basis adapted to the kernel and image). Let be a linear map between finite-dimensional vector spaces, with and . There is a basis
of such that is a basis of and is a basis of . If , the images of any basis of form a basis of the image.
Proof. The kernel is a subspace of the finite-dimensional space , so Proposition 1.2.9 gives a basis of . By Proposition 1.2.6, extend it to a basis of .
For any , write . Since the first basis vectors lie in the kernel, linearity gives
Thus span .
To prove independence, suppose . Then belongs to , so for some coefficients . Subtracting these expressions for yields
Independence of the full basis gives for every . The surviving images are therefore independent and form a basis of .
If , the same spanning and independence arguments apply to any basis of . If , the surviving family is empty and is the basis of the zero image, so this case is included as well. ◻
Theorem 4.3.10 (Rank–nullity). For a linear map between finite-dimensional vector spaces,
The following exercises apply these ideas.
Exercise 4.3.11
Let be the linear map given by
-
(a) Find and give a basis for it.
-
(b) Find and give a basis for it.
-
(c) Compute the nullity and rank of , and verify the rank-nullity theorem.
-
(d) Determine whether is injective and whether it is surjective. Justify both answers.
Isomorphisms
Recall the distinction between injectivity, surjectivity, and bijectivity in § B.2. A linear map is an isomorphism if it is injective and surjective. The kernel and image criteria give
Rank–nullity then implies . Equivalently, is an isomorphism precisely when
Another equivalent criterion is
Exercise 4.3.12
Answer each question using the rank-nullity theorem.
-
(a) Suppose , where , , and . Find . Is injective? Is it surjective?
-
(b) Prove that every injective linear map is an isomorphism.
-
(c) Prove that no linear map from to can be injective.
-
(d) Prove that no linear map from to can be surjective.
Figure 4.4 summarizes the rank and nullity tests for a linear map between finite-dimensional spaces. The dimension inequalities are necessary consequences of these tests. The sizes of the domain and codomain alone do not decide injectivity or surjectivity. A bijective map satisfies both sets of criteria.
A matrix adapted to the kernel and image
The aim is to choose coordinates that make the kernel and image visible in the matrix.3 As in § 3.3, each column records the image of one domain basis vector in the chosen codomain basis.
For finite-dimensional and , write , , , and . Choose the basis of Lemma 4.3.9, with the kernel vectors first. The images of the remaining vectors form a basis of . Choose a basis of whose first vectors are
The remaining vectors complete the basis of , as guaranteed by Proposition 1.2.6. 4
Now . The first columns are zero because their basis vectors lie in the kernel. For the next columns, has coefficient in position and elsewhere, giving an identity block. Every output lies in the span of , so the last rows are zero. Thus the matrix in these bases is
Figure 4.5 shows how the ordering of the two bases produces these four blocks.
To see its action, split an input coordinate column into and . Then
In other words, if , then . 5 The kernel coordinates have no effect on the output. This makes nullity and rank directly visible.
Example 4.3.13. For the standard bases of and , the prescription
gives the matrix in Equation 4.1. Here . Its nullity is and its rank is . It is injective when , and surjective when .
Exercise 4.3.14
Define the subspaces
and
Construct a linear map such that
-
(a) Give an explicit formula for .
-
(b) Write as a matrix.
-
(c) Prove that its kernel and image are exactly and , rather than merely containing these subspaces.
-
(d) Verify rank-nullity for your map.
Using the identity
The identity is a recipe for finding the matrix of in the ordered bases and . Here
means applying to each basis vector and placing the images in columns. If is the -th column of , the corresponding column of is
Thus says that each column of contains the coefficients of in the basis .
To construct , proceed one column at a time.
-
(1) Compute , using the given formula for .
-
(2) Express this output as a linear combination of . Equivalently, solve for its coefficient column . The coefficients are unique because is a basis.
-
(3) Place that coefficient column in position . Repeat in the order of , giving .
The resulting matrix has rows and columns. Multiplying should reproduce all the computed images in . This is a direct check of the construction.
For a map between coordinate spaces, let be its standard-basis matrix, and write and as matrices whose columns are the basis vectors in standard coordinates. Then , so
The matrix is invertible because its columns form a basis. In practice, one can compute and solve column by column. The next example carries out the coefficient method directly.
Example 4.3.15. Consider with standard-basis matrix
Its kernel is
with basis . Choose the domain and codomain bases
As matrices of standard coordinates, these are
Applying to the columns of gives6
The three coefficient columns are therefore
Placing these columns in order gives7
To check , multiply
Thus, for ,
Exercise 4.3.16
Let be defined by
-
(a) Find a basis for .
-
(b) Extend this basis to an ordered basis of , with spanning .
-
(c) Choose an ordered basis of such that
-
(d) Find the matrix of with respect to and .
-
(e) Verify directly the identity
An alternative normal form places the identity block first.
Proposition 4.3.17 (An image-first normal form). If represents a map of rank , there are invertible matrices and such that
Proof. Let . Reorder the basis supplied by Lemma 4.3.9 so that the surviving vectors come first. This gives a basis of . The images of its first vectors form a basis of the image, and its remaining vectors lie in the kernel. Set for , and extend these vectors to a basis of using Proposition 1.2.6.
Let and , with all columns in standard coordinates. Both matrices are invertible because their columns are bases. Let denote the displayed block matrix. The first columns of both and are , and all their remaining columns are zero. Hence . Multiplying on the right by gives , as required. ◻
The displayed block order differs from the kernel-first form in Equation 4.1.
Exercise 4.3.18
Let be finite-dimensional vector spaces, with and , and let be a linear map. Consider the sets
and
Set . Recall that the empty set is a basis of the zero subspace.
-
(a) Prove that is a subspace of .
-
(b) Prove that is a subspace of .
-
(c) Prove that there exists a row matrix basis of such that
-
(d) Prove that
This is known as the rank-nullity theorem.
-
(e) Prove that there exist row matrix bases of and of such that , where and
4.4 Differentiation as a linear map
The elements of a vector space can be functions. The space consists of continuous real-valued functions on , while consists of differentiable real-valued functions for which both and are continuous. Both are vector spaces over . In this example, no finite-dimensional assumption is imposed.
Differentiation gives a map between these spaces,
It is linear by the sum and constant factor rules of differentiation. For and ,
Thus differentiation preserves addition and scalar multiplication. Its inputs and outputs are functions. § 1.2 discusses bases beyond finite dimension, including function spaces.
Polynomial differentiation
The following exercises express differentiation in polynomial bases and examine its kernel, image, rank, and nullity.
Exercise 4.4.1
Let be the vector space of all polynomials of degree at most in the variable with real coefficients, including the zero polynomial. Take . A basis of is
-
(a) Recall that differentiation is a linear map,
Find the matrix such that
-
(b) Find the matrix such that
where .
Exercise 4.4.2
Let be the vector space of real polynomials of degree at most , including the zero polynomial, and define similarly. Consider the differentiation map
-
(a) Find , , the nullity of , and the rank of .
-
(b) Determine whether is injective and whether it is surjective.
-
(c) Find the matrix of with respect to
-
(d) Find a new ordered basis of , beginning with a basis of , for which the matrix relative to and is
Figure 4.6 shows how differentiation acts on the monomials in the given basis.