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:


*

*$S$ is closed under addition.

*$S$ is closed under multiplication.

*$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. 
 A: *

*In $\mathbb{Z}$, $\{0\}$ is a prime ideal but $1+(-1)=0$.

*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$.

*...

A: 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).
A: The question is already answered in other answers, and in the question-post itself, but let me make some complementary remarks. 


*

*The complement of an ideal (other than the ring itself) is never closed under addition, as the ideal always contains $0$ yet never $1$ and $-1$.

*The complement of an ideal (other than the ring itself) is multiplicatively closed if and only if the ideal is a prime ideal; this is basically a restatement of the condition that the ideal is prime.
A: it's closed under multiplication, but not under addition:
let $a,b\in S$. if $ab\notin S$, then $ab\in P$, and since $P$ is prime, $a$ or $b$ are in $P$, and since not in $S$.
a simple counterexample for addition is $\mathbb{Z}$ and $P=\{0\}$.
