Question on the product of ideals Let $R$ be a commutative ring. Let $P,Q$ be two ideals of $R$. Then I know that $PQ$, the product of ideals, is the ideal generated by $pq$ for each $p\in P$ and $q\in Q$. In other words,
\begin{equation}
PQ = \{p_1q_1+p_2q_2+\cdots +p_iq_i:\text{for all $i$}\}.
\end{equation}
But what can we say when $P=Q$? My thought is that since an ideal is closed additively, $P^2=P$, and in fact it must hold for all other powers. Is it true? If not, why does this property fail to hold?
 A: Let me build up on the answer of Samuel Yusim:
Let $P$ be finitely generated.
Then Nakayama (in the most general version, which follows from Cayley-Hamilton. Many books on commutative algebra omit this version, Matsumura however states and proofs it in the very beginning of his famous book on commutative ring theory) implies that $P^2=P$ implies that there is some $x \in P$ with $(1-x)P=0$. In particular we deduce $0=(1-x)x=x-x^2$, hence $x$ is idempotent. Furthermore we have for any $y \in P$: $0=(1-x)y=y-xy$, hence $y = xy \in (x)$. So we deduce that $P=(x)$ is principal and generated by an idempotent. This is a nice classification and immediately shows that noetherian local rings or noetherian integral domains do not admit non-trivial ideals with $P^2=P$.
The non-finitely generated case is much harder to control. There is even a counterexample in a domain. Consider $R=K[X,\sqrt{X},\sqrt[4]{X}, \sqrt[8]{X}, \dotsc]$ and the maximal ideal $P=(X,\sqrt{X},\sqrt[4]{X}, \sqrt[8]{X}, \dotsc)$. $P$ obviously fulfills $P=P^2$, though $R$ - as a domain - does not admit any non-trivial idempotents.
A: $P^2\ne P$ in general. While $(0)^2=(0)$, consider $(X)\subset \mathbb{Z}[x]$, then $(X)^2=(X^2)\ne (X)$, in general $(X)^n=(X^n)$, which consists of all polynomials in one variable where every term has degree at least $n$.
A: Let's use the the definition:
$PP = \{p_1p'_1 + \dots + p_np'_n : p_1, \dots, p_n, p'_1, \dots, p'_n \in P, n \in \mathbb{N}\} \subseteq P$
The intuitive idea is that it'd be hard (though still sometimes possible) for $P^2$ to be $P$ unless $1 \in P$, but in that case $P$ is the whole ring.
So when can we have that $P^2 = P$? Well, this can certainly happen if every generator of $P$ is idempotent, i.e., it's such that $p^2 = p$. Is this the only case, though? I doubt it.
