TITLE: Ideal of direct sum of rings
QUESTION [5 upvotes]: If $R$ is a ring and $S_1, S_2$ are subring of $R$ such that $R=S_1\oplus S_2$, 
Is there any relation between ideal of $R$ and Ideal of $S_1,S_2$? In particular I mean under which condition we can conclude that every ideal of $R$ is direct sum of ideals of $S_1,S_2$?

REPLY [4 votes]: Set $e_1=(1,0)$ and $e_2=(0,1)$. Let $I$ be an ideal of $R$; then
$e_1I$ and $e_2I$ are ideals of $S_1$ and $S_2$ respectively and it's trivial to verify that $e_1I\oplus e_2I=I$.
Notice that commutativity of $S_1$ and $S_2$ is not required. Existence of $1$ is of course required, otherwise the result is false: just consider a product of two copies of a zero ring and the diagonal.