
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, specifically
set theory
Set theory is the branch of mathematical logic that studies Set (mathematics), sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory – as a branch of mathema ...
, the Cartesian product of two
sets and , denoted , is the set of all
ordered pairs where is an element of and is an element of .
In terms of
set-builder notation, that is
A table can be created by taking the Cartesian product of a set of rows and a set of columns. If the Cartesian product is taken, the cells of the table contain ordered pairs of the form .
One can similarly define the Cartesian product of sets, also known as an -fold Cartesian product, which can be represented by an -dimensional array, where each element is an -
tuple
In mathematics, a tuple is a finite sequence or ''ordered list'' of numbers or, more generally, mathematical objects, which are called the ''elements'' of the tuple. An -tuple is a tuple of elements, where is a non-negative integer. There is o ...
. An ordered pair is a
2-tuple or couple. More generally still, one can define the Cartesian product of an
indexed family
In mathematics, a family, or indexed family, is informally a collection of objects, each associated with an index from some index set. For example, a family of real numbers, indexed by the set of integers, is a collection of real numbers, wher ...
of sets.
The Cartesian product is named after
René Descartes
René Descartes ( , ; ; 31 March 1596 – 11 February 1650) was a French philosopher, scientist, and mathematician, widely considered a seminal figure in the emergence of modern philosophy and Modern science, science. Mathematics was paramou ...
, whose formulation of
analytic geometry gave rise to the concept, which is further generalized in terms of
direct product.
Set-theoretic definition
A rigorous definition of the Cartesian product requires a domain to be specified in the
set-builder notation. In this case the domain would have to contain the Cartesian product itself. For defining the Cartesian product of the sets
and
, with the typical
Kuratowski's definition of a pair
as
, an appropriate domain is the set
where
denotes the
power set. Then the Cartesian product of the sets
and
would be defined as
Examples
A deck of cards

An illustrative example is the
standard 52-card deck. The
standard playing card ranks form a 13-element set. The card suits form a four-element set. The Cartesian product of these sets returns a 52-element set consisting of 52
ordered pairs, which correspond to all 52 possible playing cards.
returns a set of the form .
returns a set of the form .
These two sets are distinct, even
disjoint, but there is a natural
bijection
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equival ...
between them, under which (3, ♣) corresponds to (♣, 3) and so on.
A two-dimensional coordinate system

The main historical example is the
Cartesian plane in
analytic geometry. In order to represent geometrical shapes in a numerical way, and extract numerical information from shapes' numerical representations,
René Descartes
René Descartes ( , ; ; 31 March 1596 – 11 February 1650) was a French philosopher, scientist, and mathematician, widely considered a seminal figure in the emergence of modern philosophy and Modern science, science. Mathematics was paramou ...
assigned to each point in the plane a pair of
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s, called its
coordinates. Usually, such a pair's first and second components are called its and coordinates, respectively (see picture). The set of all such pairs (i.e., the Cartesian product
, with
denoting the real numbers) is thus assigned to the set of all points in the plane.
Most common implementation (set theory)
A formal definition of the Cartesian product from
set-theoretical principles follows from a definition of
ordered pair. The most common definition of ordered pairs,
Kuratowski's definition, is
. Under this definition,
is an element of
, and
is a subset of that set, where
represents the
power set operator. Therefore, the existence of the Cartesian product of any two sets in
ZFC follows from the axioms of
pairing,
union,
power set, and
specification. Since
functions are usually defined as a special case of
relations, and relations are usually defined as subsets of the Cartesian product, the definition of the two-set Cartesian product is necessarily prior to most other definitions.
Non-commutativity and non-associativity
Let , , , and be sets.
The Cartesian product is not
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a pr ...
,
because the
ordered pairs are reversed unless at least one of the following conditions is satisfied:
* is equal to , or
* or is the
empty set
In mathematics, the empty set or void set is the unique Set (mathematics), set having no Element (mathematics), elements; its size or cardinality (count of elements in a set) is 0, zero. Some axiomatic set theories ensure that the empty set exi ...
.
For example:
: ;
::
::
:
::
:
::
::
Strictly speaking, the Cartesian product is not
associative (unless one of the involved sets is empty).
If for example , then .
Intersections, unions, and subsets
The Cartesian product satisfies the following property with respect to
intersections (see middle picture).
In most cases, the above statement is not true if we replace intersection with
union (see rightmost picture).
In fact, we have that: