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!