In mathematics, an ordered pair (a, b) is a pair of objects. The order in which the objects appear in the pair is significant: the ordered pair (a, b) is different from the ordered pair (b, a) unless a = b. (In contrast, the unordered pair {a, b} equals the unordered pair {b, a}.)
Ordered pairs are also called 2-tuples, or sequences (sometimes, lists in a computer science context) of length 2. Ordered pairs of scalars are sometimes called 2-dimensional vectors. (Technically, this is an abuse of terminology since an ordered pair need not be an element of a vector space.)
The entries of an ordered pair can be other ordered pairs, enabling the recursive definition of ordered n-tuples (ordered lists of n objects). For example, the ordered triple (a,b,c) can be defined as (a, (b,c)), i.e., as one pair nested in another.
In the ordered pair (a, b), the object a is called the first entry, and the object b the second entry of the pair. Alternatively, the objects are called the first and second components, the first and second coordinates, or the left and right projections of the ordered pair.
Cartesian products and binary relations (and hence functions) are defined in terms of ordered pairs, cf. picture.
Let and be ordered pairs. Then the characteristic (or defining) property of the ordered pair is:
The set of all ordered pairs whose first entry is in some set A and whose second entry is in some set B is called the Cartesian product of A and B, and written A × B. A binary relation between sets A and B is a subset of A × B.
The (a, b) notation may be used for other purposes, most notably as denoting open intervals on the real number line. In such situations, the context will usually make it clear which meaning is intended. For additional clarification, the ordered pair may be denoted by the variant notation , but this notation also has other uses.
The left and right projection of a pair p is usually denoted by pi1(p) and pi2(p), or by pil(p) and pir(p), respectively.