- Definition 1:
Null Space
The null space of an m-by-n matrix
A
A is the collection of those vectors in
ℝ
n
ℝ
n
that
A
A maps to the zero vector in
ℝ
m
ℝ
m
. More precisely,
𝒩A={x∈
ℝ
n
|Ax=0}
𝒩
A
A
x
0
x
ℝ
n
As an example, we examine the matrix
A
A:
A=0100-10100001
A
0100
-1010
0001
(1)
It is fairly easy to see that the null space of this matrix is:
𝒩A={t1010|t∈ℝ}
𝒩
A
t
t
1
0
1
0
(2)
This is a line in
ℝ
4
ℝ
4
.
The null space answers the question of uniqueness of solutions to
Sx=f
S
x
f
.
For, if
Sx=f
S
x
f
and
Sy=f
S
y
f
then
Sx-y=Sx-Sy=f-f=0
S
x
y
S
x
S
y
f
f
0
and so
x-y∈𝒩S
x
y
𝒩
S
. Hence, a solution to
Sx=f
S
x
f
will be unique if, and only if,
𝒩S=0
𝒩
S
0
.
Let us now exhibit a basis for the null space of an arbitrary matrix
A
A.
We note that to solve
Ax=0
A
x
0
is to solve
A
red
x=0
A
red
x
0
.
With respect to the latter, we suppose that
{
c
j
|j=1…r}
j
1
…
r
c
j
(3)
are the indices of the pivot columns and that
{
c
j
|j=r+1…n}
j
r
1
…
n
c
j
(4)
are the indices of the nonpivot columns. We accordingly define the
rr
pivot variables
{
x
c
j
|j=1…r}
j
1
…
r
x
c
j
(5)
and the
n-r
n
r
free variables
{
x
c
j
|j=r+1…n}
j
r
1
…
n
x
c
j
(6)
One solves
A
red
x=0
A
red
x
0
by expressing each of the pivot variables in terms of the
nonpivot, or free, variables. In the example above,
x
1
x
1
,
x
2
x
2
, and
x
4
x
4
are pivot while
x
3
x
3
is free. Solving for the pivot in terms of the free, we find
x
4
=0
x
4
0
,
x
3
=
x
1
x
3
x
1
,
x
2
=0
x
2
0
,
or, written as a vector,
x=
x
3
1010
x
x
3
1010
(7)
where
x
3
x
3
is free. As
x
3
x
3
ranges over all real numbers the x above traces out a line in
ℝ
4
ℝ
4
. This line is precisely the null space of
AA.
Abstracting these calculations we arrive at:
- Definition 2:
A Basis for the Null Space
Suppose that
A
A is m-by-n with pivot indices
{
c
j
|j=1…r}
j
1
…
r
c
j
and free indices
{
c
j
|j=r+1…n}
j
r
1
…
n
c
j
.
A basis for
𝒩A
𝒩
A
may be constructed of
n-r
n
r
vectors
z
1
z
2
…
z
n
-
r
z
1
z
2
…
z
n
-
r
where
z
k
z
k
,
and only
z
k
z
k
,
possesses a nonzero in its
c
r
+
k
c
r
+
k
component.
As usual, MATLAB has a way to make our lives simpler. If you
have defined a matrix A and want to find a basis for its null
space, simply call the function null(A). One
small note about this function: if one adds an extra flag,
'r', as in null(A, 'r'), then the
basis is displayed "rationally" as opposed to purely
mathematically. The MATLAB help pages define the difference
between the two modes as the rational mode being useful
pedagogically and the mathematical mode of more value
(gasp!) mathematically.
There is a great deal more to finding null spaces; enough, in
fact, to warrant another module. One important
aspect and use of null spaces is their ability to inform us
about the uniqueness of solutions. If we use the column space to
determine the existence of a solution
xx to the equation
Ax=b
A
x
b
. Once we know that a solution exists it is a
perfectly reasonable question to want to know whether or not
this solution is the only solution to
this problem. The hard and fast rule is that a solution
xx is unique if and
only if the null space of AA is empty. One way to think
about this is to consider that if
Ax=0
A
x
0
does not have a unique solution then, by linearity, neither
does
Ax=b
A
x
b
.
Conversely, if
Az=0∧z≠0∧Ay=b
A
z
0
z
0
A
y
b
then
Az+y=b
A
z
y
b
as well.