The examples of the last section kept producing the
same coincidence. Differentiation has a kernel of dimension and an image of
dimension , and
. The trace on gives again. This
section proves that the same equation holds for every
linear map on a finite-dimensional space, with no
matrices at all, and then turns it into the most useful
counting tool of the chapter. Chapter 3 meets the
equation again for matrices, counted a different
way.
2.3.1. Rank and
nullity
The two numbers in the equation are dimensions of the
two subspaces of Definition 2.2.1 and
Definition 2.2.2, so
they are defined whenever those subspaces are
finite-dimensional.
Definition
2.3.1 (Nullity)
Let be a linear map with
finite-dimensional. The nullity of
is .
Definition
2.3.2 (Rank)
Let be a linear map with finite-dimensional.
The rank of is .
If is
finite-dimensional, both numbers are defined: is a subspace of
, hence
finite-dimensional (Theorem 1.6.7), and
is
finite-dimensional by Theorem 2.2.4. The
nullity counts the independent directions that destroys; the rank
counts the independent directions that survive in the
output.
Example
(Rank and Nullity in Examples)
Find the nullity and rank of (a) differentiation
; (b) the zero map and the
identity on a space of dimension .
A nonexample. The integration map
of Example (Integration)
has nullity , but
its image contains the independent list for
every , so the
image is not finite-dimensional (Theorem 1.6.3) and
is not
defined. What separates from the examples above
is that its domain is infinite-dimensional.
2.3.2. The
theorem
We want to prove that for every linear with
finite-dimensional, This is a dimension formula, so we look for
the proof pattern that proved the last one, the
Dimension Formula for Sums (Theorem 1.7.3): take
a basis of the smallest space, extend
it, make a Big Claim about the vectors that were added,
and count. Which space is the smallest? The kernel lives
in and the image
lives in ,
different spaces that cannot be compared. The only
inclusion available is . So we start with a basis of
and extend
it to a basis of .
The image has to be reached by applying , and the kernel vectors
contribute nothing when we do. So the natural candidate
for a basis of is the images of the added
vectors.
Theorem
2.3.1 (Rank–Nullity Theorem)
Let be a
finite-dimensional vector space, let
be any vector
space over the same field, and let be
linear. Then
and are
finite-dimensional, and
Idea. The picture is the whole
proof. The ’s all go to
; the ’s carry
everything else.
① Take a basis of , the smallest space in sight. ② Extend it to
a basis of
(Basis
Extension). ③ Big Claim: is a basis of . Spanning:
apply to a
general vector of ; the -terms die
because they are in the kernel. Independence:
the only way to use linearity is backwards, turning
into . Then is in the kernel, where the ’s are a basis,
and the big basis of finishes it. ④ Count:
.
This is the move of Theorem 1.7.3: basis
of the smallest space, extend, Big Claim, count. The new
ingredient is that the Big Claim is about the
images of the added vectors.
Proof.Step 1:
bases. By Theorem 2.2.1, is a subspace of
. Since is finite-dimensional,
so is (Theorem 1.6.7), and
it has a basis with (Corollary 1.5.5).
This list is linearly independent in , so by the Basis
Extension Theorem (Theorem 1.6.5) there
are such that is a basis of
. Thus .
Step 2: the Big Claim.
Claim. The list is a basis of .
Proof.Spanning. By Theorem 2.2.4 applied
to the basis of Step 1, Each , since ,
and deleting a zero vector from a list does not change
its span, because lies in every
span (Theorem 1.3.5).
Hence .
Independence. Let
satisfy . By Theorem 2.1.4, , so . Since spans , there are
with Rearranging, . This is a combination of the basis
of
, which is
linearly independent, so all its coefficients are . In particular .
Hence is linearly independent.
Step 3: count. By the claim, has a basis of
length , so it is
finite-dimensional with (Definition 1.6.1).
Therefore as claimed.
The proof reads correctly when (injective : the ’s are a basis of
) and when (: the claim
says has the
empty basis). Notice what was not used:
nothing about
beyond its being a vector space. The theorem counts only
in the domain.
Applied to the matrix map ,
the theorem says . In particular,
the solutions of a homogeneous system in
unknowns form a
subspace of dimension , whatever method is used to
find the rank. Chapter 3 proves this equation a second
way, by counting the free and pivot columns of a reduced
matrix; here we counted basis vectors, and no row
operation appeared.
In the online version you can test the count on any
matrix map.
from sympy import MatrixA = Matrix([ [1, 2, 0, 3], [2, 4, 1, 8], [-1, -2, 1, -1],])rank = A.rank() # dim im T_Anullity =len(A.nullspace()) # dim ker T_A: length of a basis of the kernelprint("rank =", rank, " nullity =", nullity, " dim of domain =", A.cols)rank + nullity == A.cols
2.3.3. Count
instead of check
Rank–Nullity links the two questions of the last
section. Injectivity is about the kernel, surjectivity
about the image, and the theorem says the two dimensions
add up to a fixed number. So one controls the other.
Corollary
2.3.2 (Consequences of Rank–Nullity)
Let and be finite-dimensional
vector spaces over , and let be
linear.
(a) is injective if and
only if .
(b) is surjective if and
only if .
(c) If , then
is
not injective.
(d) If , then
is
not surjective.
(e) If , then
is injective
is surjective is bijective.
Proof.
(a) By Theorem 2.2.3, is injective if and
only if . A finite-dimensional space is
exactly when its dimension is , because the empty list
is a basis of and a basis
of length spans
only .
So is injective
if and only if , which by Theorem 2.3.1 means
.
(b) If is surjective, then
(Theorem 2.2.2), so
.
Conversely, if , then is a subspace of of the same dimension,
so by Theorem 1.6.8, and
is
surjective.
(c) Since is a subspace of
, by Theorem 1.6.7. By
(a), is not
injective.
(e) If , then (a)
and (b) have the same right-hand side, so is injective if and
only if it is surjective. Hence either property gives
both, which is bijectivity; and bijective maps are
injective by definition.
Part (e) is the linear version of the pigeonhole
principle for finite sets (Theorem 0.4.9), with
dimension in place of the number of elements. It is a
count instead of check: to show that a
map between spaces of the same finite dimension is
bijective, check only the kernel,
usually the easier half, and let the count supply
surjectivity. For with square, it says that
if has only the trivial solution then
is solvable for every ; Chapter 3 puts
that equivalence at the center of its account of square
systems. Parts (c) and (d) are the linear version of “no
injection from a bigger finite set into a smaller one,
and no surjection the other way”.
Warning.Both finiteness
and equal dimension are needed. Rank–Nullity
requires to be
finite-dimensional; may be anything, as for
the inclusion , with nullity and rank . Part (e) fails when
the spaces are infinite-dimensional, even for an
operator :
the right shift
on is
injective but not surjective, and the left shift is surjective but not
injective (Example (The Shifts: Injective but Not Surjective, and Conversely)).
And the hypothesis cannot be dropped: from to is injective but
not surjective.
Quick check. Answer each question
with a count.
(a) Can a linear map
be
injective?
(b) Is there a
linear map with ?
(c) A linear
operator on satisfies
.
Must be
surjective?
Solution.
(a) No, by Corollary 2.3.2 (c):
.
Concretely, the rank is at most , so the nullity is at
least .
(b) No. By Theorem 2.3.1 the rank
would be ,
but has dimension at most .
(c) Yes. The
domain and codomain are both , of
dimension , and
is injective, so
it is surjective by Corollary 2.3.2
(e).
2.3.4. Existence
with conditions on derivatives
The same argument works when some conditions are on
derivatives, where no Vandermonde matrix is at hand.
Example
(Prescribing Values and Slopes)
Show that for all there is exactly
one with Hence find the cubic that rises from at to at with slope at both ends.
Kernel. Let with . Then
and
. So , and the remaining conditions read Subtracting twice the first from the second
gives , and
then . Hence
.
Count., so is bijective by Corollary 2.3.2 (e).
Surjectivity is existence for every , and
injectivity is uniqueness.
For the data , try , which already has .
Then and give and . So ; by
uniqueness it is the only such cubic.
2.3.5. Dimensions
of subspaces cut out by conditions
Many subspaces are defined as “all vectors satisfying
some linear conditions”, which is to say as the kernel
of a linear map. If the map is
surjective, Rank–Nullity gives the
dimension of the kernel at once, and surjectivity is
often easy to see.
Example
(Dimension of a Kernel from a Surjective Map)
Without the theorem, (a) needs an explicit basis of
matrices
together with a proof of independence and spanning. With
it, one matrix of trace is enough.
2.3.6.
Exercises
A. Check your
understanding
Exercise
(A1)
(a) Define the rank
and the nullity of a linear map.
(b) State the
Rank–Nullity Theorem, with its hypotheses.
(c) True or false:
there is an injective linear map . Justify
your answer.
(d) True or false:
if is
finite-dimensional and is linear with , then is injective. Justify
your answer.
(e) True or false:
every injective linear map is
surjective. Justify your answer.
(f) Name the four
steps of the proof of Rank–Nullity.
(f) Take a basis
of ; extend
it to a basis of ;
prove the Big Claim that the images of the added vectors
form a basis of (spanning, then independence);
count.
B. Practice
Exercise
(B1: Verifying Rank–Nullity)
For each map, find a basis of the kernel and a basis
of the image, and verify that .
(a), .
(b), .
Solution.
(a) is linear by Theorem 0.8.5.
Kernel: for , means
and , that
is, . The list spans
, and it is
independent by Theorem 1.4.4, so it
is a basis. Image: and are
independent, so they span a -dimensional subspace of
, which is
(Theorem 1.6.8). So
with
basis . Hence .
(b) is linear because the
transpose is (Example (Trace and Transpose)).
Kernel: means and , so
, with basis .
Image: each is symmetric, since , and each symmetric equals . So is the space of
symmetric matrices, with basis (as in Exercise (B2: Kernels and Images Beyond )).
Hence .
Exercise
(B2: Bijective by the Kernel Alone)
Let and
, .
(a) Show that is a linear map into
and
that . Deduce that is bijective.
(b) Hence show that
there is exactly one with , and find it.
Solution.
(a) For ,
, so Linearity: , using Example (Differentiation).
If , then
for
each ; since in , every . So , and is injective (Theorem 2.2.3). Domain
and codomain have the same finite dimension , so is bijective by Corollary 2.3.2
(e).
(b) With , surjectivity gives
a solution and injectivity makes it unique. By the
formula in (a), , so we need
, , . Hence . Check: , and .
Exercise
(B3: A Dimension via a Surjective Map)
Let . Use a
surjective linear map to show that . Hence find a
basis of .
Solution. Define , . It is linear by Theorem 0.8.5, and
. Its
image contains and , which are independent, so is a -dimensional subspace of
and equals
(Theorem 1.6.8). Thus
, and by
Theorem 2.3.1, .
The polynomials , , and vanish at and and have degrees , so they
lie in . They are
nonzero of distinct degrees, hence independent (Theorem 1.4.4).
There are of them, so they form a basis of (Theorem 1.6.4).
C. Going deeper
Exercise
(C1: A Lower Bound for the Rank of a Composite)
Let and be finite-dimensional,
let be a vector
space, all over ,
and let and be linear. Write for the composite
, which is
linear (see the note before Exercise (C1: Kernels and Images of a Composite)).
Let be the restriction of to , that is, for .
(a) Show that is linear, that
, and that .
(b) Deduce that
.
(c) Hence prove
Sylvester’s inequality: .
Hint: for (c), compare with
.
Solution.
(a) satisfies (LT1)
and (LT2) because
does and is a
subspace (Theorem 2.2.2) with
the operations of . A vector lies in exactly when
with
for some , that is, when ;
so . A vector lies
in
exactly when ; so .
(b) is
finite-dimensional with , since is finite-dimensional
(Theorem 2.2.4). By Theorem 2.3.1 applied
to and by (a),
(b) On , let . Then
exactly when ,
so is the
-axis; and the
outputs fill
the -axis, so
is the -axis too. On , let . Its kernel is , and its image is
. Both maps are
matrix maps, hence linear.