# nLab cartesian product

Contents

### Context

#### Limits and colimits

limits and colimits

## (∞,1)-Categorical

### Model-categorical

#### Monoidal categories

monoidal categories

# Contents

## Idea

In the strict sense of the word, a cartesian product is a product in Set, the category of sets. Hence for $S_1$ and $S_2$ two sets, their cartesian product is the set denoted $S_1\times S_2$ whose elements are ordered pairs of elements in $S_1$ and $S_2$, respectively.

The abstract concept of such products generalizes from Set to any other category (as a special case of a category-theoretic limit), only that in general products of any given objects may or may not actually exist in that category.

(If they all exist, then one speaks of a cartesian monoidal category. Especially if the category is also a monoidal category with respect to some other tensor product, then one says “Cartesian product” to distinguish the two. For instance one speaks of the cartesian product on Cat and on 2Cat in contrast to the Gray tensor product.)

A product created by the forgetful functor of a concrete category, especially in algebra, is often called a direct product (for instance a direct product of groups).

## Definition

### In Sets

Given any family $(A_i)_{i:I}$ of sets, the cartesian product $\prod_i A_i$ of the family is the set of all functions $f$ from the index set $I$ with $f_j$ in $A_j$ for each $j$ in $I$.

As stated, the target of such a function depends on the argument, which is natural in dependent type theory; but if you don’t like this, then define $\prod_i A_i$ to be the set of those functions $f$ from $I$ to the disjoint union $\biguplus_i A_i$ such that $f_j \in A_j$ (treating $A_j$ as a subset of $\biguplus_i A_i$ as usual) for each $j$ in $I$.

In traditional forms of set theory, one can also take the target of $f$ to be the union $\bigcup_i A_i$ or even the class of all objects (equivalently, leave it unspecified).

### In a general category

Given any category $\mathcal{C}$, and any set $\{X_i\}_{i \in I}$ of its objects, then the product of all these objects is, if it exists, an object denoted

$\underset{i \in I}{\prod} X_i \in \mathcal{C}$

and equipped with morphisms

$p_i \;\colon\; \left(\underset{i \in I}{\prod} X_i\right) \longrightarrow X_i$

(the projections), for each $i \in I$, such that it is universal with this property, i.e. such that given any other object $Q \in \mathcal{C}$ with morphisms

$Q \overset{f_i}{\longrightarrow} X_i$

for $i \in I$, then there is a unique morphism

$(f_i)_{i \in I} \;\colon\; Q \longrightarrow \underset{i \in I}{\prod} X_i$

which factors the $f_i$ through the $p_i$, i.e. such that all these diagrams commute:

$\array{ Q \\ {}^{\mathllap{(f_i)_{i \in I}}}\downarrow & \searrow^{\mathrlap{f_i}} \\ \underset{i \in I}{\prod} X_i &\underset{p_i}{\longrightarrow}& X_i }$

for all $i \in I$.

The case of a binary products it is also denoted by “$(-)\times(-)$”:

$\array{ && Q \\ & \swarrow &\downarrow^{\mathrlap{\exists !}}& \searrow \\ X_1 &\overset{p_1}{\longleftarrow}& X_1 \times X_2 &\overset{p_2}{\longrightarrow}& X_2 } \,.$

An important special case is a power of an object $X$, where (referring to notation above) we take all $X_i$ to be $X$ and form

$X^I = \prod_{i \in I} X$

Referring to notation above, if we take $Q = X$ and all $f_i: Q \to X_i$ to be the identity morphism $1_X: X \to X$, then the map

$(f_i)_{i \in I} = (1_X)_{i \in I}: X \to X^I$

is called the diagonal morphism, typically denoted by $\delta_X$ or $\Delta_X$. For example, we have a diagonal map

$\delta_X: X \to X \times X$

for binary products.

### As a functor

If a category $C$ admits $I$-fold products (products over an indexing set $I$), then a product functor

$\prod_I = \prod_{i \in I}: C^I \to C$

can be defined, taking a collection of objects $(c_i)_{i \in I}$ to their product, and taking a collection of morphisms $(f_i: c_i \to d_i)_{i \in I}$ to a morphism

$\prod_{i \in I} f_i: \prod_{i \in I} c_i \to \prod_{i \in I} d_i$

defined to be $(f_i \circ p_i: \prod_{i \in I} c_i \to d_i)_{i \in I}$, using the notation above. (N.B.: the category of (small) categories has itself small products, and the notation $C^I$ makes reference to this fact. With some care, we can remove the restriction to small categories.)

