Ran Wei/ Linear Algebra
中文
Linear Algebra · Structure and approximation

Module 5Rank, nullity and the four subspaces

Distinguish reachable outputs from invisible input directions and connect them by rank–nullity.

80 minYou need Modules 2–4

In this module you will

  • Find bases for the column and null spaces by elimination
  • Locate all four fundamental subspaces in their ambient spaces
  • Explain the structure of all solutions of a consistent system
1

Outputs and invisible directions

For AA of size m×n,m\times n\mathclose{\text{,}} the column space (image) is the set of reachable outputs Ax,A\mathbf x\mathclose{\text{,}} in Rm.\mathbb R^m\mathclose{\text{.}} The null space (kernel) is the set of inputs sent to zero, in Rn.\mathbb R^n\mathclose{\text{.}}

The other two spaces come from AT.A^\mathsf T\mathclose{\text{.}} Its column space is the row space of A,A\mathclose{\text{,}} in Rn.\mathbb R^n\mathclose{\text{.}} Its null space is the left null space, in Rm.\mathbb R^m\mathclose{\text{.}} The names identify where to look. An input is in the null space exactly when its dot product with each row is zero. In the same way, the left null space is perpendicular to all columns.

2

Pivots and the dimension count

Row operations preserve linear relations between columns, since they amount to an invertible operation on the output. Thus the pivot indices identify independent columns in the original matrix. The pivots in reduced form give their count r,r\mathclose{\text{,}} the rank. The nonzero rows of reduced form are a basis of the row space. The homogeneous system has n−rn-r free coordinates. Choosing one free coordinate to be one and the rest zero gives one null-space basis vector per free coordinate. Hence rank plus nullity is n.n\mathclose{\text{.}}

Example 5.1A map with one output direction✓ Checked

Let A=(123246).A=\begin{pmatrix}1&2&3\\2&4&6\end{pmatrix}\mathclose{\text{.}} The second row is twice the first, so there is one pivot. The first column (1,2)T(1,2)^\mathsf T spans the image. Choosing the second and third inputs as free variables gives null-space basis (−2,1,0)T,(-2,1,0)^\mathsf T\mathclose{\text{,}} (−3,0,1)T.(-3,0,1)^\mathsf T\mathclose{\text{.}} The dimensions add to 1+2=3.1+2=3\mathclose{\text{.}}

3

One solution plus a subspace

If Ap=b,A\mathbf p=\mathbf b\mathclose{\text{,}} then A(p+z)=bA(\mathbf p+\mathbf z)=\mathbf b for every z\mathbf z in the kernel. Conversely, any solution minus p\mathbf p lies in the kernel. If b\mathbf b is outside the column space there is no solution. This separates existence, controlled by the image, from uniqueness, controlled by the kernel.

Compute itBases in exact arithmetic
Python
from sympy import Matrix

A = Matrix([[1, 2, 3], [2, 4, 6]])
print(A.rank())
print([list(v) for v in A.nullspace()])
print([list(v) for v in A.T.nullspace()])
Output
1
[[-2, 1, 0], [-3, 0, 1]]
[[-2, 1]]
4

Exercises

Exercise 5.1★Left null space

For the example matrix, give a nonzero vector in the left null space.

Show solution✓ Checked

Since the second row is twice the first, (−2,1)T(-2,1)^\mathsf T annihilates both rows in that combination. Equivalently AT(−2,1)T=0.A^\mathsf T(-2,1)^\mathsf T=\mathbf 0\mathclose{\text{.}}

Exercise 5.2★★Is the output possible?

For the same matrix, decide whether (3,6)T(3,6)^\mathsf T and (3,7)T(3,7)^\mathsf T are reachable.

Show solution✓ Checked

The first is three times the first column. Every output has second entry twice its first, so the second target is impossible.

Exercise 5.3★★★Dimension without reducing again

A 5×85\times8 matrix has rank 3.3\mathclose{\text{.}} Give the dimensions of its four subspaces.

Show solution✓ Checked

The column and row spaces both have dimension 3.3\mathclose{\text{.}} Rank–nullity gives kernel dimension 8−3=5.8-3=5\mathclose{\text{.}} Apply the same count to the transpose to get left null dimension 5−3=2.5-3=2\mathclose{\text{.}}

5

Check yourself

1
Where does the null space of a 4×74\times7 matrix live?
2
Where should you take pivot columns when finding a basis of the image?
3
If one solution exists and the kernel is zero, how many solutions are there?
Finished this module?