# Ideal of direct sum of rings.

It is known that if $R_1$ and $R_2$ are rings with unity, then every ideal of $R_1 \oplus R_2$ has the form $I_1 \oplus I_2$, where $I_1$ and $I_2$are ideals of $R_1$ and $R_2$ respectively. However, my book (Saracino) asks the reader to find a counterexample of this, given that $R_1$ and $R_2$ are rings without unity (at least one of them). I have tried easy examples such as $$m \mathbb Z \ \oplus \ n\mathbb Z$$ But I fail to find ideals of the sum which are not the sum of ideals. I'm guessing these kind of rings are not going to give me what I'm looking for. Maybe with matrix ideals, but finding them is hard for me. Thanks!

There are examples in the rings you're looking at. For instance, consider the ideal generated by $(4,4)$ in $2\mathbb{Z}\oplus2\mathbb{Z}$. This consists of all $(x,y)$ such that $x$ and $y$ are both divisible by $4$ and $x-y$ is divisible by $8$. In particular, it contains $(4,4)$ but not $(4,0)$, so it cannot have the form $I_1\oplus I_2$.
For an example that is a bit simpler to check, let $A$ be any nontrivial abelian group and make it a ring by defining $ab=0$ for all $a,b\in A$. Then $\{(a,a):a\in A\}$ is an ideal in $A\oplus A$ that does not have the form $I_1\oplus I_2$.