Mathematics · Ch 2 — Relations and Functions
Ordered Pairs and Cartesian Product of Sets
Ordered Pairs and Cartesian Product of Sets
In earlier work with sets we treated the elements of a set as an unordered collection — and denote exactly the same set. Many situations, however, need us to combine two objects while keeping track of which one came first. A student's roll number paired with their marks, the - and -coordinates of a point in a plane, the day and the month of a date — in every one of these, swapping the two entries changes the meaning entirely. This is the idea an ordered pair captures.
Ordered pair. Given two elements and (not necessarily distinct, and not necessarily from the same set), the ordered pair is the pair taken in a specific order: first, second. Here is called the first component (or first coordinate) and the second component (or second coordinate).
Equality of ordered pairs. Two ordered pairs and are equal if and only if and . In particular, only when ; in general whenever . This equality rule is the working tool used to solve for unknowns hidden inside an ordered pair — as in Example 1, where equating to gives one equation for each component.
Cartesian product of two sets. Let and be two non-empty sets. The Cartesian product of and , written , is the set of all ordered pairs such that and :
If either or is the empty set, is defined to be the empty set.
Number of elements in . If and are finite sets with and , then has exactly ordered pairs, so . This follows because each of the choices for the first component can be paired with each of the choices for the second component. The same counting rule gives as well, so and always have the same number of elements — though, as the next remark shows, the two sets themselves are not usually equal.
versus . Because an ordered pair remembers order, in general (unless , or one of is empty). For example, if and , then while — the same number of pairs, but different pairs.
Cartesian product of more than two sets. The idea extends naturally: is a set of ordered triples, and when the sets are finite. This generalisation is exactly what is needed in the next section to build .