Outputs and invisible directions
For of size the column space (image) is the set of reachable outputs in The null space (kernel) is the set of inputs sent to zero, in
The other two spaces come from Its column space is the row space of in Its null space is the left null space, in 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.
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 the rank. The nonzero rows of reduced form are a basis of the row space. The homogeneous system has 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
Let The second row is twice the first, so there is one pivot. The first column spans the image. Choosing the second and third inputs as free variables gives null-space basis The dimensions add to
One solution plus a subspace
If then for every in the kernel. Conversely, any solution minus lies in the kernel. If is outside the column space there is no solution. This separates existence, controlled by the image, from uniqueness, controlled by the kernel.
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()])1
[[-2, 1, 0], [-3, 0, 1]]
[[-2, 1]]Exercises
For the example matrix, give a nonzero vector in the left null space.
Show solution✓ Checked
Since the second row is twice the first, annihilates both rows in that combination. Equivalently
For the same matrix, decide whether and 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.
A matrix has rank Give the dimensions of its four subspaces.
Show solution✓ Checked
The column and row spaces both have dimension Rank–nullity gives kernel dimension Apply the same count to the transpose to get left null dimension