# Product (category theory)

Short description: Generalized object in 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 or 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

### Product of two objects

Fix a category $\displaystyle{ C. }$ Let $\displaystyle{ X_1 }$ and $\displaystyle{ X_2 }$ be objects of $\displaystyle{ C. }$ A product of $\displaystyle{ X_1 }$ and $\displaystyle{ X_2 }$ is an object $\displaystyle{ X, }$ typically denoted $\displaystyle{ X_1 \times X_2, }$ equipped with a pair of morphisms $\displaystyle{ \pi_1 : X \to X_1, }$ $\displaystyle{ \pi_2 : X \to X_2 }$ satisfying the following universal property:

Whether a product exists may depend on $\displaystyle{ C }$ or on $\displaystyle{ X_1 }$ and $\displaystyle{ X_2. }$ If it does exist, it is unique up to canonical isomorphism, because of the universal property, so one may speak of the product. This has the following meaning: let $\displaystyle{ X', \pi_1' , \pi_2' }$ be another cartesian product, there exists a unique isomorphism $\displaystyle{ h : X' \to X_1 \times X_2 }$ such that $\displaystyle{ \pi_1' = \pi_1 \circ h }$ and $\displaystyle{ \pi_2' = \pi_2 \circ h }$.

The morphisms $\displaystyle{ \pi_1 }$ and $\displaystyle{ \pi_2 }$ are called the canonical projections or projection morphisms. Given $\displaystyle{ Y }$ and $\displaystyle{ f_1, }$ $\displaystyle{ f_2, }$ the unique morphism $\displaystyle{ f }$ is called the product of morphisms $\displaystyle{ f_1 }$ and $\displaystyle{ f_2 }$ and is denoted $\displaystyle{ \langle f_1, f_2 \rangle. }$

### Product of an arbitrary family

Instead of two objects, we can start with an arbitrary family of objects indexed by a set $\displaystyle{ I. }$

Given a family $\displaystyle{ \left(X_i\right)_{i \in I} }$ of objects, a product of the family is an object $\displaystyle{ X }$ equipped with morphisms $\displaystyle{ \pi_i : X \to X_i, }$ satisfying the following universal property:

The product is denoted $\displaystyle{ \prod_{i \in I} X_i. }$ If $\displaystyle{ I = \{1, \ldots, n\}, }$ then it is denoted $\displaystyle{ X_1 \times \cdots \times X_n }$ and the product of morphisms is denoted $\displaystyle{ \langle f_1, \ldots, f_n \rangle. }$

### Equational definition

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

• Existence of $\displaystyle{ f }$ is guaranteed by existence of the operation $\displaystyle{ \langle \cdot,\cdot \rangle. }$
• Commutativity of the diagrams above is guaranteed by the equality: for all $\displaystyle{ f_1, f_2 }$ and all $\displaystyle{ i \in \{1, 2\}, }$ $\displaystyle{ \pi_i \circ \left\langle f_1, f_2 \right\rangle = f_i }$
• Uniqueness of $\displaystyle{ f }$ is guaranteed by the equality: for all $\displaystyle{ g : Y \to X_1 \times X_2, }$ $\displaystyle{ \left\langle \pi_1 \circ g, \pi_2 \circ g \right\rangle = g. }$

### 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 $\displaystyle{ I }$ considered as a discrete category. The definition of the product then coincides with the definition of the limit, $\displaystyle{ \{f\}_i }$ being a cone and projections being the limit (limiting cone).

### Universal property

Just as the limit is a special case of the universal construction, so is the product. Starting with the definition given for the universal property of limits, take $\displaystyle{ \mathbf{J} }$ as the discrete category with two objects, so that $\displaystyle{ \mathbf{C}^{\mathbf{J}} }$ is simply the product category $\displaystyle{ \mathbf{C} \times \mathbf{C}. }$ The diagonal functor $\displaystyle{ \Delta : \mathbf{C} \to \mathbf{C} \times \mathbf{C} }$ assigns to each object $\displaystyle{ X }$ the ordered pair $\displaystyle{ (X, X) }$ and to each morphism $\displaystyle{ f }$ the pair $\displaystyle{ (f, f). }$ The product $\displaystyle{ X_1 \times X_2 }$ in $\displaystyle{ C }$ is given by a universal morphism from the functor $\displaystyle{ \Delta }$ to the object $\displaystyle{ \left(X_1, X_2\right) }$ in $\displaystyle{ \mathbf{C} \times \mathbf{C}. }$ This universal morphism consists of an object $\displaystyle{ X }$ of $\displaystyle{ C }$ and a morphism $\displaystyle{ (X, X) \to \left(X_1, X_2\right) }$ which contains projections.

