On the Rank and the Span Rank of Modules

math
algebra
Author

sun123zxy

Published

November 18, 2025

Modified

February 25, 2026

1 Rank

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]

2 Span Rank vs. Rank

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\).

It remains to show that this implies \(n \leq m\). This is called the strong rank condition for \(R\). It is known that any nonzero commutative ring satisfies the strong rank condition, but proving this requires a lot of machinery. Proving the case when \(R\) is an integral domain is much easier. We left this part of proof to Proposition 8.

3 Span Rank vs. Fiber Dimension

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(\mathfrak m) := R/\mathfrak m\). Tensoring the exact sequence \[ R^{\oplus m} \longrightarrow M \longrightarrow 0 \] with \(k(\mathfrak m)\), we get an exact sequence \[ k(\mathfrak m)^{\oplus m} \longrightarrow k(\mathfrak m) \otimes_R M \longrightarrow 0 \]

Above derivation of exact sequence shows that \(\operatorname{spanrank}_R M \geq \dim_{k(\mathfrak m)} (k(\mathfrak m) \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.

3.1 Examples

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\), 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 3.21]. \(\dim_k \left( k(\mathfrak m) \otimes_A B \right)\) thus measures the “size” of the fiber.

Example 1 (An arithmetic counterexample) \(R = \mathbb Z\) and \(M = \mathbb Z/2\mathbb Z\).

\(\operatorname{spanrank}_{\mathbb Z} M = 1\).

Take \(\mathfrak m = 2 \mathbb Z\), \(\mathbb Z/2\mathbb Z \otimes_{\mathbb Z} \mathbb Z/3\mathbb Z \cong 0\) has dimension \(0\) over the residue field \(\mathbb Z/2\mathbb Z\).

Example 2 (A minimal geometric counterexample) \(R = \mathbb C[x]\) and \(M = \mathbb C[x] / (x)\).

\(\operatorname{spanrank}_R M = 1\).

Take \(\mathfrak m = (x - a)\) for some \(a \neq 0\), then \(\mathbb C[x] / (x) \otimes_{\mathbb C[x]} \mathbb C[x] / (x - a) \cong 0\) has dimension \(0\) over the residue field \(\mathbb C[x] / (x - a)\).

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.

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\).

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 \[ \begin{aligned} k(\mathfrak m) \otimes_A B &= 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) \end{aligned} \] We may view the latter as \(k[y] / (y^2 - x_0^2)\): its \(k[x]\)- or \(k(\mathfrak m)\)-module structure is reinterpreted by letting \(x\) act on \(k[y] / (y^2 - x_0^2)\) via scalar multiplication by \(x_0\). So that in effect, tensoring \(k(\mathfrak m) = k[x] / (x - x_0)\) is the same as substituting \(x\) with \(x_0\). Moreover, since \(k(\mathfrak m)\) is of \(k\)-dimension \(1\), we have \[ \dim_{k(\mathfrak m)} \left( k(\mathfrak m) \otimes_A B \right) = \dim_{k(\mathfrak m)} k[y] / (y^2 - x_0^2) = \dim_k k[y] / (y^2 - x_0^2) \] Hence, with basis \(1, y\), the dimension is \(2\) constantly for all maximal ideals \(\mathfrak m\) of \(A\).

Geometrically, this corresponds to the fact that any fiber of this projection consist of \(2\) points (counted with multiplicity).

Remark

Remark. 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 \[ \begin{aligned} k(\mathfrak m) \otimes_A B &= \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) \end{aligned} \] Note that it’s of \(k\)-dimension \(4\), and \(k(\mathfrak m)\) is of \(k\)-dimension \(2\). 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[x]\), \(B = k[x,y] / (xy)\). Define an \(A\)-module structure on \(B\) via multiplication.

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\).

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 m := (x - x_0)\) of \(A\), then the fiber over \(\mathfrak m\) is given by \[ k(\mathfrak m) \otimes_A B = k[x] / (x - x_0) \otimes_{k[x]} k[x,y] / (xy) \] Note that we are again tensoring with \(k(\mathfrak m) = k[x] / (x - x_0)\). As we have discussed in Example 3, this is the same as substituting \(x\) with \(x_0\). Hence, the above is isomorphic to \(k[y] / (x_0 y)\), whose \(k[x]\)- or \(k(\mathfrak m)\)-module structure is given by letting \(x\) act on \(k[y] / (x_0 y)\) via scalar multiplication by \(x_0\). Furthermore, it suffices to compute the dimension of \(k[y] / (x_0 y)\) over \(k\).

