ArticleslgStudy

mathematics

Cartesian product

Cartesian product is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cartesian product rather than just read about it. In short: In mathematics, specifically set theory, the Cartesian product of two sets A and B, denoted A × B, is the set of all ordered pairs (a, b) where a is an element of A and b is an element of B. In terms of set-builder notation, that is A×B={(a,b)∣a∈A and b∈B}.

Cartesian product — main illustration
Cartesian product — illustration

Key takeaways

  • Cartesian product belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cartesian product to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cartesian product from memory before moving on to harder problems.

Reference excerpt

In mathematics, specifically set theory, the Cartesian product of two sets A and B, denoted A × B, is the set of all ordered pairs (a, b) where a is an element of A and b is an element of B. In terms of set-builder notation, that is A×B={(a,b)∣a∈A and b∈B}. A table can be created by taking the Cartesian product of a set of rows and a set of columns. If the Cartesian product rows × columns is taken, the cells of the table contain ordered pairs of the form (row value, column value). One can similarly define the Cartesian product of n sets, also known as an n-fold Cartesian product, which can be represented by an n-dimensional array, where each element is an n-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, 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 A and B, with the typical Kuratowski's definition of a pair (a,b) as {{a},{a,b}}, an appropriate domain is the set 𝒫(𝒫(A∪B)) where 𝒫 denotes the power set. Then the Cartesian product of the sets A and B would be defined as A×B={x∈𝒫(𝒫(A∪B))∣∃a∈A ∃b∈B:x=(a,b)}.

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 {♠, ♥, ♦, ♣} 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. Ranks × Suits returns a set of the form {(A, ♠), (A, ♥), (A, ♦), (A, ♣), (K, ♠), ..., (3, ♣), (2, ♠), (2, ♥), (2, ♦), (2, ♣)}. Suits × Ranks 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 x and y 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 (x,y)={{x},{x,y}}. Under this definition, (x,y) is an element of 𝒫(𝒫(X∪Y)), and X×Y 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 A, B, and C be sets. The Cartesian product A × B is not commutative, A×B≠B×A, because the ordered pairs are reversed unless at least one of the following conditions is satisfied:

A is equal to B, or A or B is the empty set. For example:

A = {1,2}; B = {3,4} A × B = {1,2} × {3,4} = {(1,3), (1,4), (2,3), (2,4)} B × A = {3,4} × {1,2} = {(3,1), (3,2), (4,1), (4,2)} A = B = {1,2} A × B = B × A = {1,2} × {1,2} = {(1,1), (1,2), (2,1), (2,2)} A = {1,2}; B = ∅ A × B = {1,2} × ∅ = ∅ B × A = ∅ × {1,2} = ∅ Strictly speaking, the Cartesian product is not associative (unless one of the involved sets is empty). (A×B)×C≠A×(B×C) If for example A = {1}, then (A × A) × A = {((1, 1), 1)} ≠ {(1, (1, 1))} = A × (A × A).

Intersections, unions, and subsets

The Cartesian product satisfies the following property with respect to intersections (see middle picture). (A∩B)×(C∩D)=(A×C)∩(B×D) In most cases, the above statement is not true if we replace intersection with union (see rightmost picture). (A∪B)×(C∪D)≠(A×C)∪(B×D) In fact, we have that: (A×C)∪(B×D)=[(A∖B)×C]∪[(A∩B)×(C∪D)]∪[(B∖A)×D] For the set difference, we also have the following identity: (A×C)∖(B×D)=[A×(C∖D)]∪[(A∖B)×C] Here are some rules demonstrating distributivity with other operators (see leftmost picture):

A×(B∩C)=(A×B)∩(A×C),A×(B∪C)=(A×B)∪(A×C),A×(B∖C)=(A×B)∖(A×C), (A×B)∁=(A∁×B∁)∪(A∁×B)∪(A×B∁), where A∁ denotes the absolute complement of A. Other properties related with subsets are:

if A⊆B, then A×C⊆B×C; if both A,B≠∅︀, then A×B⊆C×D⟺A⊆C and B⊆D.

Cardinality

The cardinality of a set is the number of elements of the set. For example, defining two sets: A = {a, b} and B = {5, 6}. Both set A and set B consist of two elements each. Their Cartesian product, written as A × B, results in a new set which has the following elements:

A × B = {(a,5), (a,6), (b,5), (b,6)}. where each element of A is paired with each element of B, 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,

|A × B| = |A| · |B|. In this case, |A × B| = 4 Similarly,

|A × B × C| = |A| · |B| · |C| and so on. The set A × B is infinite if either A or B is infinite, and the other set is not the empty set.

Cartesian products of several sets

… excerpt ends here. Continue reading the full article.

Illustrations

Cartesian product: Cartesian product of the sets {x,y,z} and {1,2,3}
Cartesian product of the sets {x,y,z} and {1,2,3}
Cartesian product: Standard 52-card deck
Standard 52-card deck
Cartesian product: Cartesian coordinates of example points
Cartesian coordinates of example points
Cartesian product illustration
Cartesian product illustration

Worked examples

Example 1 — a first encounter with Cartesian product

Start with the simplest possible case. Write down what Cartesian product claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cartesian product before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cartesian product ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cartesian product

In research
Cartesian product appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cartesian product in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cartesian product is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analytic geometry, Axiom of choice, Operations on sets, so understanding it makes those chapters shorter.
In everyday life
Look for Cartesian product outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cartesian product” →

How to study Cartesian product in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cartesian product means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cartesian product out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cartesian product in simple terms?

In mathematics, specifically set theory, the Cartesian product of two sets A and B, denoted A × B, is the set of all ordered pairs (a, b) where a is an element of A and b is an element of B. In terms of set-builder notation, that is A×B={(a,b)∣a∈A and b∈B}.

Why does Cartesian product matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cartesian product?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cartesian product.

Tags

  • Analytic geometry
  • Axiom of choice
  • Operations on sets

Keep exploring