Introduction to the null space of a matrix
A x = 0 Ax=0 Ax=0
To prove the set of the solutions of x x x can be a subspace.
- When x = 0 x = 0 x=0, it works.
- Fine two solutions of
x
x
x,
v
1
v_1
v1 and
v
2
v_2
v2, they satisfy
A v 1 = 0 Av_1 = 0 Av1=0
A v 2 = 0 Av_2 = 0 Av2=0
Then:
A ( v 1 + v 2 ) = 0 A(v_1+v_2)=0 A(v1+v2)=0 and A ( c v 1 ) = 0 , A ( c v 2 ) = 0 A(cv_1) = 0, A(cv_2) = 0 A(cv1)=0,A(cv2)=0
So the null space is a valid subspace.
Calculating the null space of a matrix
[ A ∣ 0 ] → [ r r e f ( A ) ∣ 0 ] [A|0]→[rref(A)|0] [A∣0]→[rref(A)∣0]
N ( A ) = N ( r r e f ( A ) ) N(A)=N(rref(A)) N(A)=N(rref(A))
Relation to linear independence
The column vectors of matrix A A A are linearly independent if and only if the null space of matrix A A A only contains 0.
Column space of a matrix
A
x
=
b
Ax = b
Ax=b has no solution, then
b
b
b is not in the column space of
A
A
A.
If
A
x
=
b
Ax=b
Ax=b has at least one solution, then
b
b
b is in the column space of
A
A
A.
Null space and column space basis
Visualizing a column space as a plane in R3
Proof: Any subspace basis has same number of elements
If set
A
A
A, the basis of
V
V
V has
n
n
n entries, then we suppose a set of
m
m
m vectors
B
(
m
<
n
)
B(m<n)
B(m<n), we can replace at least one entry in
B
B
B with an entry in
A
A
A one time, and do ti
m
m
m times,
B
B
B becomes a set of m entries in
A
A
A, and basis in
A
A
A are independent, so
m
>
n
m>n
m>n.
So, if
C
C
C(m elements) and
D
D
D(n elements) are both basis of a same subspace, then
m
>
=
n
m>=n
m>=n, also
n
>
=
m
n >= m
n>=m.
Dimension of a subspace = # of elements in a basis for the subspace.
Dimension of the null space or nullity
nullity: Dimension of a null pace = # of free variables.
rank: Dimension of the column space = linearly independent column vectors.
Showing relation between basis cols and pivot cols
If the pivot columns of rref of
A
A
A are linearly independent, then the null space of rref
A
A
A only contains 0.
We know that
N
(
A
)
=
N
(
r
r
e
f
(
A
)
)
N(A)=N(rref(A))
N(A)=N(rref(A)) since row elementary operation didn’t change the solutions of matrix equation.
So the null space of
A
A
A only contains 0.
So the pivot columns of
A
A
A are linearly independent.
Showing that the candidate basis does span C(A)
Since
N
(
A
)
=
N
(
r
r
e
f
A
)
N(A) = N(rrefA)
N(A)=N(rrefA)
A
[
x
1
x
2
x
3
x
4
x
5
]
=
0
r
r
e
f
(
A
)
[
x
1
x
2
x
3
x
4
x
5
]
=
0
A\left[\begin{matrix}x_1\\x_2\\x_3\\x_4\\x_5\end{matrix}\right] = 0 \ \ \ \ \ \ \ \ \ \ rref(A)\left[\begin{matrix}x_1\\x_2\\x_3\\x_4\\x_5\end{matrix}\right] = 0
A⎣⎢⎢⎢⎢⎡x1x2x3x4x5⎦⎥⎥⎥⎥⎤=0 rref(A)⎣⎢⎢⎢⎢⎡x1x2x3x4x5⎦⎥⎥⎥⎥⎤=0
x
1
a
1
⃗
+
x
2
a
2
⃗
+
x
3
a
3
⃗
+
x
4
a
4
⃗
+
x
5
a
5
⃗
=
0
(1)
x_1\vec{a_1} + x_2\vec{a_2}+x_3\vec{a_3}+x_4\vec{a_4}+x_5\vec{a_5}=0\tag1
x1a1+x2a2+x3a3+x4a4+x5a5=0(1)
x 1 r 1 ⃗ + x 2 r 2 ⃗ + x 3 r 3 ⃗ + x 4 r a 4 ⃗ + x 5 r 5 ⃗ = 0 (2) x_1\vec{r_1} + x_2\vec{r_2}+x_3\vec{r_3}+x_4\vec{ra_4}+x_5\vec{r_5}=0 \tag 2 x1r1+x2r2+x3r3+x4ra4+x5r5=0(2)
Since
x
3
x_3
x3 and
x
5
x_5
x5 are free variables in equation
(
2
)
(2)
(2),
x
3
x_3
x3 and
x
5
x_5
x5 are also free variables in equation
(
1
)
(1)
(1), so column 3 and column 5 in
A
A
A can also be represented by other columns in
A
A
A.
So column 1, column 2 and column 4 in
A
A
A can span the column space of
A
A
A.
Besides, we have proved that column 1, column 2 and column 4 in
A
A
A are independent.
So the corresponding columns of the basis columns in
r
r
e
f
(
A
)
rref(A)
rref(A) are the basis columns of
A
A
A.