# Dimension theorem for vector spaces

In mathematics, the **dimension theorem for vector spaces** states that all bases of a vector space have equally many elements. This number of elements may be finite, or given by an infinite cardinal number, and defines the dimension of the space.

Formally, the **dimension theorem for vector spaces** states that

- Given a vector space
*V*, any two linearly independent generating sets (in other words, any two bases) have the same cardinality.

If *V* is finitely generated, then it has a finite basis, and the result says that any two bases have the same number of elements.

While the proof of the existence of a basis for any vector space in the general case requires Zorn's lemma and is in fact equivalent to the axiom of choice, the uniqueness of the cardinality of the basis requires only the ultrafilter lemma,^{[1]} which is strictly weaker (the proof given below, however, assumes trichotomy, i.e., that all cardinal numbers are comparable, a statement which is also equivalent to the axiom of choice). The theorem can be generalized to arbitrary *R*-modules for rings *R* having invariant basis number.

The theorem for finitely generated case can be proved with elementary arguments of linear algebra, and requires no forms of the axiom of choice.

## Proof

Assume that { *a*_{i}: *i* ∈ *I* } and
{ *b*_{j}: *j* ∈ *J* } are both bases, with the cardinality of *I* bigger than the cardinality of *J*. From this assumption we will derive a contradiction.

### Case 1

Assume that *I* is infinite.

Every *b*_{j} can be written as a finite sum

Since the cardinality of *I* is greater than that of *J* and the *E _{j}'s* are finite subsets of

*I*, the cardinality of

*I*is also bigger than the cardinality of . (Note that this argument works

*only*for infinite

*I*.) So there is some which does not appear in any . The corresponding can be expressed as a finite linear combination of 's, which in turn can be expressed as finite linear combination of 's, not involving . Hence is linearly dependent on the other 's.

### Case 2

Now assume that *I* is finite and of cardinality bigger than the cardinality of *J*. Write *m* and *n* for the cardinalities of *I* and *J*, respectively.
Every *a*_{i} can be written as a sum

The matrix has *n* columns (the *j*-th column is the
*m*-tuple ), so it has rank at most *n*. This means that its *m* rows cannot be linearly independent. Write for the *i*-th row, then there is a nontrivial
linear combination

But then also so the are linearly dependent.

#### Alternative Proof

The proof above uses several non-trivial results. If these results are not carefully established in advance, the proof may give rise to circular reasoning. Here is a proof of the finite case which requires less prior development.

**Theorem 1:** If is a linearly independent tuple in a vector space , and is a tuple that spans , then .^{[2]} The argument is as follows:

Since spans , the tuple also spans. Since (because is linearly independent), there is at least one such that can be written as a linear combination of . Thus, is a spanning tuple, and its length is the same as 's.

Repeat this process. Because is linearly independent, we can always remove an element from the list which is not one of the 's that we prepended to the list in a prior step (because is linearly independent, and so there must be some nonzero coefficient in front of one of the 's). Thus, after iterations, the result will be a tuple (possibly with ) of length . In particular, , so , i.e., .

To prove the finite case of the dimension theorem from this, suppose that is a vector space and and are both bases of . Since is linearly independent and spans, we can apply Theorem 1 to get . And since is linearly independent and spans, we get . From these, we get .

## Kernel extension theorem for vector spaces

This application of the dimension theorem is sometimes itself called the *dimension theorem*. Let

*T*:*U*→*V*

be a linear transformation. Then

*dim*(*range*(*T*)) +*dim*(*kernel*(*T*)) =*dim*(*U*),

that is, the dimension of *U* is equal to the dimension of the transformation's range plus the dimension of the kernel. See rank-nullity theorem for a fuller discussion.