# $R/(IJ)$ is reduced $\Rightarrow IJ = I \cap J$ for ideals $I,J$ of a commutative ring $R$

This is exercise $4.6$ on page $154$ of the textbook Algebra: Chapter $0$ (authored by P. Aluffi):

Let $I,J$ be ideals of a commutative ring $R$. Assume that $R/(IJ)$ is reduced (that is, it has no nonzero nilpotent elements). Prove that $IJ = I \cap J$.

This is how I tried (knowing that $IJ \subseteq I \cap J$ since $ij \in I$ and $ij \in J$, and since $I \cap J$ is an ideal, it is closed under addition):

If $R/(IJ)$ is reduced, then $\forall r \in R: \ r^n \in IJ \Rightarrow r \in IJ$.

Let $a \in I \cap J$. $a^2 = aa \in IJ$, since $a \in I$, but also $a \in J$. Then (since $R/(IJ)$ is reduced) $a \in IJ$.

Is it a right way? If yes, does it mean the commutativity hypothesis is not necessary, and it works for arbitrary rings? If not, where is the mistake?

The proof is correct and the statement doesn't indeed require $R$ is commutative.
You may want to note that a ring has no (nonzero) nilpotent elements if and only if $a^2=0$ implies $a=0$, so the use of just $a^2$ in your proof is not surprising.
Theorem: Let $$R$$ be a reduced ring, and let $$I$$ and $$J$$ be two ideals of $$R$$. If $$IJ=0$$, then $$I\cap J=0$$.
Proof: As your proof, since $$(I\cap J)^2\subseteq IJ=0$$, we have $$(I\cap J)^2=0$$. Thus, $$I\cap J=0$$.