The rank–nullity theorem is a fundamental result in linear algebra relating the dimensions of the input space, image, and kernel of a linear map. It states that, when the domain is finite-dimensional, its dimension equals the map’s rank plus its nullity. Rank measures the dimension of the outputs attainable by the map; nullity measures the dimension of the inputs mapped to zero. The result is also called the dimension theorem. (math.dartmouth.edu)
Statement and definitions
Let be a linear map between vector spaces over the same field , with finite-dimensional. The kernel and image are
They are linear subspaces of and , respectively. Define
The theorem states
Here dimension means the number of vectors in a basis, not the number of elements in the space. Only the domain must be finite-dimensional; the codomain may be infinite-dimensional. (courses.math.wichita.edu)
The image need not equal the codomain. Consequently, the formula uses , not . It applies over arbitrary fields and requires neither an inner product nor a notion of distance. (lancaster.ac.uk)
Proof by extending a basis
A standard proof begins with a basis
of . Extend it to a basis
of . Thus . The essential step is to show that form a basis of the image. (homepages.ucl.ac.uk)
Every vector of is a linear combination of these basis vectors. Since , applying shows that every image vector belongs to the span of . To establish linear independence, suppose
Then , so it is also a combination of the . Independence of the extended basis forces every . Hence the image has dimension , while the kernel has dimension , proving the formula. Empty bases accommodate the cases of a trivial kernel or a zero image. (homepages.ucl.ac.uk)
Matrix form and computation
For an matrix over , multiplication defines a map . Its image is the span of the columns, and its kernel is the null space of . Therefore,
The total is the number of columns, not generally the number of rows. Matrix rank equals both column-space dimension and row-space dimension. (lancaster.ac.uk)
Gaussian elimination gives a computational interpretation. If row reduction produces pivots, then the rank is . In the homogeneous system of linear equations , the remaining variables are free. Each free variable supplies an independent solution parameter, so the nullity is . Row operations preserve the homogeneous solution set and rank, although they need not preserve the column space itself. (math.dartmouth.edu)
For example, consider
Its first two columns are independent, giving rank . Solving yields
and therefore
The nullity is , and , matching the domain dimension. This illustrates the pivot-and-free-variable interpretation. (math.dartmouth.edu)
Consequences for linear equations
The theorem connects rank with injectivity: a linear map is injective precisely when its kernel is , equivalently when its rank equals . If is finite-dimensional, surjectivity is equivalent to rank . Thus, for equal finite-dimensional domain and codomain, injectivity and surjectivity are equivalent. For a square matrix, these conditions characterize invertibility. (courses.math.wichita.edu)
A consistent equation has solution set
where is any particular solution. It is an affine space of dimension : rank determines the number of independent constraints, while nullity counts the remaining parameters. In particular, guarantees a nonzero homogeneous solution, since . It does not guarantee that a nonhomogeneous system is consistent. (courses.math.wichita.edu)
Quotient-space interpretation and other operators
The quotient vector space identifies inputs whose difference lies in the kernel. The induced map
is an isomorphism onto . This is the first isomorphism theorem for vector spaces. Taking dimensions gives rank–nullity through
The quotient expresses precisely which input distinctions the map preserves. (math.dartmouth.edu)
The theorem also applies to operators not initially presented as matrices. On the real polynomials of degree at most , with , the differentiation operator has a one-dimensional kernel consisting of constants. Its image consists of all polynomials of degree at most , a space of dimension . Thus its rank plus nullity is , the dimension of its domain. (homepages.ucl.ac.uk)