Now when \(x_0 = 0\), \(k[y] / (x_0 y)\) has \(k\)-dimension \(+\infty\). When \(x_0 \neq 0\), \(k[y] / (x_0 y)\) has \(k\)-dimension \(1\). Hence, \(\dim_{k(\mathfrak m)} \left( k(\mathfrak m) \otimes_A B \right)\) varies over different maximal ideals \(\mathfrak m\) of \(A\). Geometrically, this validates that the fiber over the origin \((0,0)\) is the entire \(y\)-axis, while fibers over other points are singletons.

Geometrically, picking \(\mathfrak m = (x)\) corresponds to looking at the fibers around \(x=0\). This “jumping” of fiber dimension is reflected algebraically by the non-flatness of \(B\) as an \(A\)-module.

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

Remark. Note that \(B\) is not a flat \(A\)-module. This is because, if we pick \(\mathfrak m := (x)\) an maximal ideal of \(A\), then \(y\) is a \(x\)-torsion element in \(B\) (by \(xy = 0\)). That is, \(x \otimes_A y\) is a nonzero element in the kernel of the multiplication map \(\mathfrak m \otimes_A B \to B\).

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)\).

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.

\(B\) is generated by \(1\), \(t\) as an \(A\)-module, hence \(\operatorname{spanrank}_A B = 2\).

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) = k[t] / (t^2) \] As \(k(\mathfrak m)\) is of \(k\)-dimension \(1\), it suffices to compute the dimension of \(k[t] / (t^2)\) over \(k\). With basis \(1, t\), it 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) = k[t] / (t - 1) \] which has \(k\)-dimension \(1\).

Hence, the fiber dimension varies over different maximal ideals of \(A\). 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\)
Remark

Remark. 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\).

3.2 The local case

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)\)?

4 Comparing ranks of free modules

We close our discussion with some well-known properties of homomorphisms between finitely generated free modules. From now on we assume \(R\) is a nonzero.

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

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

Remark

Remark. There’s actually a more general result: for any finitely-generated \(R\)-module \(M\), every epimorphism \(M \to M\) is an isomorphism. To show this, view \(M\) as an \(R[x]\)-module via the action \(x \cdot m = \varphi(m)\), then \((x) \cdot M = x \cdot M = M\) by the surjectivity of \(\varphi\). By Nakayama’s lemma, there exists \(sx = r \in (x) \subseteq R[x]\) such that \((1-sx) \cdot M = (1-r) \cdot M = 0\), i.e. \(sx \cdot m = m\) for all \(m \in M\), that is, \(m \mapsto s \cdot m\) is an inverse of \(\varphi\). Hence \(\varphi\) is an isomorphism.

This result is due to [2]. We also referred to Math StackExchange.

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

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

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

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

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

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

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

Proposition 8 ([1, exercise 2.11]) An \(R^{\oplus n} \to R^{\oplus m}\) monomorphism \(\varphi\) implies \(n \leq m\).

\(R\) is said to satisfy the strong rank condition if the above statement always holds.

It’s easy to see that this is true for \(R\) an integral domain: tensoring with the field of fractions of \(R\) does not destroy the injectivity.

For the general case of arbitrary nonzero commutative rings, we provide some references:

  • [3]. This paper proves a general result that for any finitely-generated \(R\)-module \(M\) and its submodule \(N\), every epimorphism \(N \to M\) is an isomorphism.

    The strong rank condition follows immediately from this result: view \(R^n\) as a submodule of \(R^m\) via the monomorphism \(\varphi\), assume otherwise that \(n > m\), then we have an epimorphism \(R^m \to R^n\) by projection, hence an isomorphism \(R^m \to R^n\) by the result of [3]. This contradicts (4).

    Note that [2]’s result stated in Proposition 4 is a special case of this result by taking \(N = M\).

  • Strong rank condition for commutative rings - Mathlib 4 Docs

  • Search Keyword: McCoy’s Rank Theorem

  • Another proof seems to make use of the exterior algebra.

References

[1]
M. F. Atiyah and I. G. Macdonald, Introduction to commutative algebra. Addison-Wesley Publishing Company, Inc., 1969.
[2]
W. V. Vasconcelos, “On finitely generated flat modules,” Trans. Amer. Math. Soc., vol. 138, pp. 505–512, 1969, doi: 10.1090/S0002-9947-1969-0238839-5.
[3]
M. Orzech, “Onto endomorphisms are isomorphisms,” The American Mathematical Monthly, vol. 78, no. 4, pp. 357–362, Apr. 1971, doi: 10.1080/00029890.1971.11992759.