On the Rank and the Span Rank of Modules

math
algebra
Author

sun123zxy

Published

November 18, 2025

Modified

December 1, 2025

We work over a commutative ring \(R\) with unity. The rank \(\operatorname{rank}_R M\) of a module \(R\)-module \(M\) is defined as the maximal cardinality of a \(R\)-linearly independent subset of \(M\). A homologist might write this as an exact sequence \[ 0 \longrightarrow R^{\oplus n} \longrightarrow M \] where \(n\) is as large as possible.

It’s also tempting to define the rank in other ways. For example, if \(R\) is an integral domain with field of fractions \(k\), one might define the rank of an \(R\)-module \(M\) as the dimension of the \(k\)-vector space \(k \otimes_R M\). Are these two definitions equivalent?

Proposition 1 Let \(R\) be an integral domain with field of fractions \(k\). For any \(R\)-module \(M\), \(\operatorname{rank}_R M = \dim_k (k \otimes_R M)\).

Proof. To see this, consider the following commutative diagram, where downward arrows are given by tensoring with \(k\):

R n M k n k R M
Figure 1

It suffices to show that the top arrow is injective if and only if the bottom arrow is injective.

For the downward direction, note that \(k\) is a flat \(R\)-module, so tensoring with \(k\) preserves injections.

For the upward direction, suppose the bottom arrow is injective. Consider an element \((a_i)_{i=1}^n \in R^{\oplus n}\) that maps to zero in \(M\). Its image in \(k^{\oplus n}\) also maps to zero in \(k \otimes_R M\). Since the bottom arrow is injective, the image in \(k^{\oplus n}\) must be zero, which means each \(a_i\) is zero in \(k\). Since \(R\) is an integral domain, the localization \(R \to k\) is injective, hence each \(a_i\) is zero in \(R\), indicating that the the top arrow is injective.

Remark (Generalizing to localizations)

Remark (Generalizing to localizations). Note that we have only used the flatness of \(k\) and that \(R\) is an integral domain. Since every localization of a ring is flat, the same proof shows that as long as \(R\) is an integral domain, localzation does not change the rank of a module.

Indeed, \(\operatorname{rank}\), as a function over \(\operatorname{Spec}R\), is locally constant. [TODO]

Another possible definition of rank is the minimal number of generators of a module. We call this the span rank \(\operatorname{spanrank}_R M\) of an \(R\)-module \(M\). A homologist might write this as an exact sequence \[ R^{\oplus m} \longrightarrow M \longrightarrow 0 \] where \(m\) is as small as possible.

Clearly, \(\operatorname{rank}\) and \(\operatorname{spanrank}\) are equal for free modules, since the definition of a basis requires both linear independence and spanning. For finitely generated modules over a PID, having the structure theorem in hand, the \(\operatorname{rank}\) is exactly the free rank, while the \(\operatorname{spanrank}\) is the number of the direct summands in the decomposition. We see that \(\operatorname{spanrank}M \geq \operatorname{rank}M\) in this case. This is in general true:

Proposition 2 For any \(R\)-module \(M\), we have \(\operatorname{rank}_R M \leq \operatorname{spanrank}_R M\).

Proof. Consider the following commutative diagram with exact rows:

0 R n M R m M 0
Figure 2

where \(R^n \to R^m\) is constructed by the projective nature of \(R^n\). \(R^n \to M\) is injective, hence so do \(R^n \to R^m \to M\) and in turn \(R^n \to R^m\). Thus, we have an injection \(R^n \to R^m\). Tensoring with any residue field of \(R\), we get an injection of vector spaces over that field, which implies \(n \leq m\).

Regarding Proposition 1, one might wonder if there is an analogous result for \(\operatorname{spanrank}\). Let’s say \(\mathfrak m\) is a maximal ideal of \(R\) and the residue field \(k := R/\mathfrak m\). Tensoring the exact sequence \[ R^{\oplus m} \longrightarrow M \longrightarrow 0 \] with \(k\), we get an exact sequence \[ k^{\oplus m} \longrightarrow k \otimes_R M \longrightarrow 0 \]

Above derivation of exact sequence shows that \(\operatorname{spanrank}_R M \geq \dim_k (k \otimes_R M)\). Sadly, the reversed inequality is not true in general. We shall provide some examples to illustrate this irregularity. Before that, let’s briefly discuss the geometric intuition behind this construction.

