In pure set theory, where there are only sets, ordered pairs (a, b) can be simulated with the set { {a}, {a, b} }. The statement that x is the first element of an ordered pair p can then be formulated as
The set of all ordered pairs whose first element is in some set X and second element in some set Y is called the Cartesian product of said sets. Subsets thereof are mathematical relations.