2.4. Tuples


Ordered pairs and cartesian products

An ordered pair is a pair of things, written (a, b), where the order matters; the first member of the ordered pair is a and the second one is b. Ordered pairs should be familiar. An ordered pair of real numbers, such as (1.0, 2.1), represents a point in the plane.

Given any two sets A and B,

A×B = {(a, b) | aA and bB}.
For example,
{1,2} × {4,6,7} = {(1,4), (1,6), (1,7), (2,4), (2,6), (2,7)}.

Set A×B is called the cartesian product of A and B.


Triples, quadruples, etc.

It is convenient to extend ordered pairs to ordered triples, such as (a, b, c), ordered quadruples, etc. In general, we will call pairs, triples, quadruples and so on tuples. A pair is a 2-tuple, a triple is a 3-tuple, and so on.

We can still use that × operator to create sets of triples: set A×B×C is the set of all ordered triples (a, b, c) where aA, bB and cC.

By convention, operator × associates to the right, so A×B×C is understood to mean A×(B×C). So an ordered triple is just an ordered pair where the second thing is another ordered pair.