A vector space can have many different coordinate systems, and a module can have no honest coordinate system at all. Dimension is the invariant that survives the choice of coordinates: it counts how many independent directions are needed, when such a count makes sense, and it measures how far algebraic objects are from behaving like finite-dimensional Euclidean space.
The first surprise is that a basis is not part of the structure. The plane $\mathbb{R}^2$ has the standard basis, but it also has infinitely many rotated or sheared bases. If every basis had a different number of vectors, coordinates would be bookkeeping rather than mathematics. The central theorem behind dimension says that this failure does not occur for vector spaces: all bases have the same cardinality.
[example: Two Coordinates for the Same Plane]
Let $V=\mathbb{R}^2$ over $\mathbb{R}$, and set $e_1=(1,0)$, $e_2=(0,1)$, $f_1=(1,1)$, and $f_2=(1,-1)$. For any $(a,b)\in \mathbb{R}^2$, scalar multiplication and coordinatewise addition give
\begin{align*}
a e_1+b e_2=a(1,0)+b(0,1)=(a,0)+(0,b)=(a,b).
\end{align*}
Thus $e_1,e_2$ span $\mathbb{R}^2$. If
\begin{align*}
\alpha e_1+\beta e_2=(0,0),
\end{align*}
then
\begin{align*}
\alpha(1,0)+\beta(0,1)=(\alpha,0)+(0,\beta)=(\alpha,\beta)=(0,0).
\end{align*}
Equality of coordinates gives $\alpha=0$ and $\beta=0$, so $e_1,e_2$ are linearly independent. Hence $(e_1,e_2)$ is a basis of $\mathbb{R}^2$.
For the second coordinate system, choose
\begin{align*}
c=\frac{a+b}{2}
\end{align*}
and
\begin{align*}
d=\frac{a-b}{2}.
\end{align*}
Then
\begin{align*}
c f_1+d f_2=\frac{a+b}{2}(1,1)+\frac{a-b}{2}(1,-1).
\end{align*}
Expanding the scalar multiples gives
\begin{align*}
c f_1+d f_2=\left(\frac{a+b}{2},\frac{a+b}{2}\right)+\left(\frac{a-b}{2},-\frac{a-b}{2}\right).
\end{align*}
Coordinatewise addition gives
\begin{align*}
c f_1+d f_2=\left(\frac{a+b+a-b}{2},\frac{a+b-a+b}{2}\right).
\end{align*}
In the first coordinate, $a+b+a-b=2a$, so $\frac{a+b+a-b}{2}=a$. In the second coordinate, $a+b-a+b=2b$, so $\frac{a+b-a+b}{2}=b$. Therefore
\begin{align*}
c f_1+d f_2=(a,b).
\end{align*}
Thus $f_1,f_2$ span $\mathbb{R}^2$.
It remains to check that no redundancy has been introduced. If
\begin{align*}
\alpha f_1+\beta f_2=(0,0),
\end{align*}
then
\begin{align*}
\alpha(1,1)+\beta(1,-1)=(\alpha,\alpha)+(\beta,-\beta)=(\alpha+\beta,\alpha-\beta)=(0,0).
\end{align*}
Equality of coordinates gives
\begin{align*}
\alpha+\beta=0.
\end{align*}
It also gives
\begin{align*}
\alpha-\beta=0.
\end{align*}
Adding these two equations gives
\begin{align*}
2\alpha=0.
\end{align*}
Since the scalars are real numbers, $2\ne 0$, so $\alpha=0$. Substituting $\alpha=0$ into $\alpha+\beta=0$ gives $\beta=0$. Hence $f_1,f_2$ are linearly independent, so $(f_1,f_2)$ is also a basis of $\mathbb{R}^2$.
Every vector $(a,b)$ has coordinates $(a,b)$ in the basis $(e_1,e_2)$ and coordinates $\left(\frac{a+b}{2},\frac{a-b}{2}\right)$ in the basis $(f_1,f_2)$. The coordinates change, but both coordinate systems use exactly two basis vectors, which is the invariant that dimension records.
[/example]
Dimension begins as a counting problem, but it quickly becomes a structural language. In linear algebra it classifies finite-dimensional vector spaces over a fixed field. In module theory it becomes rank, which behaves well only under hypotheses on the ring and the module. In commutative algebra it becomes Krull dimension, which measures chains of prime ideals rather than coordinates. Here an ideal $I \trianglelefteq R$ is an additive subgroup of a ring $R$ that is closed under multiplication by elements of $R$, and $I \subseteq J$ means that every element of $I$ also lies in $J$. A chain of prime ideals is therefore a nested sequence of such ideals inside one ring. In homological algebra it becomes projective or global dimension, measuring the length of resolutions. This chapter develops vector-space dimension in detail and then uses the later notions as signposts for how the same word changes meaning in algebraic settings. These versions are related by a shared theme: dimension is the length or size of the independent data needed to build an object.
## Definition
The word dimension is used in several related settings, so the first task is to say what kind of object a dimension is meant to be. At its most general, a dimension is not just any number attached to an object; it is a size invariant designed to ignore irrelevant choices such as bases, coordinates, presentations, or resolutions.
[definition: Dimension]
Let $\mathcal{C}$ be a class of mathematical objects equipped with an equivalence relation $\sim$. A dimension on $\mathcal{C}$ is a function $d: \mathcal{C} \to A$ into an ordered set $A$ such that, whenever $X,Y \in \mathcal{C}$ and $X \sim Y$, one has
\begin{align*}
d(X) = d(Y).
\end{align*}
[/definition]
This definition is a guiding abstraction rather than a complete axiom system for dimension. By itself it would allow uninformative invariants, such as constant functions, so the mathematical content in each setting comes from additional behavior: invariance under the right equivalence relation, compatibility with subobjects or quotients, additivity, or a meaningful notion of length. The chapter now specializes this broad idea to the setting where dimension first becomes a theorem rather than a convention: vector spaces over a field.
Before defining vector-space dimension, we need the objects whose size dimension measures. In algebra, linear combinations make sense only after choosing a field of scalars and an abelian group of vectors on which those scalars act. The next definition packages exactly the rules needed for addition, scalar multiplication, and coordinate expansions.
[definition: Vector Space]
Let $k$ be a field. A vector space over $k$ is an abelian group $(V,+)$ together with a scalar multiplication map $\cdot: k \times V \to V$, written $(a,v) \mapsto av$, such that for all $a,b \in k$ and $u,v \in V$,
\begin{align*}
a(u+v) = au + av.
\end{align*}
\begin{align*}
(a+b)v = av + bv.
\end{align*}
\begin{align*}
(ab)v = a(bv).
\end{align*}
\begin{align*}
1_k v = v.
\end{align*}
[/definition]
A vector space may be large, but a useful coordinate system should describe every vector using a controlled list of directions. The next definition is needed because dimension will not count all vectors; it will count a set whose linear combinations reach the whole space.
[definition: Span]
Let $V$ be a vector space over a field $k$, and let $\mathcal{P}(V)$ denote the power set of $V$, the set of all subsets of $V$. The span operation is the map $\operatorname{span}_k: \mathcal{P}(V) \to \mathcal{P}(V)$ defined as follows: for each subset $S \subset V$,
\begin{align*}
\operatorname{span}_k(S) = \left\{\sum_{i=1}^m a_i v_i : m \ge 0,\ a_i \in k,\ v_i \in S\right\},
\end{align*}
where the sum with $m=0$ is the empty sum, equal to $0$.
[/definition]
Span tells us when a set is large enough, but size alone does not prevent waste. If one chosen direction can already be built from the others, then the same vector may admit different coefficient descriptions. To make coordinates rigid, one has to rule out every nontrivial linear relation among the chosen vectors.
[definition: Linear Independence]
Let $V$ be a vector space over a field $k$. A subset $S \subset V$ is linearly independent if, for every integer $n \ge 0$, every choice of distinct vectors $v_1, \dots, v_n \in S$, and every choice of scalars $a_1, \dots, a_n \in k$,
\begin{align*}
\sum_{i=1}^n a_i v_i = 0
\end{align*}
implies $a_i = 0$ for all $i \in \{1, \dots, n\}$.
[/definition]
Span supplies reach, while linear independence removes redundancy. Either condition alone is insufficient for dimension: a spanning set may contain unnecessary directions, and an independent set may fail to reach the whole space.
The obstruction is that coordinates require both existence and uniqueness at the same time. The formal notion that captures this balance is a basis: a set large enough to express every vector, but rigid enough that no vector has two different finite expressions.
[definition: Basis]
Let $V$ be a vector space over a field $k$. A subset $B \subset V$ is a basis of $V$ over $k$ if $B$ is linearly independent and $\operatorname{span}_k(B) = V$.
[/definition]
A basis is a candidate coordinate system, but a space can have many different bases. The obstruction to defining dimension is that two unrelated-looking bases might appear to have different sizes. Before basis size can be used as an invariant, one needs a theorem showing that changing coordinates does not change the number of basis vectors.
[quotetheorem:7838]
Once basis size is independent of the chosen basis, it becomes an invariant of the vector space itself. Later comparisons of spaces and conservation laws for linear maps need a single piece of notation for this invariant, rather than repeatedly referring to the cardinality of an arbitrary basis.
[definition: Vector Space Dimension]
Let $V$ be a vector space over a field $k$. The dimension of $V$ over $k$, denoted $\dim_k V$, is the cardinality of any basis of $V$ over $k$. For fixed $k$, vector-space dimension is the function from vector spaces over $k$ to cardinal numbers given by $V \mapsto \dim_k V$.
[/definition]
Dimension may be an infinite cardinal, but many basic tools of linear algebra require an ordinary finite count of coordinates. Induction, matrices, and rank-nullity formulas apply in their standard form only after this finiteness hypothesis is separated out, including the possibility of dimension zero.
[definition: Finite-Dimensional Vector Space]
Let $V$ be a vector space over a field $k$. The vector space $V$ is finite-dimensional over $k$ if $\dim_k V = n$ for some integer $n \ge 0$.
[/definition]
The zero vector space deserves separate mention because its basis is the empty set. The next example explains why this convention is not artificial: it is the base case that makes dimension formulas work without exceptions.
[example: The Zero-Dimensional Vector Space]
Let $V=\{0\}$ be the vector space over a field $k$. We compute its dimension by checking that $\varnothing$ is a basis of $V$.
First, $\varnothing$ is linearly independent. Indeed, the definition of linear independence asks about finite lists of distinct vectors chosen from $\varnothing$. The only possible such list has length $0$, so the corresponding linear combination is the empty sum. By the convention in the definition of span, the empty sum is $0$, and there are no coefficients that could be nonzero. Thus the implication required for linear independence is satisfied.
Now compute the span. By definition,
\begin{align*}
\operatorname{span}_k(\varnothing)=\left\{\sum_{i=1}^m a_i v_i : m\ge 0,\ a_i\in k,\ v_i\in\varnothing\right\}.
\end{align*}
If $m>0$, then choosing $v_1,\dots,v_m\in\varnothing$ is impossible. If $m=0$, the sum is the empty sum, equal to $0$. Therefore the only element of $\operatorname{span}_k(\varnothing)$ is $0$, so
\begin{align*}
\operatorname{span}_k(\varnothing)=\{0\}=V.
\end{align*}
Thus $\varnothing$ is linearly independent and spans $V$, so $\varnothing$ is a basis of $V$. Since the empty set has cardinality $0$,
\begin{align*}
\dim_k\{0\}=|\varnothing|=0.
\end{align*}
The zero vector space has dimension $0$ because it needs no independent directions to generate its only vector.
[/example]
## Bases, Coordinates, and Classification
Dimension is useful because it turns a vector space into a coordinate object without making the coordinate system canonical. Once a basis is chosen, the vector space becomes isomorphic to a standard coordinate space. To state that precisely, the next definition introduces the standard model for finite coordinate data.
[definition: Coordinate Vector Space]
Let $k$ be a field and let $n \ge 0$ be an integer. The coordinate vector space $k^n$ is the set of ordered $n$-tuples $(a_1, \dots, a_n)$ with entries in $k$, equipped with the addition map $+: k^n \times k^n \to k^n$ given by
\begin{align*}
((a_1,\dots,a_n),(b_1,\dots,b_n)) \mapsto (a_1+b_1,\dots,a_n+b_n)
\end{align*}
and the scalar multiplication map $\cdot: k \times k^n \to k^n$ given by
\begin{align*}
(\lambda,(a_1,\dots,a_n)) \mapsto (\lambda a_1,\dots,\lambda a_n).
\end{align*}
[/definition]
A basis does more than generate vectors: it lets each vector be encoded by its coefficient list. The obstruction is that this encoding must respect both addition and scalar multiplication, otherwise it is only notation rather than a structural comparison. A basis with $n$ elements should therefore produce an isomorphism with the standard coordinate space $k^n$.
[quotetheorem:372]
Seeing bases as coordinate charts reduces a finite-dimensional vector space to some $k^n$. The remaining classification problem is whether two spaces over the same field with the same number of coordinates can still differ as vector spaces. The answer is that, over a fixed field, dimension is the complete invariant for finite-dimensional vector spaces.
[quotetheorem:7839]
The classification has a warning built into it: it classifies vector spaces only over a fixed field. The next example shows that the same underlying set can have different dimensions when the field of scalars changes.
[example: Dimension Depends on the Field]
Consider $\mathbb{C}$ first as a vector space over $\mathbb{C}$. Every $z \in \mathbb{C}$ can be expressed using the single vector $1$ because
\begin{align*}
z\cdot 1=z.
\end{align*}
Thus every element of $\mathbb{C}$ lies in $\operatorname{span}_{\mathbb{C}}\{1\}$, so $\{1\}$ spans $\mathbb{C}$ over $\mathbb{C}$.
To check linear independence over $\mathbb{C}$, suppose $a\in\mathbb{C}$ and
\begin{align*}
a\cdot 1=0.
\end{align*}
Since $1$ is the multiplicative identity in $\mathbb{C}$, this equation is
\begin{align*}
a=0.
\end{align*}
Hence the only complex coefficient giving the zero vector is $0$, so $\{1\}$ is linearly independent over $\mathbb{C}$. Therefore $\{1\}$ is a basis of $\mathbb{C}$ over $\mathbb{C}$, and
\begin{align*}
\dim_{\mathbb{C}}\mathbb{C}=|\{1\}|=1.
\end{align*}
Now regard the same set $\mathbb{C}$ as a vector space over $\mathbb{R}$. Every $z\in\mathbb{C}$ has a unique form $z=a+bi$ with $a,b\in\mathbb{R}$. Using real scalar multiplication,
\begin{align*}
a\cdot 1=a.
\end{align*}
Also,
\begin{align*}
b\cdot i=bi.
\end{align*}
Adding these two terms in $\mathbb{C}$ gives
\begin{align*}
a\cdot 1+b\cdot i=a+bi=z.
\end{align*}
Thus every complex number is an $\mathbb{R}$-linear combination of $1$ and $i$, so $\{1,i\}$ spans $\mathbb{C}$ over $\mathbb{R}$.
To check linear independence over $\mathbb{R}$, suppose $a,b\in\mathbb{R}$ and
\begin{align*}
a\cdot 1+b\cdot i=0.
\end{align*}
The left side is
\begin{align*}
a\cdot 1+b\cdot i=a+bi.
\end{align*}
Therefore
\begin{align*}
a+bi=0.
\end{align*}
Since $0=0+0i$ in rectangular form, equality of real and imaginary parts gives
\begin{align*}
a=0.
\end{align*}
It also gives
\begin{align*}
b=0.
\end{align*}
Hence the only real coefficients giving the zero vector are $a=b=0$, so $\{1,i\}$ is linearly independent over $\mathbb{R}$. Therefore $\{1,i\}$ is a basis of $\mathbb{C}$ over $\mathbb{R}$, and
\begin{align*}
\dim_{\mathbb{R}}\mathbb{C}=|\{1,i\}|=2.
\end{align*}
The underlying set is unchanged; the dimension changes because complex scalar multiplication can absorb any complex number into one coefficient, while real scalar multiplication needs separate real and imaginary directions.
[/example]
The dependence on the base field is not a defect. It is the reason dimension can record field extensions, representation degree, and algebraic structure that would be invisible from the underlying set alone.
## Subspaces and Rank-Nullity
### Subspace Comparisons
A subspace is a smaller vector space sitting inside a larger one. Dimension makes containment quantitative: a proper finite-dimensional subspace has smaller dimension, and a linear map decomposes the dimension of its domain into the part killed by the map and the part seen in the image.
Before stating such results, the smaller object must itself be defined. The next definition is needed because dimension comparisons require the subset to carry the same linear structure as the ambient space.
[definition: Vector Subspace]
Let $V$ be a vector space over a field $k$. A subset $U \subset V$ is a vector subspace of $V$ if $U$ is a vector space over $k$ under the addition and scalar multiplication inherited from $V$.
[/definition]
Subspaces are the natural habitat of dimension comparisons, but containment alone does not yet say how many independent directions have been lost. The key obstruction is whether a smaller subspace could somehow have as many independent directions as the ambient finite-dimensional space. Ruling this out turns proper containment into a strict numerical inequality.
[quotetheorem:375]
The theorem turns inclusion into an inequality. For linear maps, the analogous question is not containment but loss of information: which directions disappear, and how many independent directions remain visible? The next definitions provide those two measurements.
### Linear Maps
A linear map can collapse nonzero directions to zero, making distinct domain vectors indistinguishable after applying the map. To measure this loss, one first collects exactly the vectors that disappear under the map; this collection is the invisible part of the domain.
[definition: Kernel of a Linear Map]
Let $T: V \to W$ be a linear map of vector spaces over a field $k$. The kernel of $T$ is
\begin{align*}
\ker(T) = \{v \in V : T(v)=0\}.
\end{align*}
[/definition]
The kernel records the directions lost by a linear map, but it does not say which outputs are actually attainable. To measure what remains visible, one must separate the whole codomain from the smaller collection of outputs that the map actually reaches.
[definition: Image of a Linear Map]
Let $T: V \to W$ be a linear map of vector spaces over a field $k$. The image of $T$ is
\begin{align*}
\operatorname{im}(T) = \{T(v) : v \in V\}.
\end{align*}
[/definition]
The image is a subspace of the codomain, so its dimension measures how many independent output directions the map actually produces.
The codomain may contain directions that the map never hits, so its full dimension can exaggerate the size of the transformation.
This creates a new measurement problem: a linear map should be assigned a size that depends on its actual output subspace, not on unused room in the codomain. Rank is the invariant that records exactly that attainable output size.
[definition: Rank]
Let $T: V \to W$ be a linear map of vector spaces over a field $k$. The rank of $T$ is
\begin{align*}
\operatorname{rank}(T) = \dim_k \operatorname{im}(T).
\end{align*}
For fixed $k$, rank is the function from linear maps of vector spaces over $k$ to cardinal numbers given by $T \mapsto \operatorname{rank}(T)$.
[/definition]
Rank measures what survives in the output. To balance it, one also needs a numerical measure of what vanishes in the domain. The dimension of the kernel supplies that lost-direction count, allowing survival and loss to be compared in a single formula.
[definition: Nullity]
Let $T: V \to W$ be a linear map of vector spaces over a field $k$. The nullity of $T$ is
\begin{align*}
\operatorname{nullity}(T) = \dim_k \ker(T).
\end{align*}
For fixed $k$, nullity is the function from linear maps of vector spaces over $k$ to cardinal numbers given by $T \mapsto \operatorname{nullity}(T)$.
[/definition]
A finite-dimensional domain presents a bookkeeping problem: some independent directions may collapse to zero, while others survive as independent output directions. Rank and nullity are designed to measure these two effects, but it is not automatic that they account for the whole domain without overlap or omission.
[quotetheorem:385]
This theorem converts algebraic questions about maps into arithmetic. The next example shows the formula in a projection, where the invisible and visible directions can be read from the coordinates.
[example: A Projection Has Visible and Invisible Directions]
Let $T: \mathbb{R}^3 \to \mathbb{R}^2$ be defined by
\begin{align*}
T(x_1,x_2,x_3)=(x_1,x_2).
\end{align*}
A vector $(x_1,x_2,x_3)$ lies in $\ker(T)$ precisely when
\begin{align*}
T(x_1,x_2,x_3)=(0,0).
\end{align*}
Using the definition of $T$, this condition is
\begin{align*}
(x_1,x_2)=(0,0).
\end{align*}
Equality of ordered pairs gives $x_1=0$ and $x_2=0$, while $x_3$ is unrestricted. Writing $t=x_3$, we get
\begin{align*}
\ker(T)=\{(0,0,t):t\in\mathbb{R}\}.
\end{align*}
The set $\{(0,0,1)\}$ spans this kernel because every element of the kernel has the form
\begin{align*}
(0,0,t)=t(0,0,1).
\end{align*}
It is linearly independent because if
\begin{align*}
a(0,0,1)=(0,0,0),
\end{align*}
then scalar multiplication gives
\begin{align*}
(0,0,a)=(0,0,0),
\end{align*}
so equality of third coordinates gives $a=0$. Hence $\{(0,0,1)\}$ is a basis of $\ker(T)$, and therefore
\begin{align*}
\operatorname{nullity}(T)=\dim_{\mathbb{R}}\ker(T)=1.
\end{align*}
For the image, every value of $T$ is an ordered pair of the form $(x_1,x_2)$, so
\begin{align*}
\operatorname{im}(T)\subseteq \mathbb{R}^2.
\end{align*}
Conversely, if $(y_1,y_2)\in\mathbb{R}^2$, then
\begin{align*}
T(y_1,y_2,0)=(y_1,y_2).
\end{align*}
Thus every vector of $\mathbb{R}^2$ lies in the image, so
\begin{align*}
\mathbb{R}^2\subseteq\operatorname{im}(T).
\end{align*}
The two inclusions give
\begin{align*}
\operatorname{im}(T)=\mathbb{R}^2.
\end{align*}
The vectors $(1,0)$ and $(0,1)$ span $\mathbb{R}^2$ because
\begin{align*}
(y_1,y_2)=y_1(1,0)+y_2(0,1).
\end{align*}
They are linearly independent because
\begin{align*}
a(1,0)+b(0,1)=(a,b),
\end{align*}
so $a(1,0)+b(0,1)=(0,0)$ implies $(a,b)=(0,0)$, hence $a=0$ and $b=0$. Therefore $(1,0),(0,1)$ form a basis of $\mathbb{R}^2$, and
\begin{align*}
\operatorname{rank}(T)=\dim_{\mathbb{R}}\operatorname{im}(T)=\dim_{\mathbb{R}}\mathbb{R}^2=2.
\end{align*}
Similarly, $(1,0,0),(0,1,0),(0,0,1)$ form the standard basis of $\mathbb{R}^3$, so
\begin{align*}
\dim_{\mathbb{R}}\mathbb{R}^3=3.
\end{align*}
The numerical statement of the *Rank-Nullity Theorem* for this map is therefore
\begin{align*}
\dim_{\mathbb{R}}\mathbb{R}^3=\operatorname{rank}(T)+\operatorname{nullity}(T).
\end{align*}
Substituting the computed values gives
\begin{align*}
3=2+1.
\end{align*}
The third coordinate is invisible to $T$, while the first two coordinates fill the target.
[/example]
## Direct Sums and Exact Sequences
Dimension behaves best when objects are assembled without overlap. Direct sums express independent assembly, while exact sequences express a controlled way of gluing a subobject and a quotient. These constructions are the algebraic reason dimension is additive.
The direct sum is the cleanest form of combination: an element is a unique sum of pieces from specified subspaces. The next definition is needed to make the phrase independent assembly precise.
[definition: Internal Direct Sum]
Let $V$ be a vector space over a field $k$, and let $U,W \subset V$ be vector subspaces. The vector space $V$ is the internal direct sum of $U$ and $W$, written $V = U \oplus W$, if every $v \in V$ has a unique expression
\begin{align*}
v = u + w
\end{align*}
with $u \in U$ and $w \in W$.
[/definition]
When a vector space is a direct sum, each vector has independent components in the summands. The remaining question is whether bases chosen separately in the two pieces really combine into a basis of the whole space, so that no dimension is lost or counted twice.
[quotetheorem:3273]
Direct sums are restrictive because they require a splitting. In many situations one knows only that one space embeds inside another and that the quotient information is captured by a third space, without having chosen a complementary subspace. Exactness is the condition that records this no-overlap, no-gap relationship between the three spaces.
[definition: Short Exact Sequence of Vector Spaces]
Let $U,V,W$ be vector spaces over a field $k$. A short exact sequence of vector spaces is a diagram
\begin{align*}
0 \to U \xrightarrow{f} V \xrightarrow{g} W \to 0
\end{align*}
of linear maps such that $f$ is injective, $g$ is surjective, and $\ker(g)=\operatorname{im}(f)$.
[/definition]
The short exact sequence says that $V$ contains a copy of $U$, and that collapsing that copy leaves $W$. The proof route is to take a basis of $U$, view it inside $V$, choose basis vectors of $W$, and lift those basis vectors back to $V$; together these vectors form a basis of $V$. The next theorem records the corresponding dimension count without requiring a preferred complement.
[quotetheorem:7840]
The exact-sequence formula is often the most flexible way to compute dimension. The next example uses it to measure a quotient space without constructing a basis of the quotient directly.
[example: Quotienting a Plane by a Line]
For a vector space $V$ and a subspace $U\subset V$, the quotient vector space $V/U$ is the set of cosets $v+U=\{v+u:u\in U\}$. Two cosets are equal exactly when their representatives differ by an element of $U$: $v+U=w+U$ if and only if $v-w\in U$. The quotient map is the linear map $q:V\to V/U$ given by $q(v)=v+U$; it records a vector only up to the directions lying in $U$.
Let $V=\mathbb{R}^2$ and let $U=\{(t,t):t\in\mathbb{R}\}$. We first compute the dimension of the diagonal line $U$. If $(t,t)\in U$, then scalar multiplication in $\mathbb{R}^2$ gives
\begin{align*}
t(1,1)=(t,t).
\end{align*}
Thus every element of $U$ lies in $\operatorname{span}_{\mathbb{R}}\{(1,1)\}$. Conversely, for every $t\in\mathbb{R}$, the vector $t(1,1)=(t,t)$ lies in $U$, so
\begin{align*}
U=\operatorname{span}_{\mathbb{R}}\{(1,1)\}.
\end{align*}
To check linear independence, suppose
\begin{align*}
a(1,1)=(0,0).
\end{align*}
Then
\begin{align*}
(a,a)=(0,0).
\end{align*}
Equality of first coordinates gives $a=0$. Hence $\{(1,1)\}$ is a basis of $U$, and
\begin{align*}
\dim_{\mathbb{R}}U=1.
\end{align*}
The standard vectors $(1,0)$ and $(0,1)$ form a basis of $\mathbb{R}^2$: every $(x,y)\in\mathbb{R}^2$ satisfies
\begin{align*}
(x,y)=x(1,0)+y(0,1),
\end{align*}
and if
\begin{align*}
a(1,0)+b(0,1)=(0,0),
\end{align*}
then
\begin{align*}
(a,b)=(0,0),
\end{align*}
so $a=0$ and $b=0$. Therefore
\begin{align*}
\dim_{\mathbb{R}}V=2.
\end{align*}
Let $q:V\to V/U$ be the quotient map $q(v)=v+U$. Its kernel is $U$. Indeed, $v\in\ker(q)$ exactly when
\begin{align*}
q(v)=0+U.
\end{align*}
By the definition of $q$, this is
\begin{align*}
v+U=0+U.
\end{align*}
Two cosets are equal exactly when their representatives differ by an element of $U$, so this holds exactly when
\begin{align*}
v-0\in U.
\end{align*}
Thus
\begin{align*}
\ker(q)=U.
\end{align*}
The map $q$ is surjective because every coset $v+U\in V/U$ is equal to $q(v)$.
Let $i:U\to V$ be the inclusion map. Since $i(u)=u$, the equality $i(u)=0$ implies $u=0$, so $i$ is injective. Also,
\begin{align*}
\operatorname{im}(i)=U=\ker(q).
\end{align*}
Thus
\begin{align*}
0\to U\xrightarrow{i}V\xrightarrow{q}V/U\to 0
\end{align*}
is a short exact sequence. By *Dimension in a Short Exact Sequence*,
\begin{align*}
\dim_{\mathbb{R}}V=\dim_{\mathbb{R}}U+\dim_{\mathbb{R}}(V/U).
\end{align*}
Substituting $\dim_{\mathbb{R}}V=2$ and $\dim_{\mathbb{R}}U=1$ gives
\begin{align*}
2=1+\dim_{\mathbb{R}}(V/U).
\end{align*}
Adding $-1$ to both sides gives
\begin{align*}
1=\dim_{\mathbb{R}}(V/U).
\end{align*}
Hence
\begin{align*}
\dim_{\mathbb{R}}(V/U)=1.
\end{align*}
The quotient identifies vectors that differ by motion along the diagonal line $U$, leaving one independent transverse direction.
[/example]
## Rank over Rings
### Free Modules and Torsion
The first major failure of dimension occurs when fields are replaced by rings. A module over a ring may have generators without a basis, and even a small module can contain torsion that has no vector-space analogue. Rank is the part of dimension that survives for modules that resemble vector spaces closely enough.
We first need modules, the ring-theoretic analogue of vector spaces. The next definition looks close to the definition of a vector space, but the change from fields to rings matters because nonzero scalars need not be invertible.
[definition: Module]
Let $R$ be a ring. A left $R$-module is an abelian group $(M,+)$ together with a scalar multiplication map $\cdot: R \times M \to M$, written $(r,m) \mapsto rm$, such that for all $r,s \in R$ and $m,n \in M$,
\begin{align*}
r(m+n) = rm + rn.
\end{align*}
\begin{align*}
(r+s)m = rm + sm.
\end{align*}
\begin{align*}
(rs)m = r(sm).
\end{align*}
\begin{align*}
1_R m = m.
\end{align*}
[/definition]
For modules over rings, generators need not behave like vector-space bases: relations among coefficients can make representations nonunique, and torsion can make a nonzero scalar kill an element. A module has a genuine coordinate system only in the special case where every element has a unique finite expansion in selected generators.
[definition: Free Module]
Let $R$ be a ring. A left $R$-module $M$ is free if there exists a set $B \subset M$ such that every $m \in M$ has a unique function $c: B \to R$ with finite support and
\begin{align*}
m = \sum_{b \in B} c(b)b.
\end{align*}
[/definition]
For free modules, the analogue of dimension should be the size of a basis, but this count is meaningful only if different bases have the same cardinality.
The obstruction is that a general ring need not force all bases of the same free module to have the same size. Rank for a free module is therefore defined only in the situation where basis size is genuinely independent of the chosen basis.
[definition: Rank of a Free Module]
Let $R$ be a ring, and let $M$ be a free left $R$-module. If any two bases of $M$ have the same cardinality, the rank of $M$ over $R$, denoted $\operatorname{rank}_R M$, is that cardinality.
[/definition]
The condition in the definition matters. Many familiar rings have the invariant basis number property, so finite free ranks are well-defined over them, but arbitrary rings need not behave that way: it can happen that $R^m \cong R^n$ with $m \ne n$. Rank for modules is therefore not a universal replacement for vector-space dimension; it is a reliable invariant only after the ring and the class of modules have enough structure. The next example shows a different failure that forces rank to be more careful than simply counting generators: torsion can destroy coordinate uniqueness.
[example: Torsion Prevents a Basis]
Consider $\mathbb{Z}/2\mathbb{Z}$ as a module over $\mathbb{Z}$, with elements denoted $\bar{0}$ and $\bar{1}$. The element $\bar{1}$ generates the module because every element is an integer multiple of $\bar{1}$:
\begin{align*}
0\bar{1}=\bar{0}.
\end{align*}
\begin{align*}
1\bar{1}=\bar{1}.
\end{align*}
Since $\mathbb{Z}/2\mathbb{Z}=\{\bar{0},\bar{1}\}$, these two equations show that $\operatorname{span}_{\mathbb{Z}}\{\bar{1}\}=\mathbb{Z}/2\mathbb{Z}$.
We show that this generating set is not a basis. If $\{\bar{1}\}$ were a basis, then the zero element would have a unique expression as an integer multiple of $\bar{1}$, by the definition of a free module. But
\begin{align*}
0\bar{1}=\bar{0}.
\end{align*}
Also,
\begin{align*}
2\bar{1}=\overline{2\cdot 1}.
\end{align*}
Since $2\cdot 1=2$ and $2\equiv 0 \pmod 2$, we have
\begin{align*}
\overline{2\cdot 1}=\bar{2}=\bar{0}.
\end{align*}
Therefore
\begin{align*}
2\bar{1}=\bar{0}.
\end{align*}
Combining the two expressions for $\bar{0}$ gives
\begin{align*}
0\bar{1}=2\bar{1}.
\end{align*}
The coefficients $0$ and $2$ are distinct integers, so the expression of the zero element is not unique. Hence $\{\bar{1}\}$ is not a basis.
In fact, no basis can exist. A basis $B$ cannot be empty, because the only finite sum using elements of the empty set is the empty sum, which is $\bar{0}$, so an empty basis would not span $\bar{1}$. Thus any basis $B$ would contain some element $b$. Since the module has only two elements, either $b=\bar{0}$ or $b=\bar{1}$.
If $b=\bar{0}$, then
\begin{align*}
1b=1\bar{0}.
\end{align*}
Scalar multiplication by any integer preserves the zero element, so
\begin{align*}
1\bar{0}=\bar{0}.
\end{align*}
Also,
\begin{align*}
0b=0\bar{0}=\bar{0}.
\end{align*}
Therefore
\begin{align*}
1b=0b.
\end{align*}
The coefficients $1$ and $0$ are distinct, so uniqueness fails.
If $b=\bar{1}$, then
\begin{align*}
2b=2\bar{1}=\bar{0}.
\end{align*}
Also,
\begin{align*}
0b=0\bar{1}=\bar{0}.
\end{align*}
Therefore
\begin{align*}
2b=0b.
\end{align*}
The coefficients $2$ and $0$ are distinct, so uniqueness fails again.
Thus every possible nonempty spanning set contains an element whose coefficient is not uniquely determined in an expression for zero. Consequently $\mathbb{Z}/2\mathbb{Z}$ is generated by one element but is not free as a $\mathbb{Z}$-module, so module rank cannot be defined by merely counting arbitrary generators.
[/example]
### Generic Rank
Over an integral domain, an arbitrary module may have torsion or fail to be free, so counting generators does not give a stable size. Passing to the fraction field kills torsion and turns the module into a vector-space object, allowing rank to be measured by ordinary dimension after denominators are allowed.
Before writing the definition, recall the tensor product notation used in it. If $R$ is a commutative ring, $M$ is an $R$-module, and $K$ is an $R$-algebra, then $K \otimes_R M$ denotes the abelian group generated by formal symbols $a\otimes m$ with $a\in K$ and $m\in M$, subject to the balancing rules that make the symbol additive in both variables and identify $(ar)\otimes m$ with $a\otimes (rm)$ for $r\in R$. When $R$ is an integral domain and $K$ is its field of fractions, this construction extends scalars from $R$ to $K$, turning $M$ into a vector space over $K$ after denominators are allowed.
[definition: Rank over an Integral Domain]
Let $R$ be an integral domain with fraction field $K = \operatorname{Frac}(R)$, and let $M$ be an $R$-module. The rank of $M$ over $R$ is
\begin{align*}
\operatorname{rank}_R M = \dim_K(K \otimes_R M),
\end{align*}
when this dimension is defined.
[/definition]
The tensor definition introduces a possible mismatch: it measures size only after passing to the fraction field, while the older free-module rank counts basis elements before any localization.
For the definition to be trustworthy, the passage from $M$ to $K\otimes_R M$ must not distort the easiest case: a free module with an explicit basis. The obstruction to check is that tensoring could in principle collapse or create relations among basis elements after denominators are introduced. The calibration result says that this does not happen for free modules, so the generic rank agrees with ordinary basis-counting when a basis already exists.
[quotetheorem:7841]
The tensor definition explains why rank ignores torsion. The next example makes this visible for a finite abelian group, which is nonzero as a module but has zero generic size.
[example: Rank Ignores Finite Abelian Groups]
Let $M=\mathbb{Z}/6\mathbb{Z}$ as a $\mathbb{Z}$-module. Since $\operatorname{Frac}(\mathbb{Z})=\mathbb{Q}$, the definition of rank over an integral domain gives
\begin{align*}
\operatorname{rank}_{\mathbb{Z}}M=\dim_{\mathbb{Q}}(\mathbb{Q}\otimes_{\mathbb{Z}}M).
\end{align*}
We compute $\mathbb{Q}\otimes_{\mathbb{Z}}M$ by showing that every pure tensor is zero.
Every element of $M$ has the form $r\bar{1}$ for some $r\in\mathbb{Z}$. Hence every pure tensor has the form $q\otimes r\bar{1}$ with $q\in\mathbb{Q}$ and $r\in\mathbb{Z}$. By the balancing relation in the tensor product over $\mathbb{Z}$,
\begin{align*}
q\otimes r\bar{1}=qr\otimes \bar{1}.
\end{align*}
Thus it is enough to show that $s\otimes \bar{1}=0$ for every $s\in\mathbb{Q}$.
Fix $s\in\mathbb{Q}$. Since $s=\frac{s}{6}\cdot 6$ in $\mathbb{Q}$, we have
\begin{align*}
s\otimes \bar{1}=\left(\frac{s}{6}\cdot 6\right)\otimes \bar{1}.
\end{align*}
By the balancing relation,
\begin{align*}
\left(\frac{s}{6}\cdot 6\right)\otimes \bar{1}=\frac{s}{6}\otimes 6\bar{1}.
\end{align*}
In $M=\mathbb{Z}/6\mathbb{Z}$,
\begin{align*}
6\bar{1}=\bar{6}=\bar{0}.
\end{align*}
Therefore
\begin{align*}
\frac{s}{6}\otimes 6\bar{1}=\frac{s}{6}\otimes \bar{0}.
\end{align*}
The zero element of $M$ satisfies $\bar{0}=0\bar{1}$, so another use of balancing gives
\begin{align*}
\frac{s}{6}\otimes \bar{0}=\frac{s}{6}\otimes 0\bar{1}.
\end{align*}
Then
\begin{align*}
\frac{s}{6}\otimes 0\bar{1}=\left(\frac{s}{6}\cdot 0\right)\otimes \bar{1}.
\end{align*}
Since $\frac{s}{6}\cdot 0=0$ in $\mathbb{Q}$,
\begin{align*}
\left(\frac{s}{6}\cdot 0\right)\otimes \bar{1}=0\otimes \bar{1}.
\end{align*}
By additivity in the first tensor factor,
\begin{align*}
0\otimes \bar{1}=(0+0)\otimes \bar{1}=0\otimes \bar{1}+0\otimes \bar{1}.
\end{align*}
Adding the additive inverse of $0\otimes \bar{1}$ to both sides gives
\begin{align*}
0=0\otimes \bar{1}.
\end{align*}
Combining the displayed equalities gives
\begin{align*}
s\otimes \bar{1}=0.
\end{align*}
Now for any pure tensor $q\otimes m$, choose $r\in\mathbb{Z}$ with $m=r\bar{1}$. Then
\begin{align*}
q\otimes m=q\otimes r\bar{1}=qr\otimes \bar{1}=0.
\end{align*}
Every tensor is a finite sum of pure tensors, so every tensor is a finite sum of zeros. Hence
\begin{align*}
\mathbb{Q}\otimes_{\mathbb{Z}}\mathbb{Z}/6\mathbb{Z}=0.
\end{align*}
Therefore
\begin{align*}
\operatorname{rank}_{\mathbb{Z}}(\mathbb{Z}/6\mathbb{Z})=\dim_{\mathbb{Q}}0=0.
\end{align*}
The module is nonzero and generated by $\bar{1}$, but after passing to the fraction field its torsion is killed, so its generic linear size is zero.
[/example]
## Krull Dimension and Chains of Primes
Linear dimension counts independent vectors. Commutative algebra needs a different measurement because rings are not usually built from coordinate vectors. For a commutative ring, geometry appears through prime ideals: each prime behaves like an irreducible algebraic condition, and chains of prime ideals measure how many successive specialisations are possible.
The relevant objects are prime ideals. The next definition is needed because Krull dimension counts chains of these objects rather than bases or generators.
[definition: Prime Ideal]
Let $R$ be a commutative ring. A proper ideal $\mathfrak{p} \trianglelefteq R$ is prime if, for all $a,b \in R$,
\begin{align*}
ab \in \mathfrak{p}
\end{align*}
implies $a \in \mathfrak{p}$ or $b \in \mathfrak{p}$.
[/definition]
Prime ideals become a dimension theory only after their inclusions are treated as a measure of successive specialization. The difficulty is that there may be many incomparable primes, so a single count must look at chains and ask how long such a chain can be.
[definition: Krull Dimension]
Let $R$ be a commutative ring. The Krull dimension of $R$, denoted $\dim R$, is the supremum of all integers $n \ge 0$ for which there exists a strictly increasing chain of prime ideals
\begin{align*}
\mathfrak{p}_0 \subsetneq \mathfrak{p}_1 \subsetneq \cdots \subsetneq \mathfrak{p}_n.
\end{align*}
If chains of prime ideals of arbitrarily large finite length exist, then $\dim R=\infty$. If $R$ has no prime ideals, then $\dim R=-\infty$ under the convention used here.
[/definition]
The chain definition would be poorly calibrated if polynomial coordinate rings did not have the dimensions suggested by their variables.
The key test case is the coordinate ring $k[x_1,\dots,x_n]$ of affine $n$-space over a field $k$. Here the variables provide $n$ independent directions, but Krull dimension counts chains of prime ideals rather than variables directly. One therefore needs a theorem showing that these two measurements coincide in the basic polynomial setting: the longest possible prime-ideal chains have exactly the length predicted by the number of variables.
[quotetheorem:7842]
The theorem makes the bridge between algebra and geometry precise: affine $n$-space over $k$ has coordinate ring $k[x_1,\dots,x_n]$, and its algebraic dimension is $n$. The next example shows a concrete chain in the two-variable case.
[example: Prime Chains in a Two-Variable Polynomial Ring]
Let $R=k[x,y]$, where $k$ is a field. We exhibit a chain of prime ideals
\begin{align*}
(0)\subsetneq (x)\subsetneq (x,y).
\end{align*}
The inclusions are strict because $x\in (x)$ but $x\notin (0)$, and $y\in (x,y)$ but $y\notin (x)$.
First, $(0)$ is prime. If $f,g\in k[x,y]$ are nonzero, view them as polynomials in $y$ with coefficients in $k[x]$. Write
\begin{align*}
f=a_m(x)y^m+\text{terms of smaller }y\text{-degree}
\end{align*}
with $a_m(x)\ne 0$, and write
\begin{align*}
g=b_n(x)y^n+\text{terms of smaller }y\text{-degree}
\end{align*}
with $b_n(x)\ne 0$. Since $k[x]$ is an integral domain, $a_m(x)b_n(x)\ne 0$. The coefficient of $y^{m+n}$ in $fg$ is $a_m(x)b_n(x)$, so $fg\ne 0$. Thus $k[x,y]$ is an integral domain, and therefore $(0)$ is prime.
Next, $(x)$ is prime. Define the evaluation map
\begin{align*}
\varphi:k[x,y]\to k[y]
\end{align*}
by
\begin{align*}
\varphi(f(x,y))=f(0,y).
\end{align*}
This map is surjective because every polynomial $h(y)\in k[y]$ satisfies $\varphi(h(y))=h(y)$. Its kernel consists exactly of the polynomials whose $x^0$-term is zero, equivalently the polynomials divisible by $x$, so
\begin{align*}
\ker(\varphi)=(x).
\end{align*}
Hence
\begin{align*}
k[x,y]/(x)\cong k[y].
\end{align*}
Since $k[y]$ is an integral domain, if $ab\in (x)$, then
\begin{align*}
\varphi(a)\varphi(b)=\varphi(ab)=0.
\end{align*}
Thus $\varphi(a)=0$ or $\varphi(b)=0$, so $a\in (x)$ or $b\in (x)$. Therefore $(x)$ is prime.
Finally, $(x,y)$ is maximal, and hence prime. Define
\begin{align*}
\psi:k[x,y]\to k
\end{align*}
by
\begin{align*}
\psi(f(x,y))=f(0,0).
\end{align*}
This map is surjective because each scalar $c\in k$ is the image of the constant polynomial $c$. Its kernel is the set of polynomials with zero constant term, namely
\begin{align*}
\ker(\psi)=(x,y).
\end{align*}
Therefore
\begin{align*}
k[x,y]/(x,y)\cong k.
\end{align*}
Since $k$ is a field, $(x,y)$ is maximal. Every maximal ideal in a commutative ring is prime, so $(x,y)$ is prime.
Thus the displayed chain is a strictly increasing chain of prime ideals with two strict inclusions. It has length $2$, matching the value $\dim k[x,y]=2$ given by *Dimension of Polynomial Rings over a Field*.
[/example]
Krull dimension is not vector-space dimension. The next example separates the two notions in the polynomial ring in one variable.
[example: Infinite Vector Dimension but Krull Dimension One]
Let $R=k[x]$. As a vector space over $k$, every polynomial in $R$ has the form
\begin{align*}
p(x)=a_0+a_1x+\cdots+a_nx^n
\end{align*}
with $a_0,\dots,a_n\in k$. Equivalently,
\begin{align*}
p(x)=\sum_{i=0}^n a_i x^i.
\end{align*}
Thus every polynomial is a finite $k$-linear combination of the monomials $1,x,x^2,\dots$, so these monomials span $R$ over $k$.
To check linear independence, suppose that a finite linear combination of distinct monomials is zero:
\begin{align*}
a_0+a_1x+\cdots+a_nx^n=0.
\end{align*}
The zero polynomial has every coefficient equal to $0$, so equality of polynomial coefficients gives
\begin{align*}
a_0=0,\ a_1=0,\ \dots,\ a_n=0.
\end{align*}
Hence every finite linear relation among $1,x,x^2,\dots$ is trivial. Therefore $1,x,x^2,\dots$ form a basis of $R$ as a $k$-vector space. Since this basis is infinite,
\begin{align*}
\dim_k R=\infty.
\end{align*}
As a ring, $R$ has Krull dimension $1$. The chain
\begin{align*}
(0)\subsetneq (x)
\end{align*}
is strictly increasing because $x\in (x)$ but $x\notin (0)$.
First, $(0)$ is prime. If $f,g\in k[x]$ are nonzero, write their leading terms as
\begin{align*}
f=a_mx^m+\text{terms of smaller degree}
\end{align*}
and
\begin{align*}
g=b_nx^n+\text{terms of smaller degree}
\end{align*}
with $a_m\ne 0$ and $b_n\ne 0$. Since $k$ is a field, it is an integral domain, so $a_m b_n\ne 0$. The leading term of $fg$ is
\begin{align*}
a_m b_n x^{m+n}.
\end{align*}
Thus $fg\ne 0$, so $k[x]$ is an integral domain. Therefore $(0)$ is prime.
Next, $(x)$ is prime. Define
\begin{align*}
\varphi:k[x]\to k
\end{align*}
by
\begin{align*}
\varphi(f(x))=f(0).
\end{align*}
This map is surjective because every $c\in k$ is the image of the constant polynomial $c$. A polynomial
\begin{align*}
f(x)=a_0+a_1x+\cdots+a_nx^n
\end{align*}
lies in $\ker(\varphi)$ exactly when
\begin{align*}
f(0)=a_0=0.
\end{align*}
That condition is equivalent to
\begin{align*}
f(x)=a_1x+\cdots+a_nx^n=x(a_1+a_2x+\cdots+a_nx^{n-1}),
\end{align*}
so $\ker(\varphi)=(x)$. Hence
\begin{align*}
k[x]/(x)\cong k.
\end{align*}
Since $k$ is an integral domain, the quotient $k[x]/(x)$ is an integral domain, and therefore $(x)$ is prime.
Thus $(0)\subsetneq (x)$ is a chain of prime ideals with one strict inclusion, so
\begin{align*}
\dim R\ge 1.
\end{align*}
By *Dimension of Polynomial Rings over a Field* applied to the one-variable polynomial ring $k[x]$,
\begin{align*}
\dim k[x]=1.
\end{align*}
Therefore $R=k[x]$ has infinite vector-space dimension over $k$ but Krull dimension $1$: vector-space dimension counts the infinitely many monomial directions, while Krull dimension counts the maximum length of chains of prime ideals.
[/example]
## Homological Dimension
A final algebraic meaning of dimension comes from resolutions. When an object is not free, we may approximate it by free or projective objects. Homological dimension asks how long such an approximation must be.
Projective modules are the modules that behave like direct summands of free modules. The next definition is phrased by a lifting property because lifting is what makes projective modules behave well in exact sequences.
[definition: Projective Module]
Let $R$ be a ring. A left $R$-module $P$ is projective if, for every surjective $R$-module homomorphism $g: M \to N$ and every $R$-module homomorphism $f: P \to N$, there exists an $R$-module homomorphism $h: P \to M$ such that
\begin{align*}
g \circ h = f.
\end{align*}
[/definition]
Projective modules are useful replacements, but a single projective module may not map isomorphically onto the module one wants to study. The remedy is to keep track of the remaining error by another projective module, then repeat; exactness is the condition that each new term accounts precisely for the previous error.
[definition: Projective Resolution]
Let $R$ be a ring, and let $M$ be a left $R$-module. A projective resolution of $M$ is an exact sequence
\begin{align*}
\cdots \xrightarrow{d_3} P_2 \xrightarrow{d_2} P_1 \xrightarrow{d_1} P_0 \xrightarrow{d_0} M \to 0
\end{align*}
where each $P_i$ is a projective left $R$-module and each $d_i$ is an $R$-module homomorphism.
[/definition]
Different resolutions of the same module can have different lengths, so the length of a randomly chosen resolution is not an invariant.
To turn resolutions into a numerical measure, one must separate accidental choices from unavoidable homological complexity. The relevant question is not how long a particular resolution happens to be, but whether some finite projective resolution exists and how short such a resolution can be made. Projective dimension packages this optimization problem into an invariant of the module.
[definition: Projective Dimension]
Let $R$ be a ring, and let $M$ be a left $R$-module. The projective dimension of $M$, denoted $\operatorname{pd}_R(M)$, is the least integer $n \ge 0$ such that $M$ has a projective resolution of the form
\begin{align*}
0 \to P_n \to P_{n-1} \to \cdots \to P_0 \to M \to 0.
\end{align*}
If no such integer exists, then $\operatorname{pd}_R(M)=\infty$. For fixed $R$, projective dimension is the function from left $R$-modules to $\{0,1,2,\dots\} \cup \{\infty\}$ given by $M \mapsto \operatorname{pd}_R(M)$.
[/definition]
Projective dimension measures one module at a time, but a ring can have modules of very different homological complexity. To measure the ring itself, one asks for the worst projective dimension among all left modules, allowing the answer to be infinite when no uniform bound exists.
[definition: Global Dimension]
Let $R$ be a ring. The left global dimension of $R$ is
\begin{align*}
\operatorname{gldim}(R) = \sup\{\operatorname{pd}_R(M) : M \text{ is a left } R\text{-module}\}.
\end{align*}
Left global dimension is the function from rings to $\{0,1,2,\dots\} \cup \{\infty\}$ given by $R \mapsto \operatorname{gldim}(R)$.
[/definition]
This page uses left projective global dimension because it is the version tied directly to projective resolutions. Other homological dimensions answer nearby but different questions: right global dimension uses right modules, weak global dimension uses flat resolutions, and injective dimensions measure injective rather than projective replacements. These variants agree in some important commutative regular settings, but they are not interchangeable in general.
Polynomial rings provide the main test case for homological dimension because relations among generators can themselves satisfy relations, producing successive layers of syzygies. The central question is whether this process can continue indefinitely or whether the number of variables imposes a finite upper bound.
[quotetheorem:7843]
Hilbert syzygy is often the first place where homological dimension feels like a genuine dimension: adding a polynomial variable allows one more possible layer of syzygies. The global-dimension statement is stronger because it ranges over all left modules, not only finitely generated ones. It is therefore not a formal consequence of the theorem just stated; it is a deeper companion result that is best stated separately.
[quotetheorem:7845]
The global theorem explains the uniform bound, while the finitely generated syzygy theorem explains where the bound first appears in computations. The next example shows the smallest nontrivial resolution over a polynomial ring in one variable.
[example: A One-Step Resolution over a One-Variable Polynomial Ring]
Let $R=k[x]$ and let $M=R/(x)$. Define
\begin{align*}
\mu:R\to R
\end{align*}
by $\mu(f)=xf$, and define
\begin{align*}
\pi:R\to R/(x)
\end{align*}
by $\pi(f)=f+(x)$. We verify that
\begin{align*}
0\to R\xrightarrow{\mu}R\xrightarrow{\pi}R/(x)\to 0
\end{align*}
is exact.
First, $\mu$ is injective. If $\mu(f)=0$, then $xf=0$ in $k[x]$. Since $k$ is a field, $k[x]$ is an integral domain, and since $x\ne 0$, the equality $xf=0$ implies $f=0$.
Next, the image of $\mu$ is exactly $(x)$. Indeed,
\begin{align*}
\operatorname{im}(\mu)=\{\mu(f):f\in R\}=\{xf:f\in R\}=(x).
\end{align*}
The kernel of $\pi$ is also $(x)$, because
\begin{align*}
\pi(f)=0+(x)
\end{align*}
holds exactly when
\begin{align*}
f+(x)=0+(x),
\end{align*}
which holds exactly when $f\in (x)$. Hence
\begin{align*}
\ker(\pi)=(x)=\operatorname{im}(\mu).
\end{align*}
Finally, $\pi$ is surjective because every coset $f+(x)\in R/(x)$ is equal to $\pi(f)$.
The module $R$ is projective over itself. To see this directly, let $g:N\to L$ be a surjective $R$-module homomorphism and let $f:R\to L$ be any $R$-module homomorphism. Since $g$ is surjective, choose $n\in N$ with
\begin{align*}
g(n)=f(1).
\end{align*}
Define $h:R\to N$ by
\begin{align*}
h(r)=rn.
\end{align*}
Then $h$ is $R$-linear, and for every $r\in R$,
\begin{align*}
(g\circ h)(r)=g(rn)=r g(n)=r f(1)=f(r).
\end{align*}
Thus $R$ satisfies the lifting property for projective modules. Therefore the exact sequence above is a projective resolution of $R/(x)$ of length $1$, so
\begin{align*}
\operatorname{pd}_R(R/(x))\le 1.
\end{align*}
It remains to show that the projective dimension is not $0$. If $R/(x)$ were projective, then applying the lifting property to the surjection $\pi:R\to R/(x)$ and the identity map $\operatorname{id}_{R/(x)}$ would give an $R$-module homomorphism $s:R/(x)\to R$ such that
\begin{align*}
\pi\circ s=\operatorname{id}_{R/(x)}.
\end{align*}
This equation implies that $s$ is injective: if $s(m)=0$, then
\begin{align*}
m=\operatorname{id}_{R/(x)}(m)=(\pi\circ s)(m)=\pi(0)=0.
\end{align*}
Let
\begin{align*}
u=s(1+(x)).
\end{align*}
Since $1+(x)\ne 0$ in $R/(x)$ and $s$ is injective, we have $u\ne 0$. But in $R/(x)$,
\begin{align*}
x(1+(x))=x+(x)=0+(x).
\end{align*}
Using $R$-linearity of $s$ gives
\begin{align*}
xu=x\,s(1+(x))=s(x(1+(x)))=s(0+(x))=0.
\end{align*}
This contradicts the fact that $k[x]$ is an integral domain, because $x\ne 0$, $u\ne 0$, and an integral domain has no product of two nonzero elements equal to $0$. Hence $R/(x)$ is not projective.
A module has projective dimension $0$ exactly when it is projective, so $\operatorname{pd}_R(R/(x))\ne 0$. Together with the length-one resolution, this gives
\begin{align*}
\operatorname{pd}_R(R/(x))=1.
\end{align*}
This one-step resolution records that quotienting by $(x)$ introduces exactly one layer of relations over the polynomial ring $k[x]$.
[/example]
## Beyond and Connected Topics
Dimension is not a single definition but a family of compatible measurements. In [Cambridge IB Linear Algebra](/page/Cambridge%20IB%20Linear%20Algebra), dimension is developed through bases, matrices, rank, quotient spaces, and canonical forms. That is the natural continuation for the vector-space part of this page.
In [Cambridge III Commutative Algebra](/page/Cambridge%20III%20Commutative%20Algebra), Krull dimension becomes a central invariant of rings and schemes. The key change is that dimension is no longer a count of coordinates in a vector space; it is a measurement of prime ideal chains, localisation, height, and algebraic geometry.
In [Homological Algebra I: Complexes and Resolutions](/page/Homological%20Algebra%20I%3A%20Complexes%20and%20Resolutions), projective dimension and global dimension are studied through complexes, exactness, derived functors, and resolutions. This is where the exact-sequence viewpoint becomes the main language rather than a supporting tool.
There are also dimensions outside algebra. [Geometric Measure Theory I: Measures and Hausdorff Dimension](/page/Geometric%20Measure%20Theory%20I%3A%20Measures%20and%20Hausdorff%20Dimension) develops Hausdorff dimension, which measures metric size and can be non-integer. Comparing it with algebraic dimension shows how the same word adapts to different kinds of structure.
## References
Androma, [Cambridge IB Linear Algebra](/page/Cambridge%20IB%20Linear%20Algebra).
Androma, [Cambridge III Commutative Algebra](/page/Cambridge%20III%20Commutative%20Algebra).
Androma, [Homological Algebra I: Complexes and Resolutions](/page/Homological%20Algebra%20I%3A%20Complexes%20and%20Resolutions).
Androma, [Geometric Measure Theory I: Measures and Hausdorff Dimension](/page/Geometric%20Measure%20Theory%20I%3A%20Measures%20and%20Hausdorff%20Dimension).
Serge Lang, *Linear Algebra* (1987).
David Eisenbud, *Commutative Algebra with a View Toward Algebraic Geometry* (1995).
Charles A. Weibel, *An Introduction to Homological Algebra* (1994).