Let denote localization of $M$ at $S$ as the $S^{-1}R$-module $S^{-1}M$
Question is as follows:
Let $R$ be an integral domain and $M$ is an $R$-module. Show that $M=0$ iff $S^{-1}M=0$ for all $S=R-p$ where $p$ is a prime ideal.
I think it is obvious question. I try to prve. But I am not sure that I understand what the question ask. For example I don't use $p$ is prime ideal
My proof is as follows. Is it true?
=>
$m/s \in S^{-1}M$ but $m=0$ then $m/s=0$ that is $S^{-1}M=0$
<= Let $S^{-1}M=0$ choose an element m/s and say $m\neq0$ because S is in R then $s\in R$ multiply m/s by s then $m=0$ Note that $0\notin S$
The first part is correct, the second is not. Do you know when $x/1 = 0$ in $S^{-1}M$?
Hint: Try to choose a non-zero element $x$ of $M$ and observe that the annihilator $\text{Ann}(x)$ of $x$ is contained in some maximal ideal $\mathfrak{m}$. Then let $S = R - \mathfrak{m}$. What can you tell about $x/1$ in $S^{-1}M$?
First let us recall that an $R$-module is just an abelian group $M$ equipped with a scalar product by elements of $R$ which acts linearly on $M$; a bit like a vector space where the base field is not a ring. For example, you can see that the $\Bbb{Z}$-modules are precisely the abelian groups.
Now, consider an $R$-module $M$ and a multiplicatively closed subset $S$ of $R$. Then by definition of localisation we know that $x/s = y/r$ in $S^{-1}M$ if and only if there is some $t \in S$ such that $$ (rx - sy)t = 0 $$ in $M$. In particular, this means that $x/s = 0$ in $S^{-1}M$ if and only if there is an $r \in S$ such that $rx = 0$.
For what we said above this is perfectly fine even if $R$ is a domain, because $M$ doesn't need to be a subset of $R$. For example, every quotient ring of $R$ has a natural structure of $R$-module.
The annihilator of an element $x \in M$ is defined as $$ \text{Ann}(x) := \{r \in R : rx = 0\} $$ and you can check that this is an ideal of $R$. As such, it must be contained in some non-trivial maximal ideal $\mathfrak{m}$.
So, suppose that for every prime ideal $\mathfrak{p}$ of $R$ we have $M_{\mathfrak{p}} := S^{-1}M = 0$ with $S = R - \mathfrak{p}$. If $M \neq 0$ then we can find a non-zero $x \in M$. Since every maximal ideal is also prime we have $M_{\mathfrak{m}} = 0$ where $\mathfrak{m}$ is the maximal ideal containing $\text{Ann}(x)$. In particular, for every $s \in R - \mathfrak{m} \neq \varnothing$ we have $x/s = 0$, which by what we said above means that $rx = 0$ for some $r \in S$. But this is absurd, because $\text{Ann}(x) \cap S = \varnothing$, hence $x$ must be $0$. Since $x$ was arbitrary it follows that $M = 0$.
On the other hand, $M = 0$ immediately implies $S^{-1}M = 0$ for every multiplicatively closed subset $S$ of $R$.
Note that this proof shows that the hypothesis that $R$ is a domain actually isn't necessary. All you need is that $R$ is a commutative ring with unity.