Cartesian Product Calculator

Every ordered tuple picking one element from each set — A × B (or more sets at once).

Equations used
A × B = (a, b) : a in A, b in B
|A × B × ·s| = |A| × |B| × ·s

Frequently Asked Questions

What is a Cartesian product?

The Cartesian product A × B is the set of every ordered pair (a, b) where a comes from A and b comes from B. With three or more sets, it's every ordered tuple picking one element from each set.

How many tuples does a Cartesian product have?

|A × B × …| = |A| × |B| × … — multiply the sizes of all the sets together. Two sets of size 3 and 2 produce 6 tuples; adding a third set of size 2 gives 12.

Does the order of elements within each set matter?

No — only the order the SETS are listed in matters (A × B is different from B × A unless A = B). Within a single set, duplicate entries are removed but the remaining order doesn't change the result.