A criterion of flat modules
Let $R$ be a commutative ring and $M$ an $R$-module such that for every ideal $I \subset R$ the natural map $I \otimes_R M \rightarrow IM$ is an isomorphism.
Why is $M$ flat ?
This result is taken from Wikipedia.
Solution 1:
This result should appear in many commutative algebra books, e.g. Matsumura, Commutative Ring Theory, Theorem 7.7, p.50. The point is that the given condition implies that $\mathrm{Tor}^1 (R/I, M)$ vanishes for any ideal $I$.
To show that $M$ is flat, we want to show that tensoring $M$ preserves the exact sequence of $R$-modules $0 \to N \to N'$. $N'$ is a direct limit of $N + F$, where $F$ is a finitely generated $R$-submodule of $N'$. By exactness of taking direct limit, we may assume that $N' = N+F$ for one such $F$. By inducting on number of generators of $F$, we may assume that $F$ is generated by one element, say $a$. Then $N' = N + Ra$ and
$$0 \to N \to N+Ra \to (N+Ra)/N \cong R/I \to 0$$
where $I = \{r \in R: ra \in N\}$. Vanishing $\mathrm{Tor}^1(R/I,M)$ then implies that this sequence is exact after tensoring $M$.
Solution 2:
For an $R$-module $B$ we denote by $B^*$ the $R$-module $Hom_{Ab}(B,\mathbb{Q}/\mathbb{Z})$, which is called the Pontrjagin dual of $B$. You can prove the following:
1- A map $f:B\rightarrow C$ is injective if and only if the dual map $f^*:C^*\rightarrow B^*$ is surjective.
2- Since the functor $\otimes_R B$ is left adjoint to $Hom_{Ab}(B,-)$ then for any morphism of $R$-modules $A'\rightarrow A$ we have a commutative diagram: \begin{array}[lll] \ Hom(A,B^*)&\rightarrow&Hom(A',B^*)\\ \ \ \ \downarrow\simeq&&\ \ \ \downarrow\simeq\\ (A\otimes B)^*&\rightarrow&(A'\otimes B)^* \end{array}
Using this diagram and 1 you can prove that an $R$-module $B$ is flat if and only if $B^*$ is injective. Using this diagram again with $A'\rightarrow A$ replaced by the inclusion $I\rightarrow R$ then 1 and the Baer's criterion for injectivity show that $B^*$ is injective if and only if $I\otimes B\rightarrow IB$ is an isomorphism.