# What is a free module?

Among modules over a commutative ring $R$, the module $R^n$ has a nice feature: homomorphisms from $R^n$ to another module $M$ are entirely determined by where they send the $n$ elements $(1,0,\dots,0)$, $(0,1,0,\dots, 0)$, up to $(0,\dots,0,1)$. Moreover, any choice of where we want those basis elements to be sent in $M$ extends uniquely to a homomorphism $R^n\to M$. Thus homomorphisms $R^n\to M$ correspond bijectively to $n$-tuples of elements of $M$. This is an example of a universal property: $R^n$ is the universal module equipped with an $n$-tuple of elements, also called the free module on $n$ elements.

What about the free module on an infinite collection of elements?

Given an arbitrary indexing set $I$, there’s a clear candidate for the free module on an $I$-family of elements: the product module $R^I:= \prod_{i\in I} R$.

Question: Is $R^I$ the free module on an $I$-family of elements?

More precisely, if we let $\mathrm{e}_i\in R^I$ be the element whose $i$th component is $1$ and all of whose other components are $0$, does every $I$-tuple of elements of $M$ arise as the image of $(\mathrm{e}_i)_{i\in I}$ under a unique homomorphism $R^I\to M$?

Answer: No! Let $R$ be the field $\mathbb{R}$, and let $I=\mathbb{N}$ so that $R^I$ is just the vector space of infinite sequences of real numbers. Now let $M$ be the vector space whose elements are again infinite sequences of real numbers, but up to an equivalence where we regard two sequences as the same if they differ in only finitely many places. We have a natural map $R^I\to M$ sending each sequence to its equivalence class, and in particular all the $\mathrm{e}_i$ are sent to the class of $(0,0,\dots)$. But there’s another map $R^I\to M$ sending each $\mathrm{e}_i$ to $0$—the zero map! Even though these two maps act the same way on the $\mathrm{e}_i$, they are not the same map: the former sends $(1,1,\dots)$ and $(0,0,\dots)$ to different equivalence classes, since they differ in infinitely many places.

The general problem is that if $I$ is infinite then the elements $\mathrm{e}_i$ do not generate $R^I$: any element with infinitely many nonzero components is outside of their span, so its image is not determined by the images of the $\mathrm{e}_i$. But this problem can be fixed by taking the submodule of $R^I$ that they do generate, which is called $R^{(I)}$ or $R^{\oplus I}$. This is the submodule of $R^I$ consisting of those elements with only finitely many nonzero components, and every such element can be uniquely written as an $R$-linear combination of the $\mathrm{e}_i$. Therefore arbitrary assignments $\mathrm{e}_i\mapsto m_i$ extend uniquely to $R$-module homomorphisms $R^{(I)}\to M$, so $R^{(I)}$ is the true free module on an $I$-family of elements.

Question: Okay, so $R^I$ isn’t the free module on its $I$-family $(\mathrm{e}_i)_{i\in I}$ if $I$ is infinite, even if $R$ is a field, but it’s still abstractly free, right? It has some basis?

Answer: No, not in general! Free modules are always flat, but only for some rings $R$ is the $R$-module $R^I$ flat for all index sets $I$: the coherent rings. A ring is coherent if its finitely generated ideals are finitely presented as modules, so in particular, every Noetherian ring is coherent, but there are more, like any polynomial ring in infinitely many variables $k[x_1,x_2,\dots]$.

What’s an example of a non-coherent ring? In a sense the simplest example is $R=\mathbb{Q}[y,x_1,x_2,\dots]/(yx_1,yx_2,\dots)$, since the ideal $(y)$ is finitely generated but not finitely presented; the kernel of the surjection $R\twoheadrightarrow (y)$ is the annihilator of $y$, namely $(x_1,x_2,\dots)$, which is not finitely generated. And in fact, $R^{\mathbb{N}}$ has no $R$-basis.