# Why isn't every finitely generated module free?

Suppose I have a finitely generated module $M$ over $R.$ Why is it that given a generating set I can't find a subset that is a basis? If the generating set is independent done. If it is dependent, can't we always find a maximal independent subset that spans the entire module as well by Zorn's Lemma?

• There is no reason to assume $M$ is finitely generated. The only relevance of such an assumption would be that if you have a finite generating set, you don't need Zorn's lemma to find a maximal independent subset of it. – Eric Wofsey Oct 19 '17 at 21:21

That is because, when one proves a vector space over a field has a basis, one property of fields is used in a crucial way:

In a field, every non-zero element has an inverse.

This is no more true in a ring.

However, in some rings, properties close to the existence of bases remain true. For instance, over a P.I.D., every submodule of a finitely generated free module is finitely generated and free.

A counter-example which sheds some light on what happens: in the ring $R=K[X,Y]$ ($K$ a field), the ideal $(X,Y)$, a submodule of the free $R$-module $R$, has $\{X,Y\}$ as a minimal set of generators. Yet, $X$ and $Y$ are not linearly independent since $\; Y\cdot X-X\cdot Y=0$.

• Yes, the module has to be free (or at least torsion-free). – Bernard Oct 19 '17 at 21:25

You can find a maximal independent subset, but that subset might not span the entire module! For instance, let $R=\mathbb{Z}$ and $M=\mathbb{Z}/2\mathbb{Z}$. Then $M$ is generated by $\{1\}$, but no nonempty subset of $M$ is independent. So your maximal independent subset is just $\emptyset$, which does not generate all of $M$.

(The reason this doesn't happen for vector spaces is that if $V$ is a vector space, $B\subset V$ is linearly independent, and $v\in V$ is not in the span of $B$, then $B\cup \{v\}$ is linearly independent, so $B$ cannot be a maximal independent subset. The way you prove this is by considering a linear relation involving $v$ and elements of $B$, and then dividing by the coefficient of $v$ to find that $v$ is actually a linear combination of elements of $B$. But you can't do this over a general ring, since the coefficient of $v$ may not have an inverse!)

Based on Eric Wofsey's answer you might think that the problem in his example is that $M$ has torsion, but actually the problem persists even if $M$ is free! For example, take $R = M = \mathbb{Z}$. There is a generating set $\{ 2, 3 \}$ which is not independent, and the maximal independent subsets are $\{ 2 \}$ and $\{ 3 \}$, neither of which generate all of $M$.

The problem really is that you can't divide, which means you can't assume that if you remove an element that's linearly dependent on the others then you haven't changed the submodule they generate.