In the book I'm reading, there haven't been given any proof for the following theorem, since it's "obvious". I'm trying to prove it myself, but seem to have a bit of troubles.
Let $A$ ring and $M$ an $A$-module. If for every finitely generated ideal $I\subset A$ the map $I\otimes_A M\rightarrow A\otimes_A M$ is injective, then $M$ is flat.
So I know, what I have to prove is, that given an exact sequence $\ldots\rightarrow N'\rightarrow N \rightarrow N''\rightarrow \ldots $, I want to show that $\ldots\rightarrow N'\otimes_A M\rightarrow N \otimes_A M \rightarrow N''\otimes_A M\rightarrow \ldots $ is exact. I know that you can split long exact sequences into short exact sequences, and that tensor product is right exact. So I guess it would be enough to show that given $N\rightarrow N'$ injective, then $N \otimes_A M\rightarrow N'\otimes_A M$ should be injective?
I'd also say that submodules of $A$ are ideals of $A$, hence we have injective $N \otimes_A M\rightarrow A \otimes_A M\cong M$ and $N'\otimes_A M\rightarrow A\otimes_A M\cong M$. However this is where I'm stuck.
Hint:
First, as any ideal of $A$ is the union of its finitely generated sub-ideals and the direct limit is an exact functor which commutes with tensor products, the same hypothesis is true foe any ideal.
Next, any finitely generated $A$-module is a quotient of a finitely generated free module. So you can try to prove that, if $K$ is a submodule of a finitely generated free module $L$ of rank $n$, then $$K\otimes_A M\longrightarrow L\otimes_A M$$ is injective. This can be done by induction on the rank $n$.
For the case $n=2$, consider a submodule $K$ of $A^2$. Denote $K_1$ the intersection of $K$ with the first factor $A\times\{0\}$ of $A^2$, and $M_K2$ the canonical projection of $M$ onto the second factor $\{0\}\times A$. Then do some diagram hunting in the commutative diagram: \begin{alignat}6 K_1&\otimes_A M&{}\longrightarrow{}& &K&\otimes_A M&{}\longrightarrow {} K_2&\otimes_A M\\ &\downarrow &&&&\downarrow &&\downarrow\\[-0.5ex] L_1&\otimes_A M&{}\longrightarrow{}& &A^2&\otimes_A M&\longrightarrow L_2&\otimes_A M \end{alignat}