# Commutative Ring with only one proper ideal

I have one doubt about the following problem, maybe some of you can give me a hint to finish it.

Let $R$ be a commutative ring with identity and suppose the only ideals of $R$ are $(0),I,R$. Prove:

(a) If $x \notin I$ then $x$ is a unit.

(b) If $x,y \in I$ then $xy=0.$

Proof: (a) Suppose $x \notin I$ then $x+I \neq I$ and since $I$ is maximal we have $R/I$ a field, then there exist $y \in R-I$ such that $xy+I=1+I$, then $xy-1+I=I$ and then $xy-1 \in I$ and it implies $xy-1+1=xy$ is a unit, since $I$ is the only maximal (Here I am using the fact that $x$ is in the intersection of all maximal ideals of $R$ if and only if $1-xy$ is a unit for all $y\in R$). From $xy$ a unit we have the existence of $v$ such that $xyv=1$ then $x(yv)=1$ then $x$ is a unit.

(b) Suppose $x,y \in I$, then the ideals $(x),(y),(xy) \subset I$ but since the only ideals are $(0),I$ and $R$ we just have a few options for these ideals. If $(x),(y)$ or $(xy)$ are the trivial ideal $(0)$ then we are done. Suppose, then that $(x)=(y)=(xy)$, then we know that $x=uy$ for some unit $u$ of $R$, then we have $(x)=(x^2)$... I would like to conclude a contradiction from this, can I do this?

I am gonna be thankfull for any hint for this problem.

Thank you so much people!

• In (a): I think you mean $xy + I = 1 + I$. How are you getting from $xy - 1\in I$ to $xy - 1 = 0$? – Stahl Dec 3 '16 at 23:16
• I am sorry, it was a mistake. I am gonna edit the correct. It is wrong. – bttmbrcelo Dec 3 '16 at 23:17
• Thank you, now I think the answer is complete, for (a). haha – bttmbrcelo Dec 3 '16 at 23:22

As to (a), just note that $(x)$ is an ideal containing $x \notin I$, therefore $(x) = R$, and thus there is $y \in R$ such that $x y = 1$.
As to (b), if $x y \ne 0$ then $(x y) = I$. But since $I \supseteq (x) \supseteq (x y)$, also $(x) = (x y) = I$, and thus there is $z \in R$ such that $x y z = x$, and $x (1 - y z) = 0$. But $1 - y z \notin I$ as $1 \notin I$ and $y z \in I$, so that $1 - y z$ is invertible, and $x = 0$, a contradiction.