Ordered pairs and Cartesian products
To talk about relations such as "x is less than y" or "P lies on the line y=2x", we need a way to write a pair of objects in which order matters. The set {2,3} does not distinguish first from second. The ordered pair (2,3) does.
Definitions
An ordered pair (a,b) is a pair of objects where a is the first coordinate (or first component) and b is the second coordinate.
Equality. Two ordered pairs are equal iff their first coordinates match and their second coordinates match:
(a,b)=(c,d)⟺a=c and b=d.
In particular, (2,3)=(3,2) , order matters.
Given two sets A and B, the Cartesian product of A and B is
A×B={(a,b):a∈A, b∈B}.
We read A×B as "A cross B". If either A or B is empty, A×B=∅.
We similarly define A×B×C={(a,b,c):a∈A,b∈B,c∈C} , ordered triples.
Size of the Cartesian product
Theorem. If A and B are finite sets, ∣A×B∣=∣A∣⋅∣B∣.
Proof. Each element of A×B is a pair (a,b). There are ∣A∣ choices for a and, independently, ∣B∣ choices for b. By the multiplication principle, the total number of pairs is ∣A∣⋅∣B∣. \qed
Cartesian plane
When A=B=R, we get
R×R=R2={(x,y):x,y∈R}.
This is the Cartesian plane , every point of which is described by an ordered pair (x,y) of real numbers. The coordinate axes and the four quadrants you learned in geometry are nothing but a picture of R2.
Standard identities
For all sets A,B,C:
- A×(B∪C)=(A×B)∪(A×C).
- A×(B∩C)=(A×B)∩(A×C).
- A×∅=∅.
- If A⊆B, then A×C⊆B×C for any C.
These follow by checking ordered-pair-by-ordered-pair. For instance, (x,y)∈A×(B∪C)⟺x∈A and y∈B∪C⟺x∈A and (y∈B or y∈C) ⟺(x,y)∈A×B or (x,y)∈A×C⟺(x,y)∈(A×B)∪(A×C).
Worked examples
Example 1. If A={1,2} and B={a,b,c}, list A×B and B×A and find their sizes.
A×B={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}, ∣A×B∣=6.
B×A={(a,1),(a,2),(b,1),(b,2),(c,1),(c,2)}, ∣B×A∣=6.
The two have the same size but are different sets ((1,a)∈A×B but (1,a)∈/B×A).
Example 2. If (x+1,y−2)=(3,1), find x and y.
Matching coordinates: x+1=3⇒x=2; y−2=1⇒y=3.
Example 3. Let A={x∈R:0<x<1} and B={1,2,3}. Describe A×B.
A×B is the union of three horizontal segments in the plane: {(x,1):0<x<1}, {(x,2):0<x<1}, {(x,3):0<x<1}.
Example 4. If ∣A∣=3 and ∣A×B∣=12, find ∣B∣.
∣A×B∣=∣A∣⋅∣B∣ gives 12=3⋅∣B∣, so ∣B∣=4.
Example 5 (harder). Show A×B=B×A⟺A=B or one of them is empty.
If A=B then A×B=A×A=B×A. If A=∅ or B=∅, both products are ∅.
Conversely, suppose A=∅, B=∅, and A×B=B×A. Pick a∈A,b∈B. Then (a,b)∈A×B=B×A, forcing a∈B and b∈A. Hence A⊆B and B⊆A, so A=B. \qed
Try it yourself
- Find (x,y) if (2x−1,y+3)=(5,−2).
- List A×B for A={1,2,3}, B={a}. What is ∣A×B∣?
- Find ∣A×B∣ if ∣A∣=7, ∣B∣=5.
- If A×B has 9 elements and contains (1,2) and (2,4), find A and B (given ∣A∣=∣B∣).
- Let A={1,2}. List all elements of A×A×A.
- Show (A∪B)×C=(A×C)∪(B×C).
- If A={1,2},B={3,4},C={2,5}, find A×(B∩C) and (A×B)∩(A×C).
- Plot A×B on graph paper for A={1,2,3} and B={2,4}.
- If (x+y,x−y)=(5,1), find x,y.
- Verify A×∅=∅×A=∅.
- If A={x∈R:1≤x≤2} and B={y∈R:0≤y≤3}, describe A×B geometrically.
- Show that for sets A,B, A×B=B×A does not in general hold.
Pitfalls / Tricks
- (a,b)={a,b}. The ordered pair is not the same as the unordered set.
- In general A×B=B×A even though ∣A×B∣=∣B×A∣.
- A×∅=∅: any product with the empty set is empty.
- Insight. Cartesian products are how you encode several pieces of information at once. A pair (x,y) stores two numbers; a triple (x,y,z) stores three. Multi-dimensional thinking starts here.