The rank-nullity theorem states that the rank and the nullity (the dimension of the kernel) sum to the number of columns in a given matrix. If there is a matrix with rows and columns over a field, then This can be generalized further to linear maps: if is a linear map, then
The rank-nullity theorem is useful in calculating either one by calculating the other instead, which is useful as it is often much easier to find the rank than the nullity (or vice versa).
Consider the matrix
Here, the rank is 1, since the basis can be reduced to . The kernel of is vectors such that , which is a vector space spanned by and has dimension 1. Hence the rank and nullity are both 1, and sum to 2, the number of columns in .
This can be applied to nonsquare matrices as well. For instance, in the matrix
the rank is 2, spanned by the first two columns of , and the kernel is a vector space spanned by that thus has dimension 1. As expected, the sum of the rank and nullity is thus 3, the number of columns in .
There are a number of proofs of the rank-nullity theorem available. The simplest uses reduction to the Gauss-Jordan form of a matrix, since it is much easier to analyze. Thus the proof strategy is straightforward: show that the rank-nullity theorem can be reduced to the case of a Gauss-Jordan matrix by analyzing the effect of row operations on the rank and nullity, and then show that the rank-nullity theorem is true for Gauss-Jordan matrices.
The first part of this theorem is clear as the rank is invariant under row operations, and the Gauss-Jordan form of is obtained through row operations. Analyzing the kernel proceeds in a similar method: suppose , so that by definition. The Gauss-Jordan form of is obtained through row operations, so it can be written as where is some invertible matrix. Then , so . Similarly, if , then , so as desired.
The rank of a matrix in Gauss-Jordan form is the number of leading variables. The nullity of a matrix in Gauss-Jordan form is the number of free variables.
By definition, the Gauss-Jordan form of a matrix consists of a matrix whose nonzero rows have a leading 1. These cannot vanish under row operations, so all the nonzero rows are linearly independent. Hence the rank is equal to the number of leading 1s, which is equivalent to the number of leading variables.
Now suppose there are leading variables and free variables. Then the vectors
form a basis for the nullspace of the Gauss-Jordan form of the matrix. These vectors are clearly linearly independent, and hence the nullity is --the number of free variables.
The rank-nullity theorem is an immediate consequence of these two results. The rank of a matrix and the nullspace of a matrix are equivalent to the rank and nullspace of the Gauss-Jordan form of , so it is sufficient to prove the rank-nullity theorem for matrices already in Gauss-Jordan form. But the number of columns in a Gauss-Jordan form matrix is exactly the sum of the number of leading variables (which was shown above to be the rank) and the number of free variables (which was shown above to be the nullity), as each variable must be either leading or free. This completes the proof.