# Cartesian product

The Cartesian product of two sets \(A\) and \(B,\) denoted \(A \times B,\) is the set of all ordered pairs \((a, b)\) such that \(a \in A\) and \(b \in B.\) For example, if \(\mathbb B \times \mathbb N\) is the set of all pairs of a boolean with a natural number, and it contains elements like (true, 0), (false, 17), (true, 17), (true, 100), and (false, 101).

Cartesian product are often referred to as just “products.”

Cartesian products can be constructed from more than two sets, for example, \(\mathbb B^3 = \mathbb B \times \mathbb B \times \mathbb B\) is the set of all boolean 3-tuples. (The \(\times\) operator is associative, so we don’t need to write parenthesis when using it on a whole chain of sets.) A product of \(n\) sets is called an \(n\)-ary product.

Parents: