Lemma 10.81.3. Let $M$ be an $R$-module. Then $M$ is flat if and only if the following condition holds: for every finitely presented $R$-module $P$, if $N \to M$ is a surjective $R$-module map, then the induced map $\mathop{\mathrm{Hom}}\nolimits _ R(P, N) \to \mathop{\mathrm{Hom}}\nolimits _ R(P, M)$ is surjective.

Proof. First suppose $M$ is flat. We must show that if $P$ is finitely presented, then given a map $f: P \to M$, it factors through the map $N \to M$. By Lemma 10.81.2 the map $f$ factors through a map $F \to M$ where $F$ is free and finite. Since $F$ is free, this map factors through $N \to M$. Thus $f$ factors through $N \to M$.

Conversely, suppose the condition of the lemma holds. Let $f: P \to M$ be a map from a finitely presented module $P$. Choose a free module $N$ with a surjection $N \to M$ onto $M$. Then $f$ factors through $N \to M$, and since $P$ is finitely generated, $f$ factors through a free finite submodule of $N$. Thus $M$ satisfies the condition of Lemma 10.81.2, hence is flat. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).