F is flat if and only if every ideal I of R, the R-module $I\otimes _R F$ is torsion-free.

Let $$R$$ be an integral domain, and $$F$$ an $$R$$-module. Prove $$F$$ is flat if and only if for every ideal $$I$$ of $$R$$, the $$R$$-module $$I\otimes _RF$$ is torsion-free.

Here's my weak attempt to solve it:

($$\Rightarrow$$) Assume $$F$$ is flat then every $$I\otimes _RF\rightarrow R\otimes _RF$$ is injective. I know $$M$$ is torsion-free if and only if $$M\rightarrow M_Q$$ is injective. And $$Q$$ is flat as an $$R$$ module. But I can't draw any conclusion from that information.

($$\Leftarrow$$) The $$R$$-module is $$I\otimes _RF$$ is torsion-free. We want to show $$I\otimes _RF\rightarrow R\otimes _RF$$ is injective which would imply $$F$$ is flat. But I don't know how to prove it.

• =>: observe that for each $r\ne0\in R$ the multiplication map $I\xrightarrow{r}I$ is injective, so $I\otimes_RF\xrightarrow{r} I\otimes_RF$ is injective as well. This exactly says $I\otimes_RF$ is torsion-free. Commented Oct 9, 2022 at 18:03
Proof: =>] For any $$r\ne0\in R$$, the multiplication by $$r$$ map $$I\to I$$ is injective, so $$I\otimes_RF\xrightarrow{r}I\otimes_RF$$ is injective.
<=] We hope to check the inclusion $$I\otimes_RF\to F$$ is injective, so let $$x:=\sum_{i=1}^na_i\otimes x_i\in I\otimes_RF$$ be such that $$\sum_{i=1}^na_ix_i=0$$, where all $$a_i\ne0$$. Then, for any $$r\ne0\in I$$, we have $$r\cdot x=\sum_{i=1}^nra_i\otimes x_i=\sum_{i=1}^nr\otimes a_ix_i=r\otimes\sum_{i=1}^na_ix_i=0.$$ Since $$I\otimes_RF$$ is torsion-free this shows $$x=0$$.
Alternatively, for any $$r\ne0\in I$$, we have the inclusions $$rI\subset (r)\subset I$$, which induces morphisms $$rI\otimes_RF\to rR\otimes_RF\to I\otimes_RF$$. The composition is injective since $$I\otimes_RF$$ is torsion-free. Thus, $$rI\otimes_RF\to rR\otimes_RF$$ must be injective. But this is equivalent to $$I\otimes_RF\to R\otimes_RF$$ being injective.