Consider the ring homomorphism \(A \to B\), we view \(B\) as a \(A\)-module via this homomorphism. Fix a maximal ideal \(\mathfrak m\) of \(A\) and write the residue field \(k = k(\mathfrak m) = A/\mathfrak m\), then the tensor product of \(A\)-algebras \(k(\mathfrak m) \otimes_A B\) corresponds to looking at the fiber of this homomorphism over the point \(\mathfrak m\): precisely speaking, \(\operatorname{Spec}\left( k(\mathfrak m) \otimes_A B \right)\) is cannonically isomorphic to \((\operatorname{Spec}f)^{-1}(\mathfrak m)\) [1, exercise 21]. \(\dim_k \left( k \otimes_A B \right)\) thus measures the “size” of the fiber.

Example 1 (An arithmetic counterexample) Let \(R = \mathbb Z\) and \(M = \mathbb Z/2\mathbb Z\). Then \(\operatorname{spanrank}_{\mathbb Z} M = 1\) but \(\mathbb Z/2\mathbb Z \otimes_{\mathbb Z} \mathbb Z/3\mathbb Z \cong 0\).

Example 2 (A minimal geometric counterexample) Let \(R = \mathbb C[x]\) and \(M = \mathbb C[x] / (x)\). Then \(\operatorname{spanrank}M = 1\). But the \(\mathbb C\)-dimension of \(\mathbb C[x] / (x) \otimes_{\mathbb C[x]} \mathbb C[x] / (x - a)\) is \(0\) for any \(a \neq 0\).

Example 3 (A good projection) Let \(k\) be an algebraically closed field and \(A = k[x]\), \(B = k[x,y] / (x^2 - y^2)\). Define an \(A\)-module structure on \(B\) via multiplication. As an \(A\)-module, \(B\) is generated by \(1\), \(y\), hence \(\operatorname{spanrank}_A B = 2\).

Let’s compute the fibers of \(\operatorname{Spec}\varphi\) over different maximal ideals of \(A\). Pick a maximal ideal \(\mathfrak m := (x - x_0)\) of \(A\), then the residue field \(k(\mathfrak m) = k[x] / (x - x_0)\). The fiber over \(\mathfrak m\) corresponds to the \(A\)-algebra \[ k(\mathfrak m) \otimes_A B \cong k[x] / (x - x_0) \otimes_{k[x]} k[x,y] / (x^2 - y^2) \cong k[x,y] / (x^2 - y^2, x - x_0) \cong k[y] / (y^2 - x_0^2) \] In effect, we have substituted \(x\) with \(x_0\) in \(B\); now any \(f(x) \in k[x]\) act on \(k[y] / (y^2 - x_0^2)\) via scalar multiplication by \(f(x_0)\). Hence \(\dim_{k(\mathfrak m)} \left( k(\mathfrak m) \otimes_A B \right)\) is \(2\) constantly for all maximal ideals \(\mathfrak m\) of \(A\). Geometrically, this corresponds to projecting the algebraic variety \(V(x^2 - y^2)\) onto the \(x\)-axis, i.e. \(\operatorname{Spec}\varphi : (x,y) \mapsto x\). Any fiber consist of \(2\) points (counted with multiplicity).

If \(k\) is not algebraically closed, will this still hold? Let’s try an example. If \(k = \mathbb R\) and we pick \(\mathfrak m = (x^2 + 1)\) with residue field \(k(\mathfrak m) = \mathbb R[x] / (x^2 + 1)\), then the fiber over \(\mathfrak m\) corresponds to the \(A\)-algebra \[ \mathbb R[x] / (x^2 + 1) \otimes_A \mathbb R[x,y] / (x^2 - y^2) \cong \mathbb R[x,y] / (x^2 - y^2, x^2 + 1) = \mathbb R[x,y] / (x^2 + 1, y^2 + 1) \] \(1, y\) form a basis of this \(k(\mathfrak m)\)-algebra. Hence \(\dim_{k(\mathfrak m)} \left( k(\mathfrak m) \otimes_A B \right) = 2\) still holds.

