Is the complement of a prime ideal closed under both addition and multiplication?

Let $P$ be a prime ideal in a commutative ring $R$ and let $S=R-P$ ,i.e. $S$ is the complement of $P$ in $R$. Then, justify with reason which of the following(s) are correct:

  1. $S$ is closed under addition.

  2. $S$ is closed under multiplication.

  3. $S$ is closed under both addition and multiplication.

The following argument provides a partial answer:

Let $P=3 \mathbb Z$ and $R= \mathbb Z$ the $2,4$ in $S$ but $2+4$ in $P$, so option 1. and 3. are incorrect.

But I don't know about 2.


  1. In $\mathbb{Z}$, $\{0\}$ is a prime ideal but $1+(-1)=0$.
  2. If $a,b\in S$ and $ab\in P$ then, since $P$ is prime, either $a\in P$ or $b\in P$. Contradiction. So, $ab\in S$.
  3. ...

Hint:

(2) Take $a, b \in S.$ We want to show that $ab \in S.$ If not, then try to see what will happen. Use the fact that $R - S$ is a prime ideal.

(1) Consider the ring $\mathbb{Z}.$ Choose any prime ideal and try to see if you can find any counter example.

(3) Follows from (1) and (2).