# Is a prime principal ideal which is not maximal among principal ideals always idempotent?

Let $R$ be a commutative ring with identity, $P$ a prime principal ideal of $R$. Suppose that there exists a proper principal ideal $I$ of $R$ which is strictly larger than $P$ (i.e. $R\supsetneq I\supsetneq P$), then can we conclude $P^2=P$?

I find this property always holds when $R$ is an integral domain or a principal ideal ring, so I'm curious about if it's satisfied for more general rings.

• OK I edited your question to say so. – Marc van Leeuwen Apr 1 '15 at 8:08
• @MarcvanLeeuwen Sorry I didn't realize that I had missed a word... – Censi LI Apr 1 '15 at 8:10
• When $R$ is an integral domain, your hypothesis implies $P = 0$. – Jake Levinson Apr 1 '15 at 16:29

Let $R = \frac{k[x,y,z]}{(1-xy)z}.$ Let $P = (z)$ and $I = (x)$.
Note that $P$ is prime because modding out by $z$ gives $k[x,y]$, but that $P^2 \ne P$. And $z \in (x)$ because $z = xyz$.