nLab
cartesian product

The cartesian product is a product in Set, the category of sets.

Definition

Given any family (A i) i:I of sets, the cartesian product iA 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 iA i to be the set of those functions f from I to the disjoint union iA i such that f jA j (treating A j as a subset of iA 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 iA i or even the class of all objects (equivalently, leave it unspecified).

Special cases

Given sets A and B, the cartesian product of the binary family (A,B) is written A×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}}(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,,A n) is written i=1 nA i; its elements (a 1,,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,) is written i=1 A i; its elements (a 1,a 2,,) 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 tuple (); we often call this set 1 (or pt, when we're Urs) and write its element as *.