set operations
Cartesian Products
You should know: set basics
Overview
The Cartesian product of two sets A and B, written A × B, is the set of all ordered pairs (a, b) with a ∈ A and b ∈ B. Order matters — (a,b) is generally different from (b,a) — which distinguishes it from an unordered pairing. For finite sets, |A × B| = |A| · |B|, and the construction extends to any finite (or infinite) list of sets, producing ordered n-tuples. The Cartesian product is the basic building block for coordinates, relations, and functions: the plane ℝ² is R × R, and any binary relation or function is simply a specially chosen subset of a Cartesian product.
Intuition
Picture a grid: rows labeled by elements of A, columns labeled by elements of B. Every cell of the grid is exactly one ordered pair (a, b), and the whole grid is A × B. This is literally how the Cartesian coordinate plane works — ℝ × ℝ is the set of all (x, y) pairs, one per point in the plane — which is why the construction is named after Descartes. Swapping A and B swaps rows and columns, giving a different (though same-size) grid, which is why order matters.
Formal Definition
For sets A and B, the Cartesian product is:
Worked Examples
Pair each element of A with each element of B, in that order.
There are |A|·|B| = 2·3 = 6 ordered pairs.
Answer: A × B has 6 ordered pairs, as listed above.
Practice Problems
If |A| = 4 and |B| = 5, what is |A × B|?
Which of the following best describes a binary relation R from set X to set Y?
A restaurant menu has 3 appetizers, 5 entrées, and 4 desserts. How many distinct 3-course meals (one from each category) are possible?
Quiz
Summary
- A × B is the set of ordered pairs (a,b) with a ∈ A and b ∈ B; for finite sets |A×B| = |A|·|B|.
- Order matters: A × B ≠ B × A in general, even though they have the same cardinality.
- Relations and functions are defined as special subsets of a Cartesian product, making it foundational across mathematics.
Mathematics