**Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 7.1 Exercise 7.1.17**

Let $R$ and $S$ be rings. Prove that the direct product $R \times S$ is a ring under componentwise addition and multiplication. Prove that $R \times S$ is commutative if and only if $R$ and $S$ are commutative. Prove that $R \times S$ has an identity if and only if $R$ and $S$ have identities.

Solution: We already know that $R \times S$ is an abelian group under componentwise addition. Now if $r_i \in R$ and $s_i \in S$, we have \begin{align*}(r_1,s_1)((r_2,s_2)(r_3,s_3)) =&\ (r_1,s_1)(r_2r_3,s_2s_3) \\=&\ (r_1(r_2r_3),s_1(s_2s_3)) \\=&\ ((r_1r_2)r_3,(s_1s_2)s_3) \\=&\ (r_1r_2,s_1s_2)(r_3,s_3) \\=&\ ((r_1,s_1)(r_2,s_2))(r_3,s_3).\end{align*} So componentwise multiplication is associative. Moreover, \begin{align*}(r_1,s_1)((r_2,s_2) + (r_3,s_3)) =&\ (r_1,s_1)(r_2+r_3,s_2+s_3)\\ =&\ (r_1(r_2+r_3), s_1(s_2+s_3)) \\=&\ (r_1r_2 + r_1r_3, s_1s_2 + s_1s_3) \\=&\ (r_1r_2,s_1s_2) + (r_1r_3,s_1s_3) \\=&\ (r_1,s_1)(r_2,s_2) + (r_1,s_1)(r_3,s_3).\end{align*} Thus componentwise multiplication distributes over componentwise addition on the left; similarly, it distributes on the right. Thus $R$ \times S is a ring.

If $R$ and $S$ are commutative, then $$(r_1,s_1)(r_2,s_2) = (r_1r_2,s_1s_2) = (r_2r_1,s_2s_1) = (r_2,s_2)(r_1,s_1),$$ so that $R \times S$ is commutative. If $R \times S$ is commutative, then $$(r_1r_2,s_1s_2) = (r_1,s_1)(r_2,s_2) = (r_2,s_2)(r_1,s_1) = (r_2r_1,s_2s_1).$$ Comparing entries, we have $r_1r_2 = r_2r_1$ and $s_1s_2 = s_2s_1$, so that $R$ and $S$ are commutative.

If $R$ and $S$ have 1s, then $$(1,1)(r,s) = (1r,1s) = (r,s)$$ and $$(r,s)(1,1) = (r1,s1) = (r,s),$$ so that $(1,1) \in R \times S$ is an identity. Suppose $(u,v) \in R \times S$ is an identity. Then for all $r \in R$ and $s \in S$, we have $$(ur,vs) = (u,v)(r,s) = (r,s) = (r,s)(u,v) = (ru,sv).$$ Then $ur = ru = r$ and $vs = sv = s$; by the uniqueness of identities, both $R$ and $S$ have a 1.