## Examples

In the category of sets, the product (in the category theoretic sense) is the Cartesian product. Given a family of sets $\displaystyle{ X_i }$ the product is defined as $\displaystyle{ \prod_{i \in I} X_i := \left\{\left(x_i\right)_{i \in I} : x_i \in X_i \text{ for all } i \in I\right\} }$ with the canonical projections $\displaystyle{ \pi_j : \prod_{i \in I} X_i \to X_j, \quad \pi_j\left(\left(x_i\right)_{i \in I}\right) := x_j. }$ Given any set $\displaystyle{ Y }$ with a family of functions $\displaystyle{ f_i : Y \to X_i, }$ the universal arrow $\displaystyle{ f : Y \to \prod_{i \in I} X_i }$ is defined by $\displaystyle{ f(y) := \left(f_i(y)\right)_{i \in I}. }$

Other examples:

## Discussion

An example in which the product does not exist: In the category of fields, the product $\displaystyle{ \Q \times F_p }$ does not exist, since there is no field with homomorphisms to both $\displaystyle{ \Q }$ and $\displaystyle{ F_p. }$

Another example: An empty product (that is, $\displaystyle{ 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 $\displaystyle{ G }$ there are infinitely many morphisms $\displaystyle{ \Z \to G, }$ so $\displaystyle{ G }$ cannot be terminal.

If $\displaystyle{ I }$ is a set such that all products for families indexed with $\displaystyle{ I }$ exist, then one can treat each product as a functor $\displaystyle{ \mathbf{C}^I \to \mathbf{C}. }$ How this functor maps objects is obvious. Mapping of morphisms is subtle, because the product of morphisms defined above does not fit. First, consider the binary product functor, which is a bifunctor. For $\displaystyle{ f_1 : X_1 \to Y_1, f_2 : X_2 \to Y_2 }$ we should find a morphism $\displaystyle{ X_1 \times X_2 \to Y_1 \times Y_2. }$ We choose $\displaystyle{ \left\langle f_1 \circ \pi_1, f_2 \circ \pi_2 \right\rangle. }$ This operation on morphisms is called Cartesian product of morphisms. Second, consider the general product functor. For families $\displaystyle{ \left\{X\right\}_i, \left\{Y\right\}_i, f_i : X_i \to Y_i }$ we should find a morphism $\displaystyle{ \prod_{i \in I} X_i \to \prod_{i \in I} Y_i. }$ We choose the product of morphisms $\displaystyle{ \left\{f_i \circ \pi_i\right\}_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 $\displaystyle{ C }$ is a Cartesian category, product functors have been chosen as above, and $\displaystyle{ 1 }$ denotes a terminal object of $\displaystyle{ C. }$ We then have natural isomorphisms $\displaystyle{ X \times (Y \times Z) \simeq (X\times Y) \times Z \simeq X \times Y \times Z, }$ $\displaystyle{ X \times 1 \simeq 1 \times X \simeq X, }$ $\displaystyle{ X \times Y \simeq Y \times X. }$ These properties are formally similar to those of a commutative monoid; a Cartesian category with its finite products is an example of a symmetric monoidal category.

## Distributivity

Main page: Distributive category

For any objects $\displaystyle{ X, Y, \text{ and } Z }$ of a category with finite products and coproducts, there is a canonical morphism $\displaystyle{ X \times Y + X \times Z \to X \times (Y + Z), }$ where the plus sign here denotes the coproduct. To see this, note that the universal property of the coproduct $\displaystyle{ X \times Y + X \times Z }$ guarantees the existence of unique arrows filling out the following diagram (the induced arrows are dashed):

The universal property of the product $\displaystyle{ X \times (Y + Z) }$ then guarantees a unique morphism $\displaystyle{ X \times Y + X \times Z \to X \times (Y + Z) }$ induced by the dashed arrows in the above diagram. A distributive category is one in which this morphism is actually an isomorphism. Thus in a distributive category, there is the canonical isomorphism $\displaystyle{ X\times (Y + Z)\simeq (X\times Y) + (X \times Z). }$