What is a Cartesian Product?
You’re ordering a meal. You pick one main and one drink.
- Mains: burger, pizza
- Drinks: cola, water
What are all possible meals you could order?
- (burger, cola)
- (burger, water)
- (pizza, cola)
- (pizza, water)
That’s the Cartesian product — every possible pairing.
The Notation
This reads: “A cross B”
It means: pair each element of A with each element of B.
Step-by-Step Example
Find :
Take each element of A and pair it with every element of B:
| From A | Paired with B | Pairs |
|---|---|---|
| 1 | a, b, c | (1, a), (1, b), (1, c) |
| 2 | a, b, c | (2, a), (2, b), (2, c) |
Each element of A gets paired with every element of B.
Order Matters
The pairs are ordered pairs — first element from A, second from B.
These are different pairs. The order tells you which set each element came from.
This also means:
Example:
Different results.
How Many Pairs?
If A has elements and B has elements:
That’s why it’s called the Cartesian product — you multiply the sizes.
Examples:
| A | B | Size of A × B |
|---|---|---|
| 2 elements | 3 elements | 2 × 3 = 6 pairs |
| 4 elements | 5 elements | 4 × 5 = 20 pairs |
| 10 elements | 10 elements | 10 × 10 = 100 pairs |
The Coordinate Plane
Here’s why this matters.
The x-y coordinate plane you’ve used since school? That’s a Cartesian product.
Every point on the plane is a pair (x, y) where:
- x comes from the real numbers (horizontal axis)
- y comes from the real numbers (vertical axis)
The point (3, 5) is just an element of .
is the set of all real numbers.
Special Cases
Product with empty set:
If there’s nothing to pair with, you get no pairs.
Product with itself:
This is common. means .
Example:
The Formal Definition
This reads: “The set of all ordered pairs (a, b) where a is in A and b is in B.”
Cartesian product builds all possible pairings.