On this page
When working with relations and functions in mathematics, you must first understand how to combine sets to form pairs. The operation that does this is the Cartesian product. It forms the foundation of coordinates, graphing, and mathematical functions.
What is the Cartesian product of two sets a cross b?
The Cartesian product of two sets A and B, denoted A × B (read as "A cross B"), is the set of all possible ordered pairs (a, b) where the first element a belongs to set A and the second element b belongs to set B. In set-builder notation, A × B = {(a, b) | a ∈ A and b ∈ B} Wikipedia.
Named after René Descartes, whose work in analytic geometry gave rise to the concept, its most famous example is the 2D coordinate plane. The plane is the Cartesian product of the real numbers with itself, yielding coordinates like (x, y).
For a simpler example, imagine a set of colours A = {Red, Blue} and a set of sizes B = {Small, Large}. The Cartesian product systematically pairs every colour with every size: A × B = {(Red, Small), (Red, Large), (Blue, Small), (Blue, Large)}.
The number of elements in a Cartesian product is the product of the sizes of the individual sets. If A has m elements and B has n elements, then |A × B| = |A| · |B|. In our example, n(A) = 2 and n(B) = 2, so n(A × B) = 2 × 2 = 4 unique pairs.
Why is A × B not equal to B × A?
The key rule lies in the term *ordered pair*. In any pair (a, b), the position is strict: the first element is always from the first set, and the second from the second set. Because of this ordering, the Cartesian product is non-commutative: A × B ≠ B × A.
Let's swap our earlier sets. If we calculate B × A, the pairs start with a size and end with a colour: B × A = {(Small, Red), (Large, Red), (Small, Blue), (Large, Blue)}.
While the total number of pairs remains 4, the actual pairs are entirely different. By definition, (x, y) equals (u, v) only if x = u and y = v. The only exceptions where A × B = B × A are when sets A and B are identical, or if one is entirely empty. If either is empty, the Cartesian product is the empty set.
How do you find A and B when some pairs are given?
Mathematics exams often test your understanding by working backward, giving you a few pairs to deduce the original sets. This relies on every pair strictly following the (a, b) format.
Suppose the Cartesian product A × B has exactly 6 elements, and three of its pairs are (1, 4), (2, 5), and (3, 4). Find the original sets A and B, and list the remaining pairs.
Identify Set A: Look at the first element of each given pair: 1, 2, and 3. Since they must belong to A, we know A contains at least {1, 2, 3}.
Identify Set B: Look at the second element of each given pair: 4, 5, and 4. Since they belong to B, B contains at least {4, 5}.
Verify the counts: We found 3 elements for A and 2 for B. The multiplication rule confirms n(A) × n(B) = 3 × 2 = 6. Our sets are complete: A = {1, 2, 3} and B = {4, 5}.
Find the missing pairs: The complete Cartesian product is A × B = {(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)}. The three missing pairs are (1, 5), (2, 4), and (3, 5).
When abstract topics get confusing, structured learning helps. The Fermi Concept Library holds every concept in mathematics, each with its own lesson. If you struggle with set theory, Fermi's AI tutor works out what you already know, builds a plan for the session, and teaches through it—drawing the figure and checking understanding as it goes.



