# Product (category theory)

In category theory, the product of two (or more) objects in a category is a notion designed to capture the essence behind constructions in other areas of mathematics such as the cartesian product of sets, the direct product of groups, the direct product of rings and the product of topological spaces. Essentially, the product of a family of objects is the "most general" object which admits a morphism to each of the given objects.

## Definition

there exist morphisms $\pi _{1}:X\to X_{1},\pi _{2}:X\to X_{2}$ such that for every object $Y$ and pair of morphisms $f_{1}:Y\to X_{1},f_{2}:Y\to X_{2}$ there exists a unique morphism $f:Y\to X$ such that the following diagram commutes:

Above we defined the binary product. Instead of two objects we can take an arbitrary family of objects indexed by some set $I$ . Then we obtain the definition of a product.

### Equational definition

Alternatively, the product may be defined through equations. So, for example, for the binary product:

### As a limit

The product is a special case of a limit. This may be seen by using a discrete category (a family of objects without any morphisms, other than their identity morphisms) as the diagram required for the definition of the limit. The discrete objects will serve as the index of the components and projections. If we regard this diagram as a functor, it is a functor from the index set $I$ considered as a discrete category. The definition of the product then coincides with the definition of the limit, $\{f\}_{i}$ being a cone and projections being the limit (limiting cone).

## Examples

In the category of sets, the product (in the category theoretic sense) is the cartesian product. Given a family of sets Xi the product is defined as

$\prod _{i\in I}X_{i}:=\{(x_{i})_{i\in I}|x_{i}\in X_{i}\,\forall i\in I\}$ with the canonical projections

$\pi _{j}:\prod _{i\in I}X_{i}\to X_{j}\mathrm {,} \quad \pi _{j}((x_{i})_{i\in I}):=x_{j}$ {{safesubst:#invoke:anchor|main}} Given any set Y with a family of functions

$f_{i}:Y\to X_{i}$ the universal arrow f is defined as

$f:Y\to \prod _{i\in I}X_{i}\mathrm {,} \quad f(y):=(f_{i}(y))_{i\in I}$ Other examples:

## Discussion

The product does not necessarily exist. For example, an empty product (i.e. $I$ is the empty set) is the same as a terminal object, and some categories, such as the category of infinite groups, do not have a terminal object: given any infinite group $G$ there are infinitely many morphisms $\mathbb {Z} \to G$ , so $G$ cannot be terminal.

If $I$ is a set such that all products for families indexed with $I$ exist, then it is possible to choose the products in a compatible fashion so that the product turns into a functor ${\mathcal {C}}^{I}\to {\mathcal {C}}$ . How this functor maps objects is obvious. Mapping of morphisms is subtle, because product of morphisms defined above does not fit. First, consider binary product functor, which is a bifunctor. For $f_{1}:X_{1}\to Y_{1},f_{2}:X_{2}\to Y_{2}$ we should find a morphism $X_{1}\times X_{2}\to Y_{1}\times Y_{2}$ . We choose $\langle f_{1}\circ \pi _{1},f_{2}\circ \pi _{2}\rangle$ . This operation on morphisms is called cartesian product of morphisms. Second, consider product functor. For families $\{X\}_{i},\{Y\}_{i},f_{i}:X_{i}\to Y_{i}$ we should find a morphism $\prod _{i\in I}X_{i}\to \prod _{i\in I}Y_{i}$ . We choose the product of morphisms $\{f_{i}\circ \pi _{i}\}_{i}$ .

A category where every finite set of objects has a product is sometimes called a cartesian category (although some authors use this phrase to mean "a category with all finite limits").

The product is associative. Suppose ${\mathcal {C}}$ is a cartesian category, product functors have been chosen as above, and $1$ denotes the terminal object of ${\mathcal {C}}$ . We then have natural isomorphisms

$X\times (Y\times Z)\simeq (X\times Y)\times Z\simeq X\times Y\times Z$ $X\times 1\simeq 1\times X\simeq X$ $X\times Y\simeq Y\times X$ These properties are formally similar to those of a commutative monoid; a category with its finite products constitutes a symmetric monoidal category.

## Distributivity

In a category with finite products and coproducts, there is a canonical morphism X×Y+X×ZX×(Y+Z), where the plus sign here denotes the coproduct. To see this, note that we have various canonical projections and injections which fill out the diagram

The universal property for X×(Y+Z) then guarantees a unique morphism X×Y+X×ZX×(Y+Z). A distributive category is one in which this morphism is actually an isomorphism. Thus in a distributive category, one has the canonical isomorphism

$X\times (Y+Z)\simeq (X\times Y)+(X\times Z).$ 