TITLE: Freeness of stalk Implies locally free
QUESTION [9 upvotes]: Let $ A $ be a Noetherian ring, and $ M $ a finitely generated $ A $ module. Suppose that $  \mathfrak  { p } \in M $ such that $ M_{\mathfrak{p}} $ is free. Show that there is a $ f \in A  \setminus \mathfrak{p} $ such that $ M_{f} $ is free over $ A_{f} $. 
P.S. Some related questions are
1) Flatness and Local Freeness 
2)  Locally free sheaves, though, both of these don't answer the specific question that I have above, in that I am just looking around one prime (so my module is not projective etc). I have seen this in Vakil but I can't find it at the moment. I will post my proof of the fact above below but I would like to see what are some other ways to do it.

REPLY [5 votes]: $\newcommand{\gp}{{\mathfrak p}}$Let $\left\{ \frac{m_1}{s_1}, \cdots, \frac{m_n}{s_n} \right\}$ be an $A_\gp$-basis of $M_\gp$, where $m_i \in M$ and $s_i \in A-\gp$. Observe that $\{m_1, \cdots, m_n\}$ is still a $A_\gp$-basis of $M_\gp$.
This gives an map $A^n \to M$ that localizes to an isomorphism $A_\gp^n \to M_\gp$ at $\gp$. Let $K$ and $Q$ be the kernel and cokernel respectively of the map $A^n \to M$. This gives an exact sequence:
$$0 \to K \to A^n \to M \to Q \to 0$$
Localizing is exact, so we have an exact sequence:
$$0 \to K_\gp \to A_\gp^n \to M_\gp \to Q_\gp \to 0$$
But we know that the map $A_\gp^n \to M_\gp$ is an isomorphism, so we must have $K_\gp = 0$ and $Q_\gp = 0$.
$A$ is noetherian, and $K$ is a submodule of $A^n$, so $K$ is finitely generated, so the fact that $K_\gp = 0$ implies that there is $s \in A-\gp$ such that $K_s = 0$; $M$ is finitely generated, and $Q$ is a quotient of $M$, so $Q$ is finitely generated, so the fact that $Q_\gp = 0$ implies that there is $t \in A-\gp$ such that $Q_t = 0$.
Now take $f = st \in A-\gp$. Localize the exact sequence at $f$ to get:
$$0 \to K_f \to A_f^n \to M_f \to Q_f \to 0$$
But $K_f = (K_s)_t = 0_t = 0$ and $Q_f = (Q_t)_s = 0_s = 0$, so the exact sequence becomes:
$$0 \to 0 \to A_f^n \to M_f \to 0 \to 0$$
So $M_f$ is free over $A_f$ as required.