The rank–nullity theorem is a theorem in linear algebra, which asserts that the dimension of the domain of a linear map is the sum of its rank (the dimension of its image) and its nullity (the dimension of its kernel). Stating the theorem Let be a linear transformation between two vector spaces where 's domain is finite dimensional. Then where In other words, This theorem can be refined via the splitting lemma to be a statement about an isomorphism of spaces, not just dimensions. Explicitly, since induces an isomorphism from to the existence of a basis for that extends any given basis of implies, via the splitting lemma, that Taking dimensions, the rank–nullity theorem follows. Matrices Since one can represent linear maps as matrices. In the case of an matrix, the dimension of the domain is the number of columns in the matrix. Thus the rank–nullity theorem for a given matrix immediately becomes Proofs Here we provide two proofs. The first operates in the general case, using linear maps. The second proof looks at the homogeneous system for with rank and shows explicitly that there exists a set of linearly independent solutions that span the kernel of . While the theorem requires that the domain of the linear map be finite-dimensional, there is no such assumption on the codomain. This means that there are linear maps not given by matrices for which the theorem applies. Despite this, the first proof is not actually more general than the second: since the image of the linear map is finite-dimensional, we can represent the map from its domain to its image by a matrix, prove the theorem for that matrix, then compose with the inclusion of the image into the full codomain. First proof Let be vector spaces over some field and defined as in the statement of the theorem with . As is a subspace, there exists a basis for it. Suppose and let be such a basis. We may now, by the Steinitz exchange lemma, extend with linearly independent vectors to form a full basis of . Let such that is a basis for . From this, we know that We now claim that is a basis for . The above equality already states that is a generating set for ; it remains to be shown that it is also linearly independent to conclude that it is a basis. Suppose is