Finding something worth knowing…

Science

A deck of playing cards is a Cartesian product in disguise

Take the 13 card ranks from ace down to two and the four suits, then pair every rank with every suit. You get exactly 52 combinations, one for each card in a standard deck. Mathematicians call that pairing operation the Cartesian product, and it quietly underpins graphs, tables and much of modern mathematics.

Formally, the Cartesian product of two sets A and B, written A × B, is the collection of every ordered pair whose first entry comes from A and whose second comes from B. Spreadsheets make the idea visible: crossing a set of rows with a set of columns produces cells, each labelled by a row value and a column value. The idea extends to any number of sets, giving n-tuples that can be arranged in an n-dimensional array, and even to infinite indexed families of sets.

The name honours René Descartes, whose analytic geometry gave birth to the concept. To describe shapes with numbers and read numbers back off shapes, he gave every point in a plane a pair of real numbers, now called its x and y coordinates. The whole plane is thus the product of the real numbers with themselves.

Order matters. Crossing {1,2} with {3,4} yields pairs like (1,3), while reversing the sets yields (3,1), a different collection entirely, so the operation is not commutative unless the sets are equal or one is empty. The card example shows the same thing: ranks crossed with suits and suits crossed with ranks share no elements, though each pair in one matches a flipped pair in the other. Strictly speaking the operation is not associative either, since nesting ((1,1),1) differs from (1,(1,1)).

The concept sits near the foundation of set theory. Using Kuratowski's definition of an ordered pair, the existence of any two-set product follows from the standard ZFC axioms of pairing, union, power set and specification. Because relations are usually defined as subsets of a Cartesian product, and functions as special relations, this definition must come before most others.

Source: Cartesian product

Related

More in Science · All topics