math-cartesian-product.html
* created: 2025-05-19T17:16
* modified: 2025-06-02T08:48
title
Cartesian product
description
The Cartesian product is the product of two sets and gets denoted as $A \times B$.
The Cartesian Product
The Cartesian product of two sets A and B, written as:
A \times B
is the set of all ordered pairs (a, b) where:
a \in A \land b \in B
So you could say the Cartesian product is the set of all possible combinations.
Note: The order is important here; where are talking about every tuple with (a, b), which means (b, a) is not allowed. The Cartesian product is not commutative!
Calculating the power set
Let's go with our first example and define:
|A| = 7
|B| = 4
How many elements would \mathcal{P}(A \times B) have?
Answer:
|\mathcal{P}(A \times B)| = 2^{(|A \times B|)} = 2^{(7 \times 4)} = 2^{28} = 268435456