Rank-nullity
How the dimensions of the kernel and image account for the dimension of the domain.
Rank-nullity says that the dimensions of the kernel and image of a linear map add up to the dimension of its domain. This page computes both dimensions for matrices by row reduction, states the theorem for matrices and for general linear maps and uses it to classify the solution sets of .
Computing kernel and image dimensions
Kernel
If is a linear map, its kernel is
The same set is also called the null space. If is regarded as the map , then
Image
If is a linear map, its image is
The same set is also called the range. If is regarded as the map , then
which is the column space of .
Dimension
If a vector space has a finite basis, then is finite-dimensional and its dimension, denoted , is the common number of vectors in all bases of .
Geometrically, a linear map may collapse some input directions to zero (the kernel) while keeping other directions in its output (the image). Together these account for every degree of freedom in the domain.
For a matrix, row reduction records this split: free variables give the nullity and pivot columns give the rank. The following examples compute both.
Kernel and image bases of a matrix
Consider
The third row is the sum of the first two. Replacing by therefore gives a zero row, leaving pivots in columns and . To find the kernel, let and . The first two equations give
Therefore a basis for the kernel is
The pivot positions are in columns and , so the corresponding columns of the original matrix give a basis for the image. (Their leading coordinates also make their linear independence immediate.)
Hence , and
the number of columns.
[routine]
Kernel basis of a row-echelon matrix
Consider the row-echelon matrix
The leading columns are , so the free variables are . Set
Solving from the bottom non-zero row upwards gives
The fourth row gives and substituting this into the third row gives . The second row then gives in the same way.
Finally, the first row gives
Setting each free parameter in turn to and the others to gives one kernel basis vector per free variable. Thus a basis for the kernel is
Because the displayed matrix is already row-echelon, no row operation has changed its columns. Its pivot columns therefore give a basis for the image:
There are four pivot and four free columns, so
[exam]
Rank-nullity for matrices
Rank-nullity theorem
For a matrix over a scalar field with columns,
In a row-echelon form, rank counts the pivot columns and nullity counts the free variables, or non-pivot columns. Their sum is therefore the number of columns of .
Solution sets as affine translates
Classes of solutions of
Let be a matrix over an infinite scalar field (such as or ), let be a vector of the appropriate dimension and let be the augmented matrix formed by appending to . The equation has:
- no solution if
- a unique solution if
- infinitely many solutions if
In the last case, if , then every solution has the form
where is any particular solution of , is a basis for and .
Appending increases the rank exactly when is not in the column space of , that is, when is inconsistent. The infinite-field assumption ensures that a free parameter can take infinitely many values.
When a particular solution exists, subtracting it from any other solution gives a vector in the kernel. So the solution set is the affine translate of the kernel. The same pattern holds for any linear map: two inputs have the same output precisely when their difference lies in the kernel, so each non-empty fibre is a translate of the kernel.
General solution of an inhomogeneous system
For
take and . Solving the first two equations gives
Therefore
The two direction vectors are the kernel basis found in the first example and the constant vector is a particular solution: .
[routine]
Rank-nullity for vector spaces
Rank-nullity theorem for vector spaces
If is a linear map over a scalar field and is finite-dimensional, then
The codomain need not be finite-dimensional: the image of a map from the finite-dimensional space is automatically finite-dimensional.
Let and choose a basis
for . Extend it to a basis of :
The vectors span . Indeed, if , write
Applying gives
because for each .
The vectors are linearly independent. If
then
so . It is therefore a linear combination of . Since the full list
is linearly independent, . Thus is a basis of the image, so . The basis of has vectors, giving
Differentiation on polynomial spaces
Over and for , consider
For and ,
so is a linear map. If
then
Its kernel consists of the constant polynomials:
Thus . Since , rank-nullity gives
The image is : every polynomial of degree at most has a polynomial antiderivative in . Hence its dimension is also , agreeing with the rank calculation.
[routine]
Summary and equivalent conditions
The matrix and vector-space statements are
and
Equivalent conditions for a square matrix
For a square matrix , the following statements are equivalent:
- has a unique solution for every ;
- has only the trivial solution;
- every column of the reduced echelon form of is leading;
- ;
- is invertible;
- the columns of are linearly independent;
- the columns of span ;
- the columns of form a basis for ;
- ;
- .
Rank-nullity links the kernel conditions to the column conditions: for a square matrix with columns, zero nullity is equivalent to rank .
Once bases are chosen, a linear map has a matrix representation and these dimension counts become calculations on that matrix.