"Rank theorem" redirects here. For the rank theorem of multivariable calculus, see
constant rank theorem .
The dimension of the domain of a linear map is the sum of the dimensions of its kernel and its image
Rank–nullity theorem
The rank–nullity theorem is a theorem in linear algebra , which asserts that the dimension of the domain of a linear map is the sum of its rank (the dimension of its image ) and its nullity (the dimension of its kernel ).[ 1] [ 2] [ 3] [ 4]
Stating the theorem
Let
V
{\displaystyle V}
,
W
{\displaystyle W}
be vector spaces, where
V
{\displaystyle V}
is finite dimensional. Let
T
:
V
→
W
{\displaystyle T\colon V\to W}
be a linear transformation. Then
Rank
(
T
)
+
Nullity
(
T
)
=
dim
V
,
{\displaystyle \operatorname {Rank} (T)+\operatorname {Nullity} (T)=\dim V,}
where
Rank
(
T
)
:=
dim
(
Image
(
T
)
)
{\displaystyle \operatorname {Rank} (T):=\dim(\operatorname {Image} (T))}
and
Nullity
(
T
)
:=
dim
(
Ker
(
T
)
)
.
{\displaystyle \operatorname {Nullity} (T):=\dim(\operatorname {Ker} (T)).}
One can refine this theorem via the splitting lemma to be a statement about an isomorphism of spaces, not just dimensions. Explicitly, since T induces an isomorphism from
V
/
Ker
(
T
)
{\displaystyle V/\operatorname {Ker} (T)}
to
Image
(
T
)
{\displaystyle \operatorname {Image} (T)}
, the existence of a basis for V that extends any given basis of
Ker
(
T
)
{\displaystyle \operatorname {Ker} (T)}
implies, via the splitting lemma, that
Image
(
T
)
⊕
Ker
(
T
)
≅
V
{\displaystyle \operatorname {Image} (T)\oplus \operatorname {Ker} (T)\cong V}
. Taking dimensions, the Rank-Nullity theorem follows immediately.
Matrices
Since
Mat
m
×
n
(
F
)
≅
Hom
(
F
n
,
F
m
)
{\displaystyle \operatorname {Mat} _{m\times n}(\mathbb {F} )\cong \operatorname {Hom} (\mathbb {F} ^{n},\mathbb {F} ^{m})}
,[ 5] matrices immediately come to mind when discussing linear maps. In the case of an
m
×
n
{\displaystyle m\times n}
matrix, the dimension of the domain is
n
{\displaystyle n}
, the number of columns in the matrix. Thus the Rank-Nullity theorem for a given matrix
M
∈
Mat
m
×
n
(
F
)
{\displaystyle M\in \operatorname {Mat} _{m\times n}(\mathbb {F} )}
immediately becomes
Rank
(
M
)
+
Nullity
(
M
)
=
n
.
{\displaystyle \operatorname {Rank} (M)+\operatorname {Nullity} (M)=n.}
Proofs
Here we provide two proofs. The first[ 2] operates in the general case, using linear maps. The second proof[ 6] looks at the homogeneous system
A
x
=
0
{\displaystyle \mathbf {Ax} =\mathbf {0} }
for
A
∈
Mat
m
×
n
(
F
)
{\displaystyle \mathbf {A} \in \operatorname {Mat} _{m\times n}(\mathbb {F} )}
with rank
r
{\displaystyle r}
and shows explicitly that there exists a set of
n
−
r
{\displaystyle n-r}
linearly independent solutions that span the kernel of
A
{\displaystyle \mathbf {A} }
.
While the theorem requires that the domain of the linear map be finite-dimensional, there is no such assumption on the codomain. This means that there are linear maps not given by matrices for which the theorem applies. Despite this, the first proof is not actually more general than the second: since the image of the linear map is finite-dimensional, we can represent the map from its domain to its image by a matrix, prove the theorem for that matrix, then compose with the inclusion of the image into the full codomain.
First proof
Let
V
,
W
{\displaystyle V,W}
be vector spaces over some field
F
{\displaystyle \mathbb {F} }
and
T
{\displaystyle T}
defined as in the statement of the theorem with
dim
V
=
n
{\displaystyle \dim V=n}
.
As
Ker
T
⊂
V
{\displaystyle \operatorname {Ker} T\subset V}
is a subspace , there exists a basis for it. Suppose
dim
Ker
T
=
k
{\displaystyle \dim \operatorname {Ker} T=k}
and let
K
:=
{
v
1
,
…
,
v
k
}
⊂
Ker
(
T
)
{\displaystyle {\mathcal {K}}:=\{v_{1},\ldots ,v_{k}\}\subset \operatorname {Ker} (T)}
be such a basis.
We may now, by the Steinitz exchange lemma , extend
K
{\displaystyle {\mathcal {K}}}
with
n
−
k
{\displaystyle n-k}
linearly independent vectors
w
1
,
…
,
w
n
−
k
{\displaystyle w_{1},\ldots ,w_{n-k}}
to form a full basis of
V
{\displaystyle V}
.
Let
S
:=
{
w
1
,
…
,
w
n
−
k
}
⊂
V
∖
Ker
(
T
)
{\displaystyle {\mathcal {S}}:=\{w_{1},\ldots ,w_{n-k}\}\subset V\setminus \operatorname {Ker} (T)}
such that
B
:=
K
∪
S
=
{
v
1
,
…
,
v
k
,
w
1
,
…
,
w
n
−
k
}
⊂
V
{\displaystyle {\mathcal {B}}:={\mathcal {K}}\cup {\mathcal {S}}=\{v_{1},\ldots ,v_{k},w_{1},\ldots ,w_{n-k}\}\subset V}
is a basis for
V
{\displaystyle V}
.
From this, we know that
Im
T
=
Span
T
(
B
)
=
Span
{
T
(
v
1
)
,
…
,
T
(
v
k
)
,
T
(
w
1
)
,
…
,
T
(
w
n
−
k
)
}
=
Span
{
T
(
w
1
)
,
…
,
T
(
w
n
−
k
)
}
=
Span
T
(
S
)
{\displaystyle \operatorname {Im} T=\operatorname {Span} T({\mathcal {B}})=\operatorname {Span} \{T(v_{1}),\ldots ,T(v_{k}),T(w_{1}),\ldots ,T(w_{n-k})\}=\operatorname {Span} \{T(w_{1}),\ldots ,T(w_{n-k})\}=\operatorname {Span} T({\mathcal {S}})}
.
We now claim that
T
(
S
)
{\displaystyle T({\mathcal {S}})}
is a basis for
Im
T
{\displaystyle \operatorname {Im} T}
.
The above equality already states that
T
(
S
)
{\displaystyle T({\mathcal {S}})}
is a generating set for
Im
T
{\displaystyle \operatorname {Im} T}
; it remains to be shown that it is also linearly independent to conclude that it is a basis.
Suppose
T
(
S
)
{\displaystyle T({\mathcal {S}})}
is not linearly independent, and let
∑
j
=
1
n
−
k
α
j
T
(
w
j
)
=
0
W
{\displaystyle \sum _{j=1}^{n-k}\alpha _{j}T(w_{j})=0_{W}}
for some
α
j
∈
F
{\displaystyle \alpha _{j}\in \mathbb {F} }
.
Thus, owing to the linearity of
T
{\displaystyle T}
, it follows that
T
(
∑
j
=
1
n
−
k
α
j
w
j
)
=
0
W
⟹
(
∑
j
=
1
n
−
k
α
j
w
j
)
∈
Ker
T
=
Span
K
⊂
V
.
{\displaystyle T\left(\sum _{j=1}^{n-k}\alpha _{j}w_{j}\right)=0_{W}\implies \left(\sum _{j=1}^{n-k}\alpha _{j}w_{j}\right)\in \operatorname {Ker} T=\operatorname {Span} {\mathcal {K}}\subset V.}
This is a contradiction to
B
{\displaystyle {\mathcal {B}}}
being a basis, unless all
α
j
{\displaystyle \alpha _{j}}
are equal to zero. This shows that
T
(
S
)
{\displaystyle T({\mathcal {S}})}
is linearly independent, and more specifically that it is a basis for
Im
T
{\displaystyle \operatorname {Im} T}
.
To summarize, we have
K
{\displaystyle {\mathcal {K}}}
, a basis for
Ker
T
{\displaystyle \operatorname {Ker} T}
, and
T
(
S
)
{\displaystyle T({\mathcal {S}})}
, a basis for
Im
T
{\displaystyle \operatorname {Im} T}
.
Finally we may state that
Rank
(
T
)
+
Nullity
(
T
)
=
dim
Im
T
+
dim
Ker
T
=
|
T
(
S
)
|
+
|
K
|
=
(
n
−
k
)
+
k
=
n
=
dim
V
.
{\displaystyle \operatorname {Rank} (T)+\operatorname {Nullity} (T)=\dim \operatorname {Im} T+\dim \operatorname {Ker} T=|T({\mathcal {S}})|+|{\mathcal {K}}|=(n-k)+k=n=\dim V.}
This concludes our proof.
Second proof
Let
A
∈
Mat
m
×
n
(
F
)
{\displaystyle \mathbf {A} \in \operatorname {Mat} _{m\times n}(\mathbb {F} )}
with
r
{\displaystyle r}
linearly independent columns (i.e.
Rank
(
A
)
=
r
{\displaystyle \operatorname {Rank} (\mathbf {A} )=r}
). We will show that:
There exists a set of
n
−
r
{\displaystyle n-r}
linearly independent solutions to the homogeneous system
A
x
=
0
{\displaystyle \mathbf {Ax} =\mathbf {0} }
. That every other solution is a linear combination of these
n
−
r
{\displaystyle n-r}
solutions.
To do this, we will produce a matrix
X
∈
Mat
n
×
(
n
−
r
)
(
F
)
{\displaystyle \mathbf {X} \in \operatorname {Mat} _{n\times (n-r)}(\mathbb {F} )}
whose columns form a basis of the null space of
A
{\displaystyle \mathbf {A} }
.
Without loss of generality, assume that the first
r
{\displaystyle r}
columns of
A
{\displaystyle \mathbf {A} }
are linearly independent. So, we can write
A
=
(
A
1
A
2
)
,
{\displaystyle \mathbf {A} ={\begin{pmatrix}\mathbf {A} _{1}&\mathbf {A} _{2}\end{pmatrix}},}
where
A
1
∈
Mat
m
×
r
(
F
)
{\displaystyle \mathbf {A} _{1}\in \operatorname {Mat} _{m\times r}(\mathbb {F} )}
with
r
{\displaystyle r}
linearly independent column vectors, and
A
2
∈
Mat
m
×
(
n
−
r
)
(
F
)
{\displaystyle \mathbf {A} _{2}\in \operatorname {Mat} _{m\times (n-r)}(\mathbb {F} )}
, each of whose
n
−
r
{\displaystyle n-r}
columns are linear combinations of the columns of
A
1
{\displaystyle \mathbf {A} _{1}}
.
This means that
A
2
=
A
1
B
{\displaystyle \mathbf {A} _{2}=\mathbf {A} _{1}\mathbf {B} }
for some
B
∈
Mat
r
×
(
n
−
r
)
{\displaystyle \mathbf {B} \in \operatorname {Mat} _{r\times (n-r)}}
(see rank factorization ) and, hence,
A
=
(
A
1
A
1
B
)
.
{\displaystyle \mathbf {A} ={\begin{pmatrix}\mathbf {A} _{1}&\mathbf {A} _{1}\mathbf {B} \end{pmatrix}}.}
Let
X
=
(
−
B
I
n
−
r
)
,
{\displaystyle \mathbf {X} ={\begin{pmatrix}-\mathbf {B} \\\mathbf {I} _{n-r}\end{pmatrix}},}
where
I
n
−
r
{\displaystyle \mathbf {I} _{n-r}}
is the
(
n
−
r
)
×
(
n
−
r
)
{\displaystyle (n-r)\times (n-r)}
identity matrix . We note that
X
∈
Mat
n
×
(
n
−
r
)
(
F
)
{\displaystyle \mathbf {X} \in \operatorname {Mat} _{n\times (n-r)}(\mathbb {F} )}
satisfies
A
X
=
(
A
1
A
1
B
)
(
−
B
I
n
−
r
)
=
−
A
1
B
+
A
1
B
=
0
m
×
(
n
−
r
)
.
{\displaystyle \mathbf {A} \mathbf {X} ={\begin{pmatrix}\mathbf {A} _{1}&\mathbf {A} _{1}\mathbf {B} \end{pmatrix}}{\begin{pmatrix}-\mathbf {B} \\\mathbf {I} _{n-r}\end{pmatrix}}=-\mathbf {A} _{1}\mathbf {B} +\mathbf {A} _{1}\mathbf {B} =\mathbf {0} _{m\times (n-r)}.}
Therefore, each of the
n
−
r
{\displaystyle n-r}
columns of
X
{\displaystyle \mathbf {X} }
are particular solutions of
A
x
=
0
F
m
{\displaystyle \mathbf {Ax} =\mathbf {0} _{\mathbb {F} ^{m}}}
.
Furthermore, the
n
−
r
{\displaystyle n-r}
columns of
X
{\displaystyle \mathbf {X} }
are linearly independent because
X
u
=
0
F
n
{\displaystyle \mathbf {Xu} =\mathbf {0} _{\mathbb {F} ^{n}}}
will imply
u
=
0
F
n
−
r
{\displaystyle \mathbf {u} =\mathbf {0} _{\mathbb {F} ^{n-r}}}
for
u
∈
F
n
−
r
{\displaystyle \mathbf {u} \in \mathbb {F} ^{n-r}}
:
X
u
=
0
F
n
⟹
(
−
B
I
n
−
r
)
u
=
0
F
n
⟹
(
−
B
u
u
)
=
(
0
F
r
0
F
n
−
r
)
⟹
u
=
0
F
n
−
r
.
{\displaystyle \mathbf {X} \mathbf {u} =\mathbf {0} _{\mathbb {F} ^{n}}\implies {\begin{pmatrix}-\mathbf {B} \\\mathbf {I} _{n-r}\end{pmatrix}}\mathbf {u} =\mathbf {0} _{\mathbb {F} ^{n}}\implies {\begin{pmatrix}-\mathbf {B} \mathbf {u} \\\mathbf {u} \end{pmatrix}}={\begin{pmatrix}\mathbf {0} _{\mathbb {F} ^{r}}\\\mathbf {0} _{\mathbb {F} ^{n-r}}\end{pmatrix}}\implies \mathbf {u} =\mathbf {0} _{\mathbb {F} ^{n-r}}.}
Therefore, the column vectors of
X
{\displaystyle \mathbf {X} }
constitute a set of
n
−
r
{\displaystyle n-r}
linearly independent solutions for
A
x
=
0
F
m
{\displaystyle \mathbf {Ax} =\mathbf {0} _{\mathbb {F} ^{m}}}
.
We next prove that any solution of
A
x
=
0
F
m
{\displaystyle \mathbf {Ax} =\mathbf {0} _{\mathbb {F} ^{m}}}
must be a linear combination of the columns of
X
{\displaystyle \mathbf {X} }
.
For this, let
u
=
(
u
1
u
2
)
∈
F
n
{\displaystyle \mathbf {u} ={\begin{pmatrix}\mathbf {u} _{1}\\\mathbf {u} _{2}\end{pmatrix}}\in \mathbb {F} ^{n}}
be any vector such that
A
u
=
0
F
m
{\displaystyle \mathbf {Au} =\mathbf {0} _{\mathbb {F} ^{m}}}
. Note that since the columns of
A
1
{\displaystyle \mathbf {A} _{1}}
are linearly independent,
A
1
x
=
0
F
m
{\displaystyle \mathbf {A} _{1}\mathbf {x} =\mathbf {0} _{\mathbb {F} ^{m}}}
implies
x
=
0
F
r
{\displaystyle \mathbf {x} =\mathbf {0} _{\mathbb {F} ^{r}}}
.
Therefore,
A
u
=
0
F
m
⟹
(
A
1
A
1
B
)
(
u
1
u
2
)
=
A
1
u
1
+
A
1
B
u
2
=
A
1
(
u
1
+
B
u
2
)
=
0
F
m
⟹
u
1
+
B
u
2
=
0
F
r
⟹
u
1
=
−
B
u
2
{\displaystyle {\begin{array}{rcl}\mathbf {A} \mathbf {u} &=&\mathbf {0} _{\mathbb {F} ^{m}}\\\implies {\begin{pmatrix}\mathbf {A} _{1}&\mathbf {A} _{1}\mathbf {B} \end{pmatrix}}{\begin{pmatrix}\mathbf {u} _{1}\\\mathbf {u} _{2}\end{pmatrix}}&=&\mathbf {A} _{1}\mathbf {u} _{1}+\mathbf {A} _{1}\mathbf {B} \mathbf {u} _{2}&=&\mathbf {A} _{1}(\mathbf {u} _{1}+\mathbf {B} \mathbf {u} _{2})&=&\mathbf {0} _{\mathbb {F} ^{m}}\\\implies \mathbf {u} _{1}+\mathbf {B} \mathbf {u} _{2}&=&\mathbf {0} _{\mathbb {F} ^{r}}\\\implies \mathbf {u} _{1}&=&-\mathbf {B} \mathbf {u} _{2}\end{array}}}
⟹
u
=
(
u
1
u
2
)
=
(
−
B
I
n
−
r
)
u
2
=
X
u
2
.
{\displaystyle \implies \mathbf {u} ={\begin{pmatrix}\mathbf {u} _{1}\\\mathbf {u} _{2}\end{pmatrix}}={\begin{pmatrix}-\mathbf {B} \\\mathbf {I} _{n-r}\end{pmatrix}}\mathbf {u} _{2}=\mathbf {X} \mathbf {u} _{2}.}
This proves that any vector
u
{\displaystyle \mathbf {u} }
that is a solution of
A
x
=
0
{\displaystyle \mathbf {Ax} =\mathbf {0} }
must be a linear combination of the
n
−
r
{\displaystyle n-r}
special solutions given by the columns of
X
{\displaystyle \mathbf {X} }
. And we have already seen that the columns of
X
{\displaystyle \mathbf {X} }
are linearly independent. Hence, the columns of
X
{\displaystyle \mathbf {X} }
constitute a basis for the null space of
A
{\displaystyle \mathbf {A} }
. Therefore, the nullity of
A
{\displaystyle \mathbf {A} }
is
n
−
r
{\displaystyle n-r}
. Since
r
{\displaystyle r}
equals rank of
A
{\displaystyle \mathbf {A} }
, it follows that
Rank
(
A
)
+
Nullity
(
A
)
=
n
{\displaystyle \operatorname {Rank} (\mathbf {A} )+\operatorname {Nullity} (\mathbf {A} )=n}
. This concludes our proof.
This theorem is a statement of the first isomorphism theorem of algebra for the case of vector spaces; it generalizes to the splitting lemma .
In more modern language, the theorem can also be phrased as saying that each short exact sequence of vector spaces splits. Explicitly, given that
0
→
U
→
V
→
T
R
→
0
{\displaystyle 0\rightarrow U\rightarrow V{\overset {T}{\rightarrow }}R\rightarrow 0}
is a short exact sequence of vector spaces, then
U
⊕
R
≅
V
{\displaystyle U\oplus R\cong V}
, hence
dim
(
U
)
+
dim
(
R
)
=
dim
(
V
)
.
{\displaystyle \dim(U)+\dim(R)=\dim(V).}
Here R plays the role of im T and U is ker T , i.e.
0
→
ker
T
↪
V
→
T
im
T
→
0
{\displaystyle 0\rightarrow \ker T~{\hookrightarrow }~V~{\overset {T}{\rightarrow }}~\operatorname {im} T\rightarrow 0}
In the finite-dimensional case, this formulation is susceptible to a generalization: if
0 → V 1 → V 2 → ⋯ → V r → 0
is an exact sequence of finite-dimensional vector spaces, then[ 7]
∑
i
=
1
r
(
−
1
)
i
dim
(
V
i
)
=
0.
{\displaystyle \sum _{i=1}^{r}(-1)^{i}\dim(V_{i})=0.}
The rank–nullity theorem for finite-dimensional vector spaces may also be formulated in terms of the index of a linear map. The index of a linear map
T
∈
Hom
(
V
,
W
)
{\displaystyle T\in \operatorname {Hom} (V,W)}
, where
V
{\displaystyle V}
and
W
{\displaystyle W}
are finite-dimensional, is defined by
index
T
=
dim
Ker
(
T
)
−
dim
Coker
T
.
{\displaystyle \operatorname {index} T=\dim \operatorname {Ker} (T)-\dim \operatorname {Coker} T.}
Intuitively,
dim
Ker
T
{\displaystyle \dim \operatorname {Ker} T}
is the number of independent solutions
v
{\displaystyle v}
of the equation
T
v
=
0
{\displaystyle Tv=0}
, and
dim
Coker
T
{\displaystyle \dim \operatorname {Coker} T}
is the number of independent restrictions that have to be put on
w
{\displaystyle w}
to make
T
v
=
w
{\displaystyle Tv=w}
solvable. The rank–nullity theorem for finite-dimensional vector spaces is equivalent to the statement
index
T
=
dim
V
−
dim
W
.
{\displaystyle \operatorname {index} T=\dim V-\dim W.}
We see that we can easily read off the index of the linear map
T
{\displaystyle T}
from the involved spaces, without any need to analyze
T
{\displaystyle T}
in detail. This effect also occurs in a much deeper result: the Atiyah–Singer index theorem states that the index of certain differential operators can be read off the geometry of the involved spaces.
Citations
^ Axler (2015) p. 63, §3.22
^ a b Friedberg, Insel & Spence (2014) p. 70, §2.1, Theorem 2.3
^ Katznelson & Katznelson (2008) p. 52, §2.5.1
^ Valenza (1993) p. 71, §4.3
^ Friedberg, Insel & Spence (2014) pp. 103-104, §2.4, Theorem 2.20
^ Banerjee, Sudipto; Roy, Anindya (2014), Linear Algebra and Matrix Analysis for Statistics , Texts in Statistical Science (1st ed.), Chapman and Hall/CRC, ISBN 978-1420095388
^ Zaman, Ragib. "Dimensions of vector spaces in an exact sequence" . Mathematics Stack Exchange . Retrieved 27 October 2015 .
References
Axler, Sheldon (2015). Linear Algebra Done Right . Undergraduate Texts in Mathematics (3rd ed.). Springer . ISBN 978-3-319-11079-0 .
Banerjee, Sudipto; Roy, Anindya (2014), Linear Algebra and Matrix Analysis for Statistics , Texts in Statistical Science (1st ed.), Chapman and Hall/CRC, ISBN 978-1420095388
Friedberg, Stephen H.; Insel, Arnold J.; Spence, Lawrence E. (2014). Linear Algebra (4th ed.). Pearson Education . ISBN 978-0130084514 .
Meyer, Carl D. (2000), Matrix Analysis and Applied Linear Algebra , SIAM , ISBN 978-0-89871-454-8 .
Katznelson, Yitzhak ; Katznelson, Yonatan R. (2008). A (Terse) Introduction to Linear Algebra . American Mathematical Society . ISBN 978-0-8218-4419-9 .
Valenza, Robert J. (1993) [1951]. Linear Algebra: An Introduction to Abstract Mathematics . Undergraduate Texts in Mathematics (3rd ed.). Springer . ISBN 3-540-94099-5 .