Invariance of dimension
Statement
Let \(V\) be a vector space over a field \(F\), and let \(B\) and \(C\) be two bases of \(V\): each is a linearly independent subset of \(V\) whose span is all of \(V\) (every vector of \(V\) is a finite \(F\)-linear combination of basis vectors). Then \(|B| = |C|\) as cardinal numbers; that is, there exists a bijection \(B \to C\). In particular, if some basis of \(V\) is finite with \(n\) elements, then every basis of \(V\) is finite with exactly \(n\) elements, and the common cardinality \(\dim_F V := |B|\) is a well-defined invariant of \(V\). The finite case is a theorem of pure linear algebra (no choice needed); the infinite case as proved below uses the Axiom of Choice for its cardinal arithmetic.
Why it matters
Without this theorem the single most important invariant in linear algebra — dimension — would not exist. We constantly say "\(\dim V = n\)" and then reason from that number: coordinates relative to a basis, the size of matrices representing linear maps, the rank–nullity theorem, the classification of finite-dimensional spaces. Every one of those arguments silently assumes that the number of vectors in a basis does not depend on which basis you happened to pick. This theorem is the licence for that assumption.
It also delivers the complete classification of vector spaces: over a fixed field \(F\), two vector spaces are isomorphic if and only if they have bases of the same cardinality. A vector space is determined, up to isomorphism, by a single cardinal number. Very few algebraic categories admit so clean a classification — the theorem is the reason linear algebra is "easy" compared with, say, module theory or group theory, where the analogous statement fails outright.
Hypotheses
Proof
Throughout, \(V\) is a vector space over the field \(F\) and \(B, C\) are bases of \(V\). We first prove the Steinitz Exchange Lemma in full, then deduce the finite case, then the infinite case.
Result
Reading. However you choose to coordinatise a vector space, you will always need exactly the same number of coordinates. The size of a basis is a property of the space, not of the basis — so "dimension" is a well-defined quantity, finite or infinite.
Scope. Applies to every vector space over every field \(F\), of any dimension, finite or infinite (the infinite case as proved uses AC). It applies to bases in the algebraic (Hamel) sense: finite linear combinations only. It does not automatically extend to free modules over arbitrary rings (invariant basis number can fail), nor to topological notions of basis such as Schauder or orthonormal bases, which are governed by different theorems.
Corollaries & converses
- \(\dim_F V\) is well defined: the map \(V \mapsto \dim_F V\) is a genuine invariant, constant across all bases.
- In a space with a finite basis of \(n\) elements: every linearly independent set has at most \(n\) elements, and every spanning set has at least \(n\) elements (both are direct applications of the Exchange Lemma against a basis).
- If \(\dim_F V = n\) is finite, a linearly independent set with exactly \(n\) elements is automatically a basis, and a spanning set with exactly \(n\) elements is automatically a basis (see Problem 4).
- Classification: \(V \cong W\) as \(F\)-vector spaces if and only if \(\dim_F V = \dim_F W\), since an isomorphism carries a basis to a basis (Worked Example 1) and, conversely, a bijection between bases extends uniquely to an isomorphism.
- \(\mathbb{R}^n \cong \mathbb{R}^m\) (as vector spaces) if and only if \(n = m\).
- Converse fails: a subset of \(V\) with cardinality \(\dim_F V\) need not be a basis — \(\{(1,0),(2,0)\}\) has \(2 = \dim \mathbb{R}^2\) elements but is dependent and non-spanning. Cardinality alone certifies nothing; you need independence or spanning in addition (and then, in finite dimension, you get the other for free).
Fails without
- Scalars not a field (no invariant basis number). Let \(V\) be an \(F\)-vector space with countable basis \(e_0, e_1, e_2, \dots\) and let \(R = \operatorname{End}_F(V)\), a noncommutative ring. View \(R\) as a free left module over itself. Then \(\{\mathrm{id}_V\}\) is a basis of size \(1\); but defining \(f, g \in R\) by \(f(e_{2n}) = e_n\), \(f(e_{2n+1}) = 0\) and \(g(e_{2n+1}) = e_n\), \(g(e_{2n}) = 0\), the pair \(\{f, g\}\) is also a basis of the same module (Problem 5 verifies this in full). One free module, bases of sizes \(1\) and \(2\): the exchange argument dies at Step 5, where it must divide by a scalar.
- "Basis" weakened to "spanning set". In \(\mathbb{R}^2\), the sets \(\{(1,0),(0,1)\}\) and \(\{(1,0),(0,1),(1,1)\}\) both span, with \(2 \neq 3\) elements. Weakened to "independent set": \(\{(1,0)\}\) and \(\{(1,0),(0,1)\}\) are both independent, with \(1 \neq 2\) elements. Equicardinality is a property of maximal independent = minimal spanning sets only.
- Finite combinations replaced by convergent series. In the Hilbert space \(\ell^2\), the standard unit vectors \((e_n)_{n \in \mathbb{N}}\) form a countable orthonormal (Schauder-type) basis, yet every Hamel basis of \(\ell^2\) is uncountable (a Baire-category argument shows an infinite-dimensional Banach space cannot have countable Hamel dimension). Conflating the two notions of basis produces contradictory "dimensions" for the same space.
- Axiom of Choice dropped. In ZF alone the infinite case is unprovable: there are models of ZF containing a vector space with two bases of different cardinalities, and models where cardinal comparability fails so the Schröder–Bernstein endgame cannot even be set up in the usual way. (In ZF one still has the finite case, which is choice-free.)
Common errors
- Circular dimension. Invoking "\(\dim V = n\)" inside a proof of this theorem (e.g. "the basis has \(\dim V\) elements, done"). Dimension is only defined once this theorem is proved; any argument using \(\dim\) here is circular.
- Exchange lemma with the roles reversed. The lemma bounds the independent set by the spanning set: independent \(\le\) spanning. Students routinely write it the wrong way round and "prove" that spanning sets are small.
- Assuming both sets are bases in the lemma. Steinitz needs only: one set independent, the other spanning. Requiring both to be bases makes the finite-case deduction in Step 7 impossible to run (you need it for arbitrary finite subsets of \(C\)).
- "Some \(b_j \neq 0\)" waved through. Step 4 is where linear independence is actually used, and it also silently proves \(k \lt n\). Omitting it leaves the proof with a possible division by zero and an unjustified reindexing.
- Infinite case by "just count". Writing \(|B| = |C|\) "because both are infinite" is false reasoning: infinite cardinals come in many sizes (\(\mathbb{Q}\)-dimension of \(\mathbb{R}\) is \(2^{\aleph_0}\), not \(\aleph_0\)). The support argument of Steps 8–10 is genuinely needed.
- Believing the converse. "It has \(n = \dim V\) vectors, so it's a basis." False without independence or spanning: \(\{(1,0),(2,0)\}\) in \(\mathbb{R}^2\).
Discussion
The theorem is the reason the word "dimension" means anything. Historically, the finite exchange argument goes back to Hermann Grassmann's Ausdehnungslehre (1844, largely unread in its time) and was isolated in the clean form used above by Ernst Steinitz in his 1913 work on field theory; Georg Hamel had already (1905) used Zorn-free well-ordering arguments to produce a basis of \(\mathbb{R}\) over \(\mathbb{Q}\) — the first "Hamel basis" — making the infinite case urgent. The modern proof of the infinite case, with its support-counting argument, is essentially an exercise in cardinal arithmetic layered on top of one honest linear-algebra idea: a basis is simultaneously a maximal independent set and a minimal spanning set, and the exchange property forces all such extremal sets to the same size.
That last remark is the door to a substantial generalisation. The Exchange Lemma is the defining axiom of a matroid: any finite structure with an "independence" notion satisfying the exchange property has all its maximal independent sets equinumerous — this common size is the rank of the matroid. Invariance of dimension is thus the vector-space instance of a purely combinatorial phenomenon that also covers spanning trees of a graph (all spanning trees of a connected graph have the same number of edges) and transcendence bases of a field extension (all transcendence bases have the same cardinality, giving transcendence degree). Steinitz proved the latter too, by the same exchange technique.
In ring theory the theorem's failure is itself a subject. A ring \(R\) has invariant basis number (IBN) if \(R^m \cong R^n\) as \(R\)-modules forces \(m = n\). Fields have IBN (this theorem); so do all nonzero commutative rings and all Noetherian rings — but \(\operatorname{End}_F(V)\) for infinite-dimensional \(V\) does not, as the "Fails without" example shows. The Leavitt algebras \(L(1,n)\) are universal examples of IBN failure and now feed into operator algebras via graph \(C^*\)-algebras. So the humble question "do all bases have the same size?" turns out to draw a genuine dividing line across algebra.
Foundationally, the infinite case sits at a precisely calibrated strength. The existence of a basis for every vector space is equivalent to the Axiom of Choice over ZF (Blass, 1984). Invariance of cardinality for bases that happen to exist is weaker but still not a ZF theorem: Läuchli constructed ZF-models with a vector space having bases of different cardinalities. The two uses of choice in Step 10 — selecting a "witnessing" \(b\) for each \(c \in C\), and the identity \(\aleph_0 \cdot \kappa = \kappa\) — can be reorganised but not eliminated. By contrast the finite case is a theorem of very weak arithmetic; nothing beyond finite induction is used. A well-run course should be honest that "dimension" for infinite-dimensional spaces is a choice-flavoured notion.
Common misconceptions. (i) "Invariance of dimension" here is an algebraic statement about bases; it is not Brouwer's topological invariance-of-dimension theorem (\(\mathbb{R}^n\) not homeomorphic to \(\mathbb{R}^m\) for \(n \neq m\)), which is far deeper and needs algebraic topology — the linear theorem only rules out linear isomorphisms. (ii) The theorem does not say a basis exists (that is a separate theorem, via Zorn's Lemma); it says all bases that exist are equinumerous. (iii) "Infinite-dimensional" is not one size: \(\dim_{\mathbb{Q}} \mathbb{R} = 2^{\aleph_0}\) while \(\dim_{\mathbb{Q}}\) of the polynomial ring \(\mathbb{Q}[x]\) is \(\aleph_0\), and the theorem is exactly what makes such statements meaningful.
Worked examples
Example 1. \(\mathbb{R}^n \cong \mathbb{R}^m\) as vector spaces implies \(n = m\). Suppose \(T \colon \mathbb{R}^n \to \mathbb{R}^m\) is a linear isomorphism.
Reading. Linear algebra can tell \(\mathbb{R}^2\) and \(\mathbb{R}^3\) apart: the number of coordinates is an isomorphism invariant.
Scope. The same argument works verbatim for \(F^n \cong F^m\) over any field \(F\), and for arbitrary spaces: isomorphic spaces have equal dimension.
Example 2. The solution space of the Fibonacci recurrence. Let \(V = \{ (a_n)_{n \ge 0} \in \mathbb{R}^{\mathbb{N}} : a_{n+2} = a_{n+1} + a_n \ \forall n \}\), a subspace of the space of real sequences (closure under sums and scalar multiples is immediate from the linearity of the recurrence). Let \(\Phi = (0, 1, 1, 2, 3, 5, \dots)\) be the Fibonacci sequence and \(\Lambda = (2, 1, 3, 4, 7, 11, \dots)\) the Lucas sequence, both in \(V\). We show \(\{\Phi, \Lambda\}\) is a basis of \(V\), so every solution is a unique combination of them.
Reading. Two independent particular solutions of a second-order linear recurrence automatically generate all solutions — because the solution space has dimension exactly \(2\), and that number is basis-independent.
Scope. The same dimension count powers the general theory of linear recurrences and linear ODEs of order \(k\): the solution space has dimension \(k\), so \(k\) independent solutions always suffice.
Problems
- Show that every basis of \(F^n\) has exactly \(n\) elements, so \(\dim_F F^n = n\).
Solution
The standard vectors \(e_1, \dots, e_n\) (with \(e_i\) having \(1\) in slot \(i\), \(0\) elsewhere) form a basis: if \(\sum c_i e_i = 0\) then reading off coordinate \(i\) gives \(c_i = 0\) (independence), and any \((x_1, \dots, x_n) = \sum x_i e_i\) (spanning). So \(F^n\) possesses a basis of \(n\) elements. By invariance of dimension, every basis of \(F^n\) is equinumerous with this one, hence has exactly \(n\) elements, and \(\dim_F F^n = n\).
- Prove directly from the Exchange Lemma: every linearly independent subset of \(\mathbb{R}^3\) has at most \(3\) elements, and every spanning subset of \(\mathbb{R}^3\) has at least \(3\) elements.
Solution
Let \(L\) be independent. Any finite subset \(L_0 \subseteq L\) is independent, and \(S = \{e_1, e_2, e_3\}\) spans \(\mathbb{R}^3\), so the Exchange Lemma gives \(|L_0| \le 3\); hence \(L\) itself is finite with \(|L| \le 3\). Now let \(S'\) span \(\mathbb{R}^3\). If \(S'\) were finite with \(|S'| \le 2\), apply the Exchange Lemma with independent set \(\{e_1, e_2, e_3\}\) and spanning set \(S'\): it gives \(3 \le |S'| \le 2\), a contradiction. So every spanning set has at least \(3\) elements (infinite spanning sets satisfy this trivially).
- Prove that the polynomial space \(\mathbb{R}[x]\) has no finite basis, and exhibit a countable basis. Conclude \(\dim_{\mathbb{R}} \mathbb{R}[x] = \aleph_0\).
Solution
Suppose \(\mathbb{R}[x]\) had a finite spanning set \(S\), \(|S| = n\). The set \(\{1, x, x^2, \dots, x^n\}\) is linearly independent: a relation \(\sum_{k=0}^{n} c_k x^k = 0\) is the zero polynomial, and a polynomial is zero exactly when all its coefficients vanish, so every \(c_k = 0\). The Exchange Lemma then gives \(n + 1 \le n\), absurd. Hence no finite spanning set, and in particular no finite basis. The set \(\{x^k : k \in \mathbb{N}\}\) is a basis: it is independent by the same coefficient argument (any finite relation involves finitely many powers), and it spans because a polynomial is by definition a finite linear combination of powers of \(x\). This basis is countably infinite, so by invariance of dimension every basis of \(\mathbb{R}[x]\) has cardinality exactly \(\aleph_0\): \(\dim_{\mathbb{R}} \mathbb{R}[x] = \aleph_0\).
- Let \(\dim_F V = n\) be finite and let \(L \subseteq V\) be linearly independent with \(|L| = n\). Prove that \(L\) is a basis of \(V\).
Solution
Write \(L = \{v_1, \dots, v_n\}\) and suppose, for contradiction, that \(L\) does not span \(V\); pick \(v \in V \setminus \operatorname{span}(L)\). We claim \(L \cup \{v\}\) is independent: if \(c v + \sum_i c_i v_i = 0\) with not all coefficients zero, then \(c \neq 0\) (otherwise the relation is a nontrivial dependence in \(L\), contradicting independence), so \(v = -c^{-1} \sum_i c_i v_i \in \operatorname{span}(L)\) — contradicting the choice of \(v\); note the inversion of \(c\) uses that \(F\) is a field. So \(L \cup \{v\}\) is an independent set of \(n + 1\) elements. But \(V\) has a basis \(S\) with \(|S| = n\) (this is where \(\dim V = n\), i.e. invariance of dimension, is used: the number \(n\) is unambiguous), and \(S\) spans, so the Exchange Lemma forces \(n + 1 \le n\), absurd. Hence \(L\) spans, and being independent, \(L\) is a basis.
- (Harder.) Let \(V\) be an \(F\)-vector space with basis \((e_n)_{n \in \mathbb{N}}\) and let \(R = \operatorname{End}_F(V)\), regarded as a left module over itself via composition, \(r \cdot s := r \circ s\). Define \(f, g \in R\) on the basis by
\[ f(e_{2n}) = e_n, \quad f(e_{2n+1}) = 0, \qquad g(e_{2n}) = 0, \quad g(e_{2n+1}) = e_n. \]
Show that \(\{\mathrm{id}_V\}\) and \(\{f, g\}\) are both bases of the left \(R\)-module \(R\), and explain exactly which step of the proof of invariance of dimension fails for \(R\).
Solution
\(f\) and \(g\) are well defined: a linear map may be prescribed arbitrarily on a basis (universal property of bases). \(\{\mathrm{id}_V\}\) is a basis: spanning, since every \(r \in R\) equals \(r \circ \mathrm{id}_V = r \cdot \mathrm{id}_V\); independent, since \(r \cdot \mathrm{id}_V = r = 0\) forces \(r = 0\). \(\{f, g\}\) spans: given \(h \in R\), define \(a, b \in R\) on the basis by \(a(e_n) = h(e_{2n})\) and \(b(e_n) = h(e_{2n+1})\). Then for every \(n\), \((a \circ f + b \circ g)(e_{2n}) = a(e_n) + 0 = h(e_{2n})\) and \((a \circ f + b \circ g)(e_{2n+1}) = 0 + b(e_n) = h(e_{2n+1})\); two linear maps agreeing on a basis are equal, so \(h = a \cdot f + b \cdot g\). \(\{f, g\}\) is independent: if \(a \cdot f + b \cdot g = 0\) then evaluating at \(e_{2n}\) gives \(a(e_n) = 0\) for all \(n\), so \(a = 0\) (zero on a basis), and evaluating at \(e_{2n+1}\) gives \(b(e_n) = 0\) for all \(n\), so \(b = 0\). Hence the free left \(R\)-module \(R\) has bases of cardinalities \(1\) and \(2\): \(R\) does not have invariant basis number, and indeed \(R \cong R \oplus R\) as left \(R\)-modules (send \(h \mapsto (a, b)\) as above). Where the proof breaks: Step 5 of the main proof solves for a vector by multiplying by \(b_{k+1}^{-1}\); in \(R\) the "scalars" are endomorphisms, and a nonzero endomorphism of an infinite-dimensional space need not be invertible (e.g. \(f\) above is surjective but not injective). Without division, the exchange cannot be performed, and with it falls the entire counting argument. This is consistent with the theorem, whose hypotheses require the scalars to form a field.