Introduction to Cartesian Products
What you'll learn: You'll discover how to combine two sets into a new set of ordered pairs, creating what mathematicians call the Cartesian product.
The Core Idea
Imagine you have two sets: one containing shirt sizes and another containing colors. How would you describe all possible shirt options? You'd pair each size with each color—small-red, small-blue, medium-red, and so on. This is exactly what a Cartesian product does.
The Cartesian product of two sets A and B, written as A × B, is the set of all ordered pairs (a, b) where the first element a comes from set A and the second element b comes from set B.
Definition and Notation
If A = {1, 2} and B = {x, y, z}, then:
A × B = {(1, x), (1, y), (1, z), (2, x), (2, y), (2, z)}
Notice three critical features:
- Each element from A is paired with every element from B
- The pairs are ordered: (1, x) is different from (x, 1)
- If A has m elements and B has n elements, then A × B has m × n elements
Why "Ordered" Matters
The pair (a, b) is fundamentally different from (b, a). Think of coordinates on a graph: the point (3, 5) is not the same as (5, 3). The first component always comes from the first set, and the second component always comes from the second set.
A Concrete Example
Let A = {dog, cat} and B = {black, white}
Then A × B = {(dog, black), (dog, white), (cat, black), (cat, white)}
This represents all possible pet-color combinations.
Key Takeaway: The Cartesian product A × B creates ordered pairs by systematically pairing every element of A with every element of B, producing a new set whose size is |A| · |B|.