Suppose $R$ is a ring and $M$ is a finitely generated module such that the images of $m_1, \dots, m_r$ in $S^{-1}M$ generate $S^{-1}M$ as a $S^{-1}R$-module. Then prove that the images of $m_1, \dots, m_r$ in $M_f$, generate $M_f$ as a $R_f$-module, for some $f \in S$.
This is a homework problem but I spent a few hours and didn't get very far:
Let $x \in M$ and $M = (a_1, a_2, \dots, a_n)$, where the $a_i \in M$. Then, we have that $x = c_1 a_1 + c_2 a_2 + \cdots + c_n a_n$, where the $c_i \in R$. Let $s \in S$. Then $\frac{x}{s}$ can be written as $\frac{x}{s} = \frac{b_1m_1}{s_1} + \frac{b_2m_2}{s_2} + \cdots + \frac{b_rm_r}{s_r}$ where the $b_i \in R$ and $m_i \in M$. . I'm almost certain that combining fractions is the way to go but I have no clue how to proceed from where I am at.