The cartesian product of n sets X1, …, Xn is the set
There is a canonical bijection
given by deleting the inside brackets. The diagonal function
is given by δ(x) = (x, …, x).
The cartesian product of no sets is the special set 1, with precisely one element, which should technically be denoted by empty parentheses (). Particular cases of the canonical bijections are
The diagonal X → 1 will be denoted by ε rather than ∈; it is the only function X → 1. Functions ƒ1 : X1 → Y1, …, ƒn : Xn → Yn induce a function
given by (ƒ1 × … × ƒn) (x1, …, xn) =(ƒ1(x1), …, ƒn(xn)).
The identity function 1X : X → X on a set X is given by 1X(x) = x.
We noted that ε : X → 1 is uniquely determined. Similarly the diagonal δ : X → X × X is unique, determined by commutativity of the diagram
Furthermore, the following diagram commutes
The function X → X × X × X so determined is none other than the ternary diagonal.
A monoid is a set M together with special purpose functions η : 1 → M, μ : M × M → M such that the following diagrams commute.
If we write 1 for the value of η at the only element of 1 and we write x y for μ(x, y) then the above diagrams translate to the equations
This time functions η and μ are not uniquely determined by the set M.