So its tempting to conjecture that in this example, \(\operatorname{spanrank}_A B = \dim_{k(\mathfrak m)} \left( k(\mathfrak m) \otimes_A B \right)\) for any maximal ideal \(\mathfrak m\) of \(A\). This is indeed true: clever readers might have already noticed that \(B\) is a free \(A\)-module with basis \(\{x+y, x-y\}\). As \(k\)-algebra, \(k[x,y] / (x^2-y^2) \cong k[x,y] / (x-y) \times k[x,y] / (x+y)\).

Example 4 (A non-flat projection with varying fiber dimensions) Let \(k\) be a field and \(A = k[t]\), \(B = k[x,y] / (xy)\). Define an \(A\)-module structure on \(B\) via the homomorphism \(\varphi: A \to B\), \(t \mapsto x\). As an \(A\)-module, \(B\) is generated by \(1\), \(y\), \(y^2\), \(\ldots\), hence \(\operatorname{spanrank}_A B = +\infty\).

Let’s compute the fibers of \(\operatorname{Spec}\varphi\) over different maximal ideals of \(A\). For the maximal ideal \(\mathfrak t := (t - t_0)\) of \(A\), then the fiber over \(\mathfrak t\) is given by \[ k[t] / (t - t_0) \otimes_{k[t]} k[x,y] / (xy) \cong k[x,y] / (xy, x - t_0) \cong k[y] / (t_0 y). \] it is isomorphic to \(k\) if \(t_0 \neq 0\) and to \(k[y]\) if \(t_0 = 0\). Geometrically, this corresponds to projecting the union of two coordinate axes \(\operatorname{Spec}B\) onto the \(x\)-axis, i.e. \(\operatorname{Spec}\varphi : (x,y) \mapsto x\). The fiber over the origin \((0,0)\) is the entire \(y\)-axis, while fibers over other points are singletons.

Note that \(B\) is not a flat \(A\)-module. This is because, if we pick \(\mathfrak t := (t)\) an maximal ideal of \(A\), then \(y\) is a \(t\)-torsion element in \(B\) (by \(t \cdot y = \varphi(t) y = xy = 0\)). That is, \(t \otimes_{\mathfrak t} y\) is a nonzero element in the kernel of the multiplication map \(\mathfrak t \otimes_A B \to B\). Geometrically, picking \(\mathfrak t = (t)\) corresponds to looking at the fibers around \(t=0\). This “jumping” of fiber dimension is reflected algebraically by the non-flatness of \(B\) as an \(A\)-module.

t 0 t 0 Spec φ x y t 0
Figure 3: \(\operatorname{Spec}\varphi\) and its fibers

Example 5 (A non-flat parametrization) Let \(k\) be a field and \(A = k[x,y] / (x^3-y^2)\), \(B=k[t]\). Define an \(A\)-module structure on \(B\) via the homomorphism \(\varphi: A \to B\), \((x,y) \mapsto (t^2, t^3)\). \(B\) is generated by \(1\), \(t\) as an \(A\)-module, hence \(\operatorname{spanrank}_A B = 2\).

Geometrically, this corresponds to the fact that the parametrized curve \(\operatorname{Spec}\varphi : t \mapsto (t^2, t^3)\) has a cusp at the origin.

Pick the maximal ideal \(\mathfrak m := (x,y)\) of \(A\), then the fiber over \(\mathfrak m\) corresponds to the \(A\)-algebra \[ k(\mathfrak m) \otimes_A B \cong k[x,y] / (x, y) \otimes_{A} k[t] \cong k[t] / (t^2, t^3) \cong k[t] / (t^2) \] which has \(k\)-dimension \(2\). On the other hand, for the maximal ideal \(\mathfrak m := (x - 1, y - 1)\) of \(A\), the fiber over \(\mathfrak m\) corresponds to the \(A\)-algebra \[ k(\mathfrak m) \otimes_A B \cong k[x,y] / (x - 1, y - 1) \otimes_{A} k[t] \cong k[t] / (t^2 - 1, t^3 - 1) \cong k \] which has \(k\)-dimension \(1\). Hence, varies over different maximal ideals of \(A\).

Note that \(B\) is not a flat \(A\)-module. This is because, if we pick \(\mathfrak m := (x,y)\) an ideal of \(A\), then \(x \cdot t = y \cdot 1_B\) becomes a nontrivial \(\mathfrak m\)-relation in \(B\), i.e. \(x \otimes_A t - y \otimes_A 1_B\) is a nonzero element in the kernel of the multiplication map \(\mathfrak m \otimes_A B \to B\). Geometrically, picking \(\mathfrak m = (x,y)\) corresponds to looking at the fibers of this map around the origin. [TODO] Understand this thoroughly.

