Proving prime ideal Prove that $P$ is prime if and only if it has this property: Whenever $A$ and $B$ are ideals in $R$ such that $AB \subseteq P$, then $A \subseteq P$ or $B \subseteq P$, where $P$ be an ideal in a commutative ring $R$ with $P \ne R$. 
 A: Suppose $A \subseteq P$, $P$ a prime ideal in $R$, is false.  Then there exists $a \in A$, $a \notin P$.  The hypothesis $AB \subseteq P$ implies that every product $ab \in P$, where $a \in A$ and $b \in B$.  But $ab \in P$ with $a \notin P$ implies $b \in P$, since $P$ is a prime ideal.  Thus $B \subseteq P$.
To go the other way, we need to show that $P$ is prime if $AB \subseteq P$ implies
$A \subseteq P$ or $B\subseteq P$.  Let $a, b \in R$ with $a \notin P$, and suppose $ab \in P$.  Consider the ideals $\langle a \rangle = \{na + ra\}$ and $\langle b \rangle = \{nb + rb\}$, where $n \in \Bbb Z$, the integers, and $r \in R$.  It is easy to see that the product ideal $\langle a \rangle\langle b \rangle = \langle ab \rangle = \{nab + rab\}$; furthermore $\langle ab \rangle \subseteq P$ since $ab \in P$; thus $\langle a \rangle\langle b \rangle \subseteq P$  But $a \notin P$ implies $\neg (\langle a \rangle \subseteq P)$, so our hypothesis forces $\langle b \rangle \subset P$; but $b \in \langle b \rangle$, so $b \in P$ and $P$ is prime.  QED.
Nota Bene:  In the above discussion I have defined the ideal $\langle a \rangle = \{na + rb \}$, $n \in \Bbb Z$ and $r \in R$ as such in the absence of the supposition that $R$ has a unit; if this were the case, we of course can take $\langle a \rangle = \{ra \}$, $r \in R$, the usual principle ideal generated by $a$ and so forth.  In the absence of $1_R \in R$ such that $1_Ra = a1_R$ for all $a \in R$, we as usual take $na$ to be $a$ added to itself $n$ times:  $na = a + a + . . . + a \, (n \text{times})$; $\langle a \rangle$ is of course the smallest ideal containing $a$.
Hope this helps!  Cheers,
and as always,
Fiat Lux!!!
