$M$ is projective iff $M$ is locally free

How to prove this theorem?

A finitely presented module is projective iff it is locally free (the localization at every prime ideal is free over the localized ring).

This is given right after the statement that a finitely generated module over a local ring is free. How to use it? If $$M$$ is a finitely presented projective module, then its localization $$M_P$$ is a module over a local ring. Is the localization again projective? If so, the statement I mentioned can be applied.

For the other direction, the hint says to use that if $$S$$ is flat over $$R$$ and $$M$$ is finitely presented, then there is an isomorphism $$S\otimes_R Hom_R(M,N)\to Hom_S(S\otimes_R M, S\otimes_R N)$$ More specifically, the hint is to show that for any surjection $$\phi: F\to M$$, the map $$Hom_R(M,F)\to Hom_R(M,M)$$ is also a surjection. But not only don't I see how to deduce that from the above, but also I'm not sure why this is enough to show.

$$M_P$$ is projective for every prime $$P$$. This follows from the fact that $$M_P \simeq R_P\otimes_R M$$, and that $$R_P\otimes_R -$$ is left adjoint to the forgetful functor from $$R_P$$-modules, which is exact, therefore it preserves projectives (you can give a proof of this by hand of course if you don't know enough about functors).

For the second question, note first of all that the second hint is enough to conclude : indees it implies (by taking an antecedent of $$id_M$$) that any short exact sequence ending with $$M$$ splits, which is another definition of projective.

Now note that for $$R$$-modules $$A,B$$, $$A\to B$$ is surjective if and only if $$A_P\to B_P$$ is surjective for any prime $$P$$ (that's a classical lemma). Therefore if you start with a surjection $$\phi : F\to M$$, you may want to study $$\hom(M,F)_P\to \hom (M,M)_P$$. But now, $$A_P= R_P\otimes_R A$$ for any $$A$$ so what does the first hint tell you ?

• So we get that $Hom_R(M,F)\to Hom_R(M,M)$ is surjective iff $Hom_{R/P}(M_P,F_P)\to Hom_{R/P}(M_P,M_P)$ is surjective, and it suffices to prove the latter. We also know $F_P\to M_P$ is surjective and that $M_P$ is free. The map $Hom_{R/P}(M_P,F_P)\to Hom_{R/P}(M_P,M_P)$ is defined by $(f: M_P\to F_P)\mapsto (\phi_P\circ f: M_P\to M_P)$. I still cannot see why it's surjective, and how one can use that $M_P$ is free. Mar 30, 2019 at 17:23
• It's $R_P$, and it's "iff it's surjective for all $P$". Well $M_P$ is free, and in particular projective, hence $\hom_{R_P}(M_P, -)$ is exact, in particular preserves surjectivity Mar 30, 2019 at 17:40
• Would it be enough to assume $M$ is locally free at the maximal ideals instead of prime ideals to conclude $M$ is projective?
– uno
Mar 4, 2021 at 4:06
• @uno : the part of the proof where we use the assumption on primes is that "a linear map is surjective if and only if it is at every prime localization", which is a corollary of "a module is zero if and only if it is after every prime localization" (by looking at the cokernel). But if a module is zero after every localization at a maximal ideal, then it is $0$ too, so the answer is yes. Mar 4, 2021 at 12:21
• Sorry for such a late comment. But it seems that your hint gives that "locally projective $\Leftrightarrow$ projective when $M$ is finitely presented? (In the first paragraph, you showed if $M$ is projective, then $M_\mathfrak{p} \cong M \otimes_{A} A_{\mathfrak{p}}$ is projective, and conversely in the third paragraph, what we really need is that $M_\mathfrak{p}$ is a projective $A_{\mathfrak{p}}$-module. The locally free condition actually guarantee the locally projective-ness.) Sorry but could you please examine whether my argument is correct or not? Thank you so much! :) Jun 6 at 12:00