Conditions for a ring to be isomorphic to the product of rings. Let $R,R_1,\dots,R_n$ be rings. Show that $R\cong R_1 \times \cdots\times R_n$ if and only if there exist ideals $I_1,\dots,I_n$ of $R$ such that
(a) $I_i\cong R_i$ for all $i$
(b) $R= I_1 +\cdots+I_n$
(c) $I_i \cap (I_1+\cdots+I_{i-1}+I_{i+1}+\cdots+I_n)=0$ for all $i$.

Any advice would be greatly appreciated ! Thank you.
 A: One direction is easy: if $R\cong R_1\times\dots\times R_n$, finding ideals satisfying (a), (b) and (c) is trivial.
Let's do the converse. Conditions (b) and (c) say that $R=I_1\oplus I_2\oplus\dots\oplus I_n$ as abelian groups. This is a standard argument, so I'll not talk about it here.
In particular, there is an additive isomorphism
$f\colon I_1\times I_2\times\dots\times I_n\to R$ given by
$$
f(x_1,x_2,\dots,x_n)=x_1+x_2+\dots+x_n.
$$
We need to show that $f$ is also a homomorphism with respect to the multiplication defined componentwise on $I_1\times I_2\times\dots\times I_n$.
Now, if $i\ne j$, $r\in I_i$ and $s\in I_j$, we have $rs=0$. Indeed, $rs\in I_i\cap I_j=\{0\}$ because of condition (c). Thus, if $x=(x_1,x_2,\dots,x_n)$ and $y=(y_1,y_2,\dots,y_n)$ are elements of $I_1\times I_2\times\dots\times I_n$, we have
$$
f(xy)=x_1y_1+x_2y_2+\dots+x_ny_n
$$
by definition, while
$$
f(x)f(y)=\biggl(\sum_{i=1}^n x_i\biggr)\biggl(\sum_{i=1}^n y_i\biggr)
=\sum_{i,j=1}^n x_iy_j=\sum_{i=1}^n x_iy_i
$$
as was to be proved.