t t 0 Spec φ x y y 2 = x 3 ( t 2 ,t 3 )
Figure 4: \(\operatorname{Spec}\varphi\)

From the above examples, one might notice that this irregularity is mostly constituted from the choice of residue fields, i.e. the choice of fibers over different maximal ideals. Luckily, it turns out that this is almost the only obstruction. Once we restrict ourselves to a local ring, the world becomes much nicer:

Proposition 3 Let \((R, \mathfrak m)\) be a local ring with residue field \(k = R/\mathfrak m\). For any finitely generated \(R\)-module \(M\), we have \(\operatorname{spanrank}_R M = \dim_k (k \otimes_R M)\).

Proof. Lifting the exact sequence \[ k^{\oplus m} \longrightarrow k \otimes_R M \longrightarrow 0 \] to \[ R^{\oplus m} \longrightarrow M \longrightarrow 0 \] is a direct consequence of Nakayama’s lemma. cf. [1, theorem 2.8] for example.

Remark (Necessity of finite generation)

Remark (Necessity of finite generation). At most of the time, we work in Noetherian rings, hence the finitely generated condition is rather mild.

Nevertheless, it is indeed necessary. Consider the following example:

Let \(M = k[[x]]\) be the formal power series ring over a field \(k\), regarded as a module over \(R = k[x]\). Then as \(k[x]\)-modules, \[ k[x] / (x) \otimes_{k[x]} k[[x]] \cong k[[x]] / x k[[x]] \] has dimension \(1\) over \(k\), while \(\operatorname{spanrank}_{k[x]} k[[x]]\) is infinite.

Localizing \(R = k[x]\) at the maximal ideal \((x)\) does not change any statements above, providing an counterexample over a local ring.

Exercise 1 Here are some exercises:

  • What can we say about the module \(M\) given that \(\operatorname{rank}_R M = \operatorname{spanrank}_R M\)?

  • Show that the \(\mathbb Z\)-module \(\mathbb Q\) is a counterexample of the following statement:

    Let \(M\) be a flat \(R\)-module. Is it true that for any maximal ideal \(\mathfrak m\) of \(R\) with residue field \(k = R/\mathfrak m\), we have \(\operatorname{spanrank}_R M = \dim_k (k \otimes_R M)\)?

We close our discussion with some well-known properties of homomorphisms between finitely generated free modules:

Proposition 4 Let \(R\) be a ring, then:

  1. Any \(R^{\oplus n} \to R^{\oplus n}\) epimorphism \(\varphi\) must be an isomorphism. [1, exercise 3.15]

  2. An \(R^{\oplus n} \to R^{\oplus n}\) monomorphism \(\varphi\) may not be an isomorphism in general.

    Is it true when \(R\) is a local ring? [TODO]

  3. An \(R^{\oplus n} \to R^{\oplus m}\) epimorphism \(\varphi\) implies \(n \geq m\). [1, exercise 2.11]

  4. An \(R^{\oplus n} \to R^{\oplus m}\) isomorphism \(\varphi\) implies \(n = m\). [1, exercise 2.11]

  5. An \(R^{\oplus n} \to R^{\oplus m}\) monomorphism \(\varphi\)? [TODO] [1, exercise 2.11]

    It is at least true for \(R\) an integral domain.

Proof.

  1. Obtain a split monomorphism (a right inverse of \(\varphi\)) from the fact that \(R^{\oplus n}\) is projective. Use the determinant to conclude.

    [TODO] There is also a proof using residue fields and Nakayama’s lemma. See [1, exercise 3.15].

  2. Consider \(\varphi: \mathbb Z \to \mathbb Z\), \(z \mapsto 2z\).

  3. Tensor with any residue field of \(R\). Right side is still exact, hence a vector space epimorphism.

  4. Do the same as (3) again with the inverse map.

  5. When \(R\) is an integral domain, tensoring with the field of fractions of \(R\) does not destroy the injectivity, hence (5) holds in this case.

References

[1]
M. F. Atiyah and I. G. Macdonald, Introduction to commutative algebra. Addison-Wesley Publishing Company, Inc., 1969.