If a prime ideal has no zero divisors then the ring also has no zero divisors Let $R$ be a commutative ring. Let $P$ be a prime ideal of $R$ such that $P$ has no (non-zero) zero divisors. Prove that $R$ has no (non-zero) zero divisors.


My try:

Let $ab=0$ where $a,b\in R$ .Let us assume that $a\neq 0$ then we prove that $b=0$. Assume that $b \neq 0$.

Now $ab=0\in P$ then either $a\in P $ or $b\in P$ .Now both $a,b$ can't be in $P$ as then $P$ would have zero divisors.

Suppose that $a\notin P$ then $b\in P$.

But how to arrive at a contradiction from here?
Claim: Ring $R$ is an integral domain.

Proof: Suppose $a,b\in R$ with $ab=0$, we must show that $a=0$ or $b=0$. Certainly the images $\overline a,\overline b$ of $a,b$ in $A/P$ satisfy $\overline a\overline b=0$, and since $R/P$ is an integral domain (by the definition of prime ideal) one of $\overline a,\overline b$ is zero, that is $a\in P$ or $b\in P$. Assuming by symmetry the former is the case, then either $b=0$ (in which case we are done), or else $b\neq0$ and the fact that $P$ does not contain zero divisors (of $R$) imply that $a=0$

One more "similar" kind of exercise  from Atiyah Macdonald (If you need  hint to solve this please let me know):


  
    In a ring $A$, let $\Sigma$ be the set of all ideals in which every element is a zero-divisor. Show that set $\Sigma$ has maximal elements and that every maximal element of $\Sigma$ is a prime ideal. Hence the set of zero-divisors in $A$ is a union of prime ideals.
If you mean by zero divisors in $P$ that for both non zero $x \in P$ and $y \in R$ s.t $xy=0$ then, From your try let $b \in P$ then consider $&lt;b&gt; \subseteq P$ then $ab=0$ in $P$ contradiction.

Otherwise if you say that there are no non-zero $x,y \in P$ s.t. $xy=0$ then the statement is false: take $\Bbb Z_{15}$, and $P=&lt;3&gt;$. Then $P$ is a prime ideal which does not contain $x,y\ne0$ such that $xy=0$, but $\Bbb Z_{15}$ has zero divisors.