What Makes a Pair Ordered?
The previous tutorial, “Cartesian Products,” used ordered pairs to define \(A\times B\): the first entry must come from \(A\), and the second from \(B\). That definition relies on being able to tell not only which entries a pair contains, but also which entry occupies each position. We now make that idea precise and prove the equality rule that the product membership test uses.
An unordered set such as \(\{a,b\}\) records its elements without assigning them positions. In particular, \(\{a,b\}=\{b,a\}\), as established in “Sets and Elements.” An ordered pair has a different purpose: \((a,b)\) assigns \(a\) to the first position and \(b\) to the second. The standard set-theoretic convention used here represents the ordered pair by the Kuratowski definition.
Definition (Ordered Pair). For any objects \(a\) and \(b\), the ordered pair with first entry \(a\) and second entry \(b\) is the set $$ (a,b):=\{\{a\},\{a,b\}\}. $$ The expression \(\{a\}\) is a singleton, and \(\{a,b\}\) is the set whose elements are \(a\) and \(b\). The outer braces then form a set containing those inner sets. This nesting is what allows the set representation to preserve the roles of the two entries.
This definition is a way to construct ordered pairs from sets; it does not mean that we should treat the pair as an ordinary unordered collection of its entries. The defining property we need is that the first and second entries can be recovered uniquely. That property is expressed by the coordinatewise equality theorem.
Equality of Ordered Pairs
The definition encodes the first entry through the singleton \(\{a\}\), and includes the second entry in \(\{a,b\}\). The key point is not merely that these sets contain the same entries somewhere. The arrangement ensures that equality of the encoded objects forces each coordinate to agree with the corresponding coordinate.
Theorem (Equality of Ordered Pairs). For any objects \(a,b,c,d\), $$ (a,b)=(c,d) \quad\Longleftrightarrow\quad a=c\text{ and }b=d. $$
Proof. First suppose \(a=c\) and \(b=d\). Then \(\{a\}=\{c\}\) and \(\{a,b\}=\{c,d\}\). Therefore $$ (a,b)=\{\{a\},\{a,b\}\} =\{\{c\},\{c,d\}\} =(c,d). $$
For the reverse direction, suppose \((a,b)=(c,d)\). We divide into cases according to whether \(a=b\).
Suppose first that \(a=b\). Then \((a,b)=\{\{a\}\}\), a set with exactly one element. If \(c\ne d\), then \(\{c\}\ne\{c,d\}\), so \((c,d)=\{\{c\},\{c,d\}\}\) has exactly two elements. This would contradict \((a,b)=(c,d)\). Thus \(c=d\), and \((c,d)=\{\{c\}\}\). Equality of these singleton sets gives \(\{a\}=\{c\}\), hence \(a=c\). Since \(a=b\) and \(c=d\), we have both \(a=c\) and \(b=d\).
Now suppose \(a\ne b\). The two elements \(\{a\}\) and \(\{a,b\}\) of \((a,b)\) are distinct, so \((a,b)\) has exactly two elements. If \(c=d\), then \((c,d)=\{\{c\}\}\) has only one element, contradicting the assumed equality. Hence \(c\ne d\), and \((c,d)\) has the two distinct elements \(\{c\}\) and \(\{c,d\}\).
Because \(\{a\}\) is an element of \((a,b)=(c,d)\), it equals either \(\{c\}\) or \(\{c,d\}\). It cannot equal \(\{c,d\}\): since \(\{a\}\) contains only \(a\), that equality would imply \(c=a\) and \(d=a\), contradicting \(c\ne d\). Therefore \(\{a\}=\{c\}\), so \(a=c\). The other element \(\{a,b\}\) of \((a,b)\) must then equal the other element \(\{c,d\}\) of \((c,d)\). Thus \(\{a,b\}=\{a,d\}\). Since \(b\ne a\), the element \(b\) in the left-hand set must be \(d\); hence \(b=d\). Both directions prove the equivalence. \(\square\)
The proof handles the case of equal entries separately because a set does not list the same element twice. If \(a=b\), the two inner sets \(\{a\}\) and \(\{a,b\}\) coincide. Their repetition collapses, leaving a singleton at the outer level. This is ordinary set equality at work, not a failure of the ordered-pair definition.
Worked Example: A Pair with Repeated Entries
Let \(q\) be any object. By the definition, $$ (q,q)=\{\{q\},\{q,q\}\}. $$ But \(\{q,q\}=\{q\}\), because listing an element twice does not create a second element of a set. Therefore $$ (q,q)=\{\{q\}\}. $$ The inner singleton \(\{q\}\) is the only element of this outer set. The pair still has two coordinate positions, both occupied by \(q\), even though its set representation contains only one distinct inner set.
Using the Coordinatewise Equality Rule
The theorem gives a direct procedure for comparing two ordered pairs: compare the first entries with each other, and compare the second entries with each other. Equality of the pairs requires both comparisons to succeed. It does not require the first entry of one pair to match the second entry of the other.
Worked Example: Comparing Two Pairs
Consider \((2,5)\) and \((2,8)\). Their first coordinates agree, since \(2=2\), but their second coordinates do not, since \(5\ne8\). By the equality theorem, $$ (2,5)\ne(2,8). $$ For a pair that is equal, compare \((2,5)\) with \((2,5)\): both corresponding-coordinate equalities hold, so the pairs are equal. This may seem immediate from the notation, but the theorem explains why equality of the set-based representations has exactly this coordinatewise consequence.
The rule also applies when a coordinate is itself an ordered pair. The parentheses record which objects occupy the outer positions, and the equality theorem can then be applied again to compare an inner pair.
Worked Example: Comparing Nested Pairs
Let \(r,s,t,u,v,w\) be objects. Compare \(((r,s),t)\) with \(((u,v),w)\). Applying the equality theorem to the outer pairs gives $$ ((r,s),t)=((u,v),w) \quad\Longleftrightarrow\quad (r,s)=(u,v)\text{ and }t=w. $$ Applying the theorem to the inner pairs gives $$ ((r,s),t)=((u,v),w) \quad\Longleftrightarrow\quad r=u,\ s=v,\text{ and }t=w. $$ Thus each level of parentheses determines a pair of positions. The same comparison method works for any explicitly nested pair expression.
A related caution is that parentheses are not decorative. The expressions \(((r,s),t)\) and \((r,(s,t))\) assign different objects to their first and second positions: the first has \((r,s)\) as its first coordinate, while the second has \(r\) as its first coordinate. Their equality would require \((r,s)=r\) and \(t=(s,t)\), by the theorem. One should not remove or rearrange parentheses unless the relevant coordinate equalities have actually been established.
Reversing the Entries
Since an unordered two-element set does not record order, switching its entries has no effect. Ordered pairs behave differently. The exact condition under which reversing the two entries leaves the pair unchanged follows from coordinatewise equality.
Proposition (When Reversal Leaves a Pair Unchanged). For any objects \(a\) and \(b\), $$ (a,b)=(b,a)\quad\Longleftrightarrow\quad a=b. $$
Proof. Suppose \((a,b)=(b,a)\). By the equality theorem, the first coordinates agree, so \(a=b\), and the second coordinates agree, so \(b=a\). In particular, \(a=b\). Conversely, suppose \(a=b\). Then the first coordinates of \((a,b)\) and \((b,a)\) agree, and their second coordinates agree as well. The equality theorem gives \((a,b)=(b,a)\). \(\square\)
Worked Example: Reversing Distinct Entries
Let \(m\) and \(n\) be distinct objects. Since \(m\ne n\), the reversal proposition gives $$ (m,n)\ne(n,m). $$ The two pairs have the same entries, but the first pair places \(m\) first and \(n\) second, while the second places \(n\) first and \(m\) second. If instead the two entries were the same object \(m\), then \((m,m)=(m,m)\), so reversal would make no change.
Why the Equality Rule Matters
The equality theorem justifies treating the entries of a pair as distinct, recoverable coordinates. In the previous tutorial, product membership was written as $$ (x,y)\in A\times B \quad\Longleftrightarrow\quad x\in A\text{ and }y\in B. $$ The equality rule ensures that a pair has a uniquely determined first coordinate and a uniquely determined second coordinate. As a result, the conditions in this product test are tied to well-defined positions rather than to an unordered collection of entries.
The same idea is important when pairs are used to describe associations between objects. To record that a particular \(x\) is associated with a particular \(y\), the pair \((x,y)\) keeps the two roles separate. In the next tutorial, relations will be built from sets of ordered pairs. Their meaning depends on knowing which coordinate plays which role.
| Expression | What equality requires | Does switching order preserve it? |
|---|---|---|
| \(\{a,b\}\) | The same elements, without coordinate positions | Yes: \(\{a,b\}=\{b,a\}\) |
| \((a,b)\) | The first entries agree and the second entries agree | Only when \(a=b\) |
| \(((a,b),c)\) | The inner first coordinates agree, the inner second coordinates agree, and the outer second coordinates agree | Positions are determined at each pair level |
A common mistake is to infer equality of pairs from the fact that their entries occur in the same unordered set. For example, knowing that both expressions involve \(a\) and \(b\) does not show that \((a,b)=(b,a)\). Another mistake is to regard \((a,b)\) as simply \(\{a,b\}\); the former preserves coordinate roles, while the latter does not. These distinctions are especially important when entries repeat or when one coordinate is itself a pair.
Check Your Understanding
- Write the set-theoretic definition of \((a,b)\) used in this tutorial.
- State the condition that is necessary and sufficient for \((a,b)=(c,d)\).
- Why does \((q,q)\) have a singleton as its outer set representation?
- For what condition on \(a\) and \(b\) is \((a,b)=(b,a)\)?
- What coordinate equalities are required for \(((r,s),t)=((u,v),w)\)?