Product ring

In mathematics, it is possible to combine several rings into one large product ring. This is done by giving the Cartesian product of a (possibly infinite) family of rings coordinatewise addition and multiplication. The resulting ring is called a direct product of the original rings.
Examples.
An important example is the ring Z/"n"Z of integers modulo "n". If "n" is written as a product of prime powers (see fundamental theorem of arithmetic),
where the "pi" are distinct primes, then Z/"n"Z is naturally isomorphic to the product ring
This follows from the Chinese remainder theorem.
Properties.
If is a product of rings, then for every "i" in "I" we have a surjective ring homomorphism which projects the product on the "i"th coordinate. The product "R", together with the projections "pi", has the following universal property: 
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 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 , but this is incorrect from the point of view of category theory, since it is usually not a coproduct in the category of rings: for example, when two or more of the "R""i" are nonzero, the inclusion map fails to map 1 to 1 and hence is not a ring homomorphism.
Direct products are commutative and associative (up to isomorphism), meaning that it doesn't matter in which order one forms the direct product.
If "Ai" is an ideal of "Ri" for each "i" in "I", then 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 "Ri" are non-zero, 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 "Ri". The ideal "A" is a prime ideal in "R" if all but one of the "Ai" are equal to "Ri" and the remaining "Ai" is a prime ideal in "Ri". However, the converse is not true when "I" is infinite. For example, the direct sum of the "Ri" 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 is a unit in "Ri" for every "i" in "I". The group of units of "R" is the product of the groups of units of "Ri".
A product of two or more non-zero rings always has nonzero zero divisors: if "x" is an element of the product whose coordinates are all zero except , and "y" is an element of the product with all coordinates zero except where , then in the product ring.