I have $R$ a commutative ring with neutral element and $S$ a multiplicative subset. I also have $S^{-1}R=\{\frac{r}{s}, r\in R,s\in S\}$.
I have to prove that if $S$ contains a zero divisor, then $S^{-1}R$ is the zero ring and I also have to say for which Ideals $I$, $S=R\setminus I$ is closed under multiplication.
Regarding the statement I don't know if the following proof is okay: Let $x\in S$ be a zero divisor. This means that there exists $y\ne 0$ such that $xy=0 \in S$ since $S$ is closed under multiplication. And when $0\in S $ we know that $S^{-1}R$ is the zero ring (we had a proof of that in the lecture).
And could also somebody help me with the ideals, which ones make $S=R\setminus I$ closed under multiplication?
Thanks in advance for the help.
These are exactly the prime ideals. You probably defined a prime ideal as an ideal $P$ where $xy\in P$ implies either $x\in P$ or $y\in P$. It is straightforward that the statement "$x,y\in R\setminus P$ implies $xy\in R\setminus P$" is an equivalent definition.