Cartesian product
Template:Short description Template:Use mdy dates Template:Redirect

In mathematics, specifically set theory, the Cartesian product of two sets Template:Mvar and Template:Mvar, denoted Template:Math, is the set of all ordered pairs Template:Math where Template:Mvar is in Template:Mvar and Template:Mvar is in Template:Mvar.[1] In terms of set-builder notation, that is [2][3]
A table can be created by taking the Cartesian product of a set of rows and a set of columns. If the Cartesian product Template:Nowrap is taken, the cells of the table contain ordered pairs of the form Template:Nowrap.[4]
One can similarly define the Cartesian product of Template:Mvar sets, also known as an Template:Mvar-fold Cartesian product, which can be represented by an Template:Mvar-dimensional array, where each element is an Template:Mvar-tuple. An ordered pair is a 2-tuple or couple. More generally still, one can define the Cartesian product of an indexed family of sets.
The Cartesian product is named after René Descartes,[5] 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[6]
Examples
A deck of cards

An illustrative example is the standard 52-card deck. The standard playing card ranks {A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2} form a 13-element set. The card suits Template:Nowrap} 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.
Template:Nowrap returns a set of the form {(A, ♠), (A, Template:Color), (A, Template:Color), (A, ♣), (K, ♠), ..., (3, ♣), (2, ♠), (2, Template:Color), (2, Template:Color), (2, ♣)}.
Template:Nowrap returns a set of the form {(♠, A), (♠, K), (♠, Q), (♠, J), (♠, 10), ..., (♣, 6), (♣, 5), (♣, 4), (♣, 3), (♣, 2)}.
These two sets are distinct, even disjoint, but there is a natural bijection 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 assigned to each point in the plane a pair of real numbers, called its coordinates. Usually, such a pair's first and second components are called its Template:Mvar and Template:Mvar 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.[7]
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 Template:Mvar, Template:Mvar, Template:Mvar, and Template:Mvar be sets.
The Cartesian product Template:Math is not commutative, [4] because the ordered pairs are reversed unless at least one of the following conditions is satisfied:[8]
- Template:Mvar is equal to Template:Mvar, or
- Template:Mvar or Template:Mvar is the empty set.
For example:
Strictly speaking, the Cartesian product is not associative (unless one of the involved sets is empty). If for example Template:Math, then Template:Math Template:Math.
Intersections, unions, and subsets
Template:See also Template:Multiple image
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:
For the set difference, we also have the following identity:
Here are some rules demonstrating distributivity with other operators (see leftmost picture):[8] where denotes the absolute complement of Template:Mvar.
Other properties related with subsets are:
Cardinality
The cardinality of a set is the number of elements of the set. For example, defining two sets: Template:Math and Template:Math. Both set Template:Mvar and set Template:Mvar consist of two elements each. Their Cartesian product, written as Template:Math, results in a new set which has the following elements:
where each element of Template:Mvar is paired with each element of Template:Mvar, and where each pair makes up one element of the output set. The number of values in each element of the resulting set is equal to the number of sets whose Cartesian product is being taken; 2 in this case. The cardinality of the output set is equal to the product of the cardinalities of all the input sets. That is,
In this case, Template:Math
Similarly,
and so on.
The set Template:Math is infinite if either Template:Mvar or Template:Mvar is infinite, and the other set is not the empty set.[10]
Cartesian products of several sets
n-ary Cartesian product
The Cartesian product can be generalized to the Template:Mvar-ary Cartesian product over Template:Mvar sets Template:Math as the set
of [[tuple|Template:Mvar-tuple]]s. If tuples are defined as nested ordered pairs, it can be identified with Template:Math. If a tuple is defined as a function on Template:Math} that takes its value at Template:Mvar to be the Template:Mvar-th element of the tuple, then the Cartesian product Template:Math is the set of functions
n-ary Cartesian power
The Cartesian square of a set Template:Mvar is the Cartesian product Template:Math. An example is the 2-dimensional plane Template:Math where Template:Math is the set of real numbers:[1] Template:Math is the set of all points Template:Math where Template:Mvar and Template:Mvar are real numbers (see the Cartesian coordinate system).
The Template:Mvar-ary Cartesian power of a set Template:Mvar, denoted , can be defined as
An example of this is Template:Math, with Template:Math again the set of real numbers,[1] and more generally Template:Math.
The Template:Mvar-ary Cartesian power of a set Template:Mvar is isomorphic to the space of functions from an Template:Mvar-element set to Template:Mvar. As a special case, the 0-ary Cartesian power of Template:Mvar may be taken to be a singleton set, corresponding to the empty function with codomain Template:Mvar.
Intersections, unions, complements and subsets
Let Cartesian products be given and . Then
- , if and only if for all ;[11]
- , at the same time, if there exists at least one such that , then ;[11]
- , moreover, equality is possible only in the following cases:[12]
- or ;
- for all except for one from .
- The complement of a Cartesian product can be calculated,[12] if a universe is defined . To simplify the expressions, we introduce the following notation. Let us denote the Cartesian product as a tuple bounded by square brackets; this tuple includes the sets from which the Cartesian product is formed, e.g.:
- .
In n-tuple algebra (NTA), [12] such a matrix-like representation of Cartesian products is called a C-n-tuple.
With this in mind, the union of some Cartesian products given in the same universe can be expressed as a matrix bounded by square brackets, in which the rows represent the Cartesian products involved in the union:
- .
Such a structure is called a C-system in NTA.
Then the complement of the Cartesian product will look like the following C-system expressed as a matrix of the dimension :
- .
The diagonal components of this matrix are equal correspondingly to .
In NTA, a diagonal C-system , that represents the complement of a C-n-tuple , can be written concisely as a tuple of diagonal components bounded by inverted square brackets:
- .
This structure is called a D-n-tuple. Then the complement of the C-system is a structure , represented by a matrix of the same dimension and bounded by inverted square brackets, in which all components are equal to the complements of the components of the initial matrix . Such a structure is called a D-system and is calculated, if necessary, as the intersection of the D-n-tuples contained in it. For instance, if the following C-system is given:
- ,
then its complement will be the D-system
- .
Let us consider some new relations for structures with Cartesian products obtained in the process of studying the properties of NTA.[12] The structures defined in the same universe are called homotypic ones.
- The intersection of C-systems. Assume the homotypic C-systems are given and . Their intersection will yield a C-system containing all non-empty intersections of each C-n-tuple from with each C-n-tuple from .
- Checking the inclusion of a C-n-tuple into a D-n-tuple. For the C-n-tuple and the D-n-tuple holds , if and only if, at least for one holds .
- Checking the inclusion of a C-n-tuple into a D-system. For the C-n-tuple and the D-system is true , if and only if, for every D-n-tuple from holds .
Infinite Cartesian products
It is possible to define the Cartesian product of an arbitrary (possibly infinite) indexed family of sets. If Template:Mvar is any index set, and is a family of sets indexed by Template:Mvar, then the Cartesian product of the sets in is defined to be that is, the set of all functions defined on the index set Template:Mvar such that the value of the function at a particular index Template:Mvar is an element of Xi. Even if each of the Xi is nonempty, the Cartesian product may be empty if the axiom of choice, which is equivalent to the statement that every such product is nonempty, is not assumed. may also be denoted .[13]
For each Template:Mvar in Template:Mvar, the function defined by is called the Template:Mvar-th projection map.
Cartesian power is a Cartesian product where all the factors Xi are the same set Template:Mvar. In this case, is the set of all functions from Template:Mvar to Template:Mvar, and is frequently denoted XI. This case is important in the study of cardinal exponentiation. An important special case is when the index set is , the natural numbers: this Cartesian product is the set of all infinite sequences with the Template:Mvar-th term in its corresponding set Xi. For example, each element of can be visualized as a vector with countably infinite real number components. This set is frequently denoted , or .
Other forms
Abbreviated form
If several sets are being multiplied together (e.g., Template:Math), then some authors[14] choose to abbreviate the Cartesian product as simply Template:Math.
Cartesian product of functions
If Template:Mvar is a function from Template:Mvar to Template:Mvar and Template:Mvar is a function from Template:Mvar to Template:Mvar, then their Cartesian product Template:Math is a function from Template:Math to Template:Math with
This can be extended to tuples and infinite collections of functions. This is different from the standard Cartesian product of functions considered as sets.
Cylinder
Let be a set and . Then the cylinder of with respect to is the Cartesian product of and .
Normally, is considered to be the universe of the context and is left away. For example, if is a subset of the natural numbers , then the cylinder of is .
Definitions outside set theory
Category theory
Although the Cartesian product is traditionally applied to sets, category theory provides a more general interpretation of the product of mathematical structures. This is distinct from, although related to, the notion of a Cartesian square in category theory, which is a generalization of the fiber product.
Exponentiation is the right adjoint of the Cartesian product; thus any category with a Cartesian product (and a final object) is a Cartesian closed category.
Graph theory
In graph theory, the Cartesian product of two graphs Template:Mvar and Template:Mvar is the graph denoted by Template:Math, whose vertex set is the (ordinary) Cartesian product Template:Math and such that two vertices Template:Math and Template:Math are adjacent in Template:Math, if and only if Template:Math and Template:Mvar is adjacent with Template:Mvar′ in Template:Mvar, or Template:Math and Template:Mvar is adjacent with Template:Mvar′ in Template:Mvar. The Cartesian product of graphs is not a product in the sense of category theory. Instead, the categorical product is known as the tensor product of graphs.
See also
- Axiom of power set (to prove the existence of the Cartesian product)
- Direct product
- Empty product
- Finitary relation
- Join (SQL) § Cross join
- Orders on the Cartesian product of totally ordered sets
- Outer product
- Product (category theory)
- Product topology
- Product type
References
External links
- Cartesian Product at ProvenMath
- Template:SpringerEOM
- How to find the Cartesian Product, Education Portal Academy
Template:Set theory Template:Mathematical logic
- ↑ 1.0 1.1 1.2 Template:MathWorld
- ↑ Template:Cite book
- ↑ Template:Cite web
- ↑ 4.0 4.1 4.2 Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite book
- ↑ 8.0 8.1 Singh, S. (August 27, 2009). Cartesian product. Retrieved from the Connexions Web site: http://cnx.org/content/m15207/1.5/
- ↑ Cartesian Product of Subsets. (February 15, 2011). ProofWiki. Retrieved 05:06, August 1, 2011 from https://proofwiki.org/w/index.php?title=Cartesian_Product_of_Subsets&oldid=45868
- ↑ Peter S. (1998). A Crash Course in the Mathematics of Infinite Sets. St. John's Review, 44(2), 35–59. Retrieved August 1, 2011, from http://www.mathpath.org/concepts/infinity.htm
- ↑ 11.0 11.1 Template:Cite book
- ↑ 12.0 12.1 12.2 12.3 Template:Cite book
- ↑ F. R. Drake, Set Theory: An Introduction to Large Cardinals, p. 24. Studies in Logic and the Foundations of Mathematics, vol. 76 (1978). ISBN 0-7204-2200-0.
- ↑ Osborne, M., and Rubinstein, A., 1994. A Course in Game Theory. MIT Press.