As a functor, $\prod_I: C^I \to C$ is right adjoint to the diagonal functor $\Delta: C \to C^I$. The unit of the adjunction $1_C \to \prod \Delta$, at the component $c \in Ob(C)$, is the diagonal morphism

$\delta_c: c \to c^I$

and the counit $\Delta \prod \to 1_{C^I}$ is the $I$-tuple of projection maps:

$p_i: \prod_{i \in I} c_i \to c_i$

Following the yoga of adjunctions, we can write the “tupling” $(f_i)_{i \in I}: Q \to \prod_{i \in X_i}$ in terms of the product functor and the unit/diagonal map:

$(f_i)_{i \in I} = \left(Q \stackrel{\delta_Q}{\to} \prod_{i \in I} Q \stackrel{\prod_{i \in I} f_i}{\to} \prod_{i \in I} X_i\right)$

while in the other direction, as stated in the universal property above, we can retrieve the components $f_i: Q \to X_i$ of a general map $f: Q \to \prod_{i \in I} X_i$ in terms of the diagonal functor and the counit/projection maps. It boils down to saying

$f_i = \left(Q \stackrel{f}{\to} \prod_{i \in I} X_i \stackrel{p_i}{\to} X_i\right)$

## Examples

### Products of sets

Given sets $A$ and $B$, the cartesian product of the binary family $(A,B)$ is written $A \times B$; its elements $(a,b)$ are called ordered pairs. (In set theory, one often makes a special definition for this case, defining

$(a,b) = \{\{a\},\{a,b\}\}$

rather than as a function so that ordered pairs can then be used in the definition of function. From a structural perspective, however, this is unnecessary.)

Given sets $A_1$ through $A_n$, the cartesian product of the $n$-ary family $(A_1,\ldots,A_n)$ is written $\prod_{i=1}^n A_i$; its elements $(a_1,\ldots,a_n)$ are called ordered $n$-tuples.

Given sets $A_1$, $A_2$, etc, the cartesian product of the countably infinitary family $(A_1,A_2,\ldots)$ is written $\prod_{i=1}^\infty A_i$; its elements $(a_1,a_2,\ldots,)$ are called infinite sequences.

Given a set $A$, the cartesian product of the unary family $(A)$ may be identified with $A$ itself; that is, we identify the ordered singleton $(a)$ with $a$.

The cartesian product of the empty family $()$ is the point, a set whose only element is the empty list $()$; we often call this set $1$ (or $\pt$, when we're Urs) and write its element as $*$.

### Further examples

For algebraic categories like Grp, where the objects are sets equipped with (globally defined) specified operations that satisfy specified universally quantified identities, products are always constructed in the way you’d expect, viz. by taking products at the level of the underlying sets and endowing them with operations defined in the evident pointwise fashion, just like the way it works in $Grp$. More commentary on this in more general contexts will be given below.

• For a non-example: the category of fields does not admit products, even though some might consider that an algebraic example (in some loose or informal sense).

• In categories of topological type, products are again constructed in a common sense manner; see for instance product topological space for a prototype.

For topological categories, which include examples like Top and Preord, products (e.g. product topological spaces) are always constructed in the way one expects, by taking products at the level of the underlying sets and endowing them with an initial lift structure; e.g., in the case of $Top$, the smallest or initial topology for which the projection maps are continuous.

This principle continues to hold even for infinitary products, where the correct structure might not be obvious without guidance from categorical considerations. For example, for topological spaces, for an infinite product $\prod_{i \in I} X_i$, we use the product topology, and not say the box topology which might be the first thing one would try.

• In any presheaf category, i.e., a category of type $Set^C$ where $C$ is a small category, products are calculated in obvious pointwise fashion, where $(F \times G)(c) = F(c) \times G(c)$ with the pointwise product projection maps. This even works if $C$ is large (making $Set^C$ ‘very large’).

• If $D$ has products and $C \hookrightarrow D$ is a reflective subcategory, products in $C$ exist and are calculated as they are in $D$. For example, this applies to any Grothendieck topos, as a category of sheaves on a site forming a reflective subcategory of a category of presheaves (on the underlying category of the site).

• For instance, the category Pos of posets is a reflective subcategory of Preord.
• Any locally presentable category can be exhibited as a reflective subcategory of a presheaf topos; as such we know how to calculate products there.
• Generalizing the last example still further, if $U: A \to X$ is a monadic functor, then products and more generally limits in $A$ are created (or reflected) from products/limits in $X$. In other words, products of algebras over a monad $T: X \to X$ are given by products in $X$, equipped with the evident “pointwise” $T$-algebra structure.

• If $D$ has products and $i: C \hookrightarrow D$ is a coreflective subcategory, where $i$ has a right adjoint (co-reflector) $r$, then products in $C$ can be formed by taking products in $D$ and then applying $r$.

• For example, the category $CG$ of compactly generated spaces is coreflective in Top. The product in $CG$ does not coincide in general with the topological product: one may have to add to the product topology still more sets, just enough to ensure that the topology is compactly generated.
• Products in $C^{op}$ are given by coproducts in $C$.

• In some cases, this formal tautology gives the only sensible way to construct products. For example, to form products $X \times Y$ in the category Loc of locales, one must take the formal dual of the coproduct (denoted $\mathcal{O}(X) \otimes \mathcal{O}(Y)$) in the category of frames.

• Similarly, the product of two affine schemes is the formal dual of the coproduct of their corresponding coordinate rings, again given by a tensor product.

• Relative to a symmetric monoidal category $C$ with monoidal product $\otimes$, products in the category of cocommutative comonoids are given by the tensor product $X \otimes Y$ in the underlying smc category.

• For instance, this is how products of cocommutative coalgebras are formed. This applies for instance to cocommutative Hopf algebras.
• In a cartesian bicategory such as $Rel$, the accompanying category of objects and maps (= left adjoint 1-cells) coincides with the category of cocommutative comonoids and comonoid maps between them (which is $Set$ in the case of $Rel$). Thus, at the level of objects, the usual tensor product in $Rel$ coincides with the cartesian product in $Set$.
• For categories $C$ enriched in the category of commutative monoids, finite products are biproducts and hence coincide with coproducts in a controlled fashion (via matrices). However, this is usually not the case for infinite products. For such examples, finite products are absolute limits.

• In the category SupLat of sup-lattices, arbitrary products coincide with coproducts (and in fact the functor $X \mapsto X^{op}$ that takes a sup-lattice to its posetal opposite is part of a perfect duality $SupLat^{op} \to SupLat$, taking a sup-lattice map $f: X \to Y$ to $g^{op}: Y^{op} \to X^{op}$ where $f \dashv g$). This example descends to $Rel$ itself, so we conclude that products in $Rel$ are actually given by coproducts in $Rel$ which in turn are given by coproducts in $Set$.

• product of simplices

• In the Cat the cartesian product is the product of categories.

• If either projection out of a Cartesian product is regarded as a (fiber) bundle map, it is called a trivial fiber bundle.

## Properties

### Relation to type theory

Under the relation between category theory and type theory products in a category correspond to product types in type theory.

type theorycategory theory
syntaxsemantics
natural deductionuniversal construction
product typeproduct
type formation$\frac{\vdash \;A \colon Type \;\;\;\;\; \vdash \;B \colon Type}{\vdash A \times B \colon Type}$$A,B \in \mathcal{C} \Rightarrow A \times B \in \mathcal{C}$
term introduction$\frac{\vdash\; a \colon A\;\;\;\;\; \vdash\; b \colon B}{ \vdash \; (a,b) \colon A \times B}$$\array{ && Q\\ & {}^{\mathllap{a}}\swarrow &\downarrow_{\mathrlap{(a,b)}}& \searrow^{\mathrlap{b}}\\ A &&A \times B&& B }$
term elimination$\frac{\vdash\; t \colon A \times B}{\vdash\; p_1(t) \colon A} \;\;\;\;\;\frac{\vdash\; t \colon A \times B}{\vdash\; p_2(t) \colon B}$$\array{ && Q\\ &&\downarrow^{t} && \\ A &\stackrel{p_1}{\leftarrow}& A \times B &\stackrel{p_2}{\to}& B}$
computation rule$p_1(a,b) = a\;\;\; p_2(a,b) = b$$\array{ && Q \\ & {}^{\mathllap{a}}\swarrow &\downarrow_{(a,b)}& \searrow^{\mathrlap{b}} \\ A &\stackrel{p_1}{\leftarrow}& A \times B& \stackrel{p_2}{\to} & B}$

### Foundational status

In material set theory, the existence of binary cartesian products follows from the axiom of pairing and the axiom of weak replacement? (which is very weak). In structural set theory, their existence generally must be stated as an axiom: the axiom of products. See ordered pair for more details.

Last revised on April 8, 2019 at 12:34:29. See the history of this page for a list of all contributions to it.