Skip to content

Mathematics · Ch 2 — Relations and Functions

Ordered Pairs and Cartesian Product of Sets

2.1

Ordered Pairs and Cartesian Product of Sets

In earlier work with sets we treated the elements of a set as an unordered collection — {a,b}\{a, b\} and {b,a}\{b, a\} 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 xx- and yy-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 aa and bb (not necessarily distinct, and not necessarily from the same set), the ordered pair (a,b)(a, b) is the pair taken in a specific order: aa first, bb second. Here aa is called the first component (or first coordinate) and bb the second component (or second coordinate).

Equality of ordered pairs. Two ordered pairs (a,b)(a, b) and (c,d)(c, d) are equal if and only if a=ca = c and b=db = d. In particular, (a,b)=(b,a)(a,b) = (b,a) only when a=ba = b; in general (a,b)≠(b,a)(a, b) \ne (b, a) whenever a≠ba \ne b. This equality rule is the working tool used to solve for unknowns hidden inside an ordered pair — as in Example 1, where equating (x+1, y−2)(x+1,\ y-2) to (3, 1)(3,\ 1) gives one equation for each component.

Cartesian product of two sets. Let AA and BB be two non-empty sets. The Cartesian product of AA and BB, written A×BA \times B, is the set of all ordered pairs (a,b)(a, b) such that a∈Aa \in A and b∈Bb \in B:

A×B={(a,b):a∈A, b∈B}.A \times B = \{(a, b) : a \in A,\ b \in B\}.

If either AA or BB is the empty set, A×BA \times B is defined to be the empty set.

Number of elements in A×BA \times B. If AA and BB are finite sets with n(A)=pn(A) = p and n(B)=qn(B) = q, then A×BA \times B has exactly pqpq ordered pairs, so n(A×B)=n(A)×n(B)n(A \times B) = n(A) \times n(B). This follows because each of the pp choices for the first component can be paired with each of the qq choices for the second component. The same counting rule gives n(B×A)=n(B)×n(A)=pqn(B \times A) = n(B) \times n(A) = pq as well, so A×BA \times B and B×AB \times A always have the same number of elements — though, as the next remark shows, the two sets themselves are not usually equal.

A×BA \times B versus B×AB \times A. Because an ordered pair remembers order, A×B≠B×AA \times B \ne B \times A in general (unless A=BA = B, or one of A,BA, B is empty). For example, if A={1,2}A = \{1, 2\} and B={3}B = \{3\}, then A×B={(1,3),(2,3)}A \times B = \{(1,3), (2,3)\} while B×A={(3,1),(3,2)}B \times A = \{(3,1), (3,2)\} — the same number of pairs, but different pairs.

Cartesian product of more than two sets. The idea extends naturally: A×B×C={(a,b,c):a∈A,b∈B,c∈C}A \times B \times C = \{(a,b,c) : a \in A, b \in B, c \in C\} is a set of ordered triples, and n(A×B×C)=n(A)⋅n(B)⋅n(C)n(A \times B \times C) = n(A)\cdot n(B)\cdot n(C) when the sets are finite. This generalisation is exactly what is needed in the next section to build R×R×R\mathbb{R} \times \mathbb{R} \times \mathbb{R}.