# Product of rings

In mathematics, a product of rings or direct product of rings is a ring that is formed by the Cartesian product of the underlying sets of several rings (possibly an infinity), equipped with componentwise operations. It is a direct product in the category of rings.
Since direct products are defined up to an isomorphism, one says colloquially that a ring is the product of some rings if it is isomorphic to the direct product of these rings. For example, the Chinese remainder theorem may be stated as: if m and n are coprime integers, the quotient ring $\mathbb {Z} /mn\mathbb {Z}$ is the product of $\mathbb {Z} /m\mathbb {Z}$ and $\mathbb {Z} /n\mathbb {Z} .$

## Examples

An important example is Z/nZ, the ring of integers modulo n. If n is written as a product of prime powers (see Fundamental theorem of arithmetic),
    $n=p_{1}^{n_{1}}p_{2}^{n_{2}}\cdots \ p_{k}^{n_{k}},$
where the p$_i$ are distinct primes, then Z/nZ is naturally isomorphic to the product
    $\mathbf {Z} /p_{1}^{n_{1}}\mathbf {Z} \ \times \ \mathbf {Z} /p_{2}^{n_{2}}\mathbf {Z} \ \times \ \cdots \ \times \ \mathbf {Z} /p_{k}^{n_{k}}\mathbf {Z} .$
This follows from the Chinese remainder theorem.

## Properties

If R = Π$_{i∈I}$ R$_i$ is a product of rings, then for every i in I we have a surjective ring homomorphism p$_i$ : R → R$_i$ which projects the product on the i th coordinate. The product R together with the projections p$_i$ has the following universal property:
    if S is any ring and f$_i$ : S → R$_i$ is a ring homomorphism for every i in I, then there exists precisely one ring homomorphism f : S → R such that p$_i$ ∘ f = f$_i$ for every i in I.
This shows that the product of rings is an instance of products in the sense of category theory.
When I is finite, the underlying additive group of Π$_{i∈I}$ R$_i$ coincides with the direct sum of the additive groups of the R$_i$. In this case, some authors call R the "direct sum of the rings R$_i$" and write ⊕$_{i∈I}$ R$_i$, but this is incorrect from the point of view of category theory, since it is usually not a coproduct in the category of rings (with identity): for example, when two or more of the R$_i$ are non-trivial, the inclusion map R$_i$ → R fails to map 1 to 1 and hence is not a ring homomorphism.
(A finite coproduct in the category of commutative algebras over a commutative ring is a tensor product of algebras. A coproduct in the category of algebras is a free product of algebras.)
Direct products are commutative and associative up to natural isomorphism, meaning that it doesn't matter in which order one forms the direct product.
If A$_i$ is an ideal of R$_i$ for each i in I, then A = Π$_{i∈I}$ A$_i$ is an ideal of R. If I is finite, then the converse is true, i.e., every ideal of R is of this form. However, if I is infinite and the rings R$_i$ are non-trivial, then the converse is false: the set of elements with all but finitely many nonzero coordinates forms an ideal which is not a direct product of ideals of the R$_i$. The ideal A is a prime ideal in R if all but one of the A$_i$ are equal to R$_i$ and the remaining A$_i$ is a prime ideal in R$_i$. However, the converse is not true when I is infinite. For example, the direct sum of the R$_i$ form an ideal not contained in any such A, but the axiom of choice gives that it is contained in some maximal ideal which is a fortiori prime.
An element x in R is a unit if and only if all of its components are units, i.e., if and only if p$_i$ (x) is a unit in R$_i$ for every i in I. The group of units of R is the product of the groups of units of the R$_i$.
A product of two or more non-trivial rings always has nonzero zero divisors: if x is an element of the product whose coordinates are all zero except p$_i$ (x) and y is an element of the product with all coordinates zero except p$_j$ (y) where i ≠ j, then xy = 0 in the product ring.