Can the square of a proper ideal be equal to the ideal?

Another uninteresting, trivial case to rule out is $\mathfrak{i}=(0)$, of course.

Here is a more interesting example: let $R=\mathbb{Z}[\sqrt{2},\sqrt[3]{2},\sqrt[4]{2},\ldots]$ and $\mathfrak{i}=(2,\sqrt{2},\sqrt[3]{2},\ldots)$. Then any element of $\mathfrak{i}$ is a finite $\mathbb{Z}$-linear combination of roots of $2$, which is of course also a finite $\mathbb{Z}$-linear combination of products of (higher) roots of $2$, e.g. $$5\cdot\sqrt{2}-\sqrt[3]{2}=5\cdot(\sqrt[4]{2}\cdot\sqrt[4]{2})-(\sqrt[6]{2}\cdot\sqrt[6]{2}),$$ so $\mathfrak{i}\subseteq\mathfrak{i}^2$, and hence $\mathfrak{i}=\mathfrak{i}^2$. No element of $\mathfrak{i}$ is a unit so we know that $\mathfrak{i}\neq R$.


1) A rich source of examples for ideals $I\subset R$ satisfying $I^2=I$ is to take for $R$ an arbitrary product $$R=\prod_{t\in T} R_t$$ of arbitrary rings $R_t$, to choose an arbitrary subset $S\subset T$ and to take for $I$ the ideal $$I=\prod_{t\in T} I_i$$ where $I_t=0$ if $t\in S$ and $I_i=R_i$ if $t\in T\setminus S$.

2) For finitely generated ideals $I\subset R$ (an empty restriction for noetherian rings) we have a complete classification of these ideals :

Theorem
If a finitely generated ideal $I\subset R$ satisfies $I=I^2$, then $I$ is principal, generated by an idempotent : $$I=Re,\quad e=e^2\in R$$
Proof
Since $I=I\cdot I$, Nakayama tells us that there exists $e\in I$ such that for all $i\in I$ we have $i=ei$.
This immmediately implies (by putting $i=e$) and that $e^2=e$ and $I=Re$.


If $\mathfrak{i}$ is generated by an idempotent then $\mathfrak{i}^2=\mathfrak{i}$.