# Is a finitely generated torsion-free R-module free over R if R is an integral domain?

I know this is the case if $$R$$ is a PID, but PID's are special instances of Integral Domains, so I am wondering if there is a counter-example to the case where R is an integral domain.

This post shows the result when $$R$$ is a Principal Ideal Domain: Proof about finitely generated torsion-free R-module M is free, where R is a PID

• Geometrically, you are asking if all line bundles over an (irreducible) affine variety are trivial. The simplest counterexample is to take the line bundle $L(P - Q)$ on an elliptic curve, punctured at the origin, where $P$ and $Q$ are distinct points not equal to the origin. – hunter May 17 '19 at 2:07

Let $$R$$ be a Dedekind domain, which is not a principal ideal domain, for example the ring of integers in a number field such as $$R=\Bbb Z[\sqrt{-6}]$$. Then $$R$$ will have a non-principal ideal, $$I$$ say. Then, as an $$R$$-module, $$I$$ is finitely generated, torsion free, but not principal. In the above example, we could take $$I=2R+\sqrt{-6}R$$.