Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 7.1 Exercise 7.1.19
Let $I$ be a nonempty index set and let $R_i$ be a ring for each $i \in I$. Prove that the direct product $\prod_I R_i$ is a ring under componentwise addition and multiplication.
Solution: We already know (by Exercise 5.1.15) that $\prod_I R_i$ is an abelian group under componentwise addition, so it suffices to show that multiplication is associative and distributes over addition on both sides.
Let$ (\prod a_i)$, $(\prod b_i)$, $(\prod c_i) \in \prod_I R_i$. Then \begin{align*}(\prod a_i)((\prod b_i)(\prod c_i)) =&\ (\prod a_i)(\prod (b_ic_i))\\ =&\ \prod a_i(b_ic_i) = \prod (a_ib_i)c_i \\=&\ (\prod b_ic_i)(\prod a_i)\\ =&\ ((\prod a_i)(\prod b_i))(\prod c_i),\end{align*} so that multiplication is associative.
Moreover, \begin{align*}(\prod a_i)((\prod b_i) + (\prod c_i)) =&\ (\prod a_i)(\prod (b_i + c_i)) \\=&\ \prod a_i(b_i + c_i) \\=&\ \prod (a_ib_i + a_ic_i) \\=&\ (\prod a_ib_i) + (\prod a_ic_i) \\=&\ (\prod a_i)(\prod b_i) + (\prod a_i)(\prod c_i).\end{align*} Thus multiplication distributes over addition on the left; distributivity on the right is analogous.
Thus $\prod_I R_i$ is a ring under componentwise addition and multiplication.