Skip to main content
Logo image

Section 6.2 Cartesian Products

A Cartesian product of two sets is a new set that is constructed from the two sets. In order to define Cartesian products, we need to define a mathematical object called an ordered pair.

Definition 6.11.

An ordered pair is an ordered list of two mathematical objects, \(a\) and \(b\text{,}\) written as \((a,b)\text{.}\) The objects in an ordered pair are called components. The object \(a\) is the first component of \((a,b)\text{,}\) and the object \(b\) is the second component of \((a,b)\text{.}\)

Definition 6.12.

Let \(A\) and \(B\) be sets. The Cartesian product of \(A\) and \(B\text{,}\) denoted \(A \times B\text{,}\) is the set of ordered pairs \((a,b)\text{,}\) where \(a \in A\) and \(b \in B\text{.}\)
The Cartesian product of two sets \(A\) and \(B\text{,}\) formulated in set-builder notation, is
\begin{equation*} A \times B := \set{(a,b) \mid a \in A \text{ and } b \in B}\text{.} \end{equation*}
Complete the definition of Cartesian products in Checkpoint 6.13.

Checkpoint 6.13. Definition of Cartesian product.

Complete the following:
Let \(A\) and \(B\) be sets.
The
  • select
  • intersection
  • union
  • difference
  • sum
  • Cartesian product
  • complement
of the sets \(A\) and \(B\text{,}\) denoted by \(A\times B\text{,}\) is the set of all
  • select
  • unordered pairs
  • ordered pairs
  • sets
  • numbers
\((a,b)\) where \(a\) is
  • select
  • related to
  • an element of
  • a subsets of
  • not related to
  • not an element of
  • a proper subset of
  • equal to
  • not equal to
the set \(A\)
  • select
  • and
  • or
\(b\) is
  • select
  • related to
  • an element of
  • a subsets of
  • not related to
  • not an element of
  • a proper subset of
  • equal to
  • not equal to
the set \(B\text{.}\)
To form the Cartesian product \(A \times B\text{,}\) we pair each element of \(A\text{,}\) placed in the first component of the ordered pair, with each element of \(B\text{,}\) placed in the second component of the ordered pair.

Example 6.14. Cartesian products in roster form.

Let \(A = \set{0,1}\text{,}\) and let \(B = \set{4,5,6}\text{.}\) Then,
\begin{equation*} A \times B = \set{(0, 4), (0, 5), (0, 6), (1, 4), (1, 5), (1, 6)}\text{,} \end{equation*}
and
\begin{equation*} B \times A = \set{(4, 0), (4, 1), (5, 0), (5, 1), (6, 0), (6,1)}\text{.} \end{equation*}

Problem 6.15.

Let \(A=\{1,2,3\}\) and let \(B=\{-50\}\text{.}\) Give the set \(A\times B\) in roster form.
Solution.
The set \(A\times B\) contains all ordered pairs whose first entry is an element of the set \(A\) and whose second entry is an element of the set \(B\text{.}\) We write ordered pairs whose first entry is \(c\) and whose second entry is \(d\) as \((c,d)\text{.}\) We get
\begin{equation*} A\times B= \{(1,-50),(2,-50),(3,-50)\} \end{equation*}
In the next problem a Cartesian product is given in set builder notation.

Problem 6.16.

Let \(A = \{12,13,34\}\text{.}\) Give \(\{(a,a \fmod 5)\mid a \in A\}\) in roster form.
Solution.
We find all pairs whose first entry is an element \(a\) of the set \(A\) and whose second entry is \(a \fmod 5\text{.}\) We get
\begin{align*} \{(a,a \fmod 5) \mid a \in A\} \amp = \{(12,12 \fmod 5), (13,13 \fmod 5), (34,34\fmod 5)\}\\ \amp =\{(12,2), (13,3), (34,4)\}\text{.} \end{align*}
In Checkpoint 6.17 determine all the elements of a Cartesian product that is given in set-builder notation.

Checkpoint 6.17. Cartesian product from set-builder to roster.

Let \(A = \lbrace 5, 6, 7, 8 \rbrace\text{.}\) Give the set in roster form.
\(\lbrace ( a, 3\cdot a ) \mid a \in A \rbrace =\)\(\lbrace\)\(\rbrace\)
[although it would be mathematically correct to list elements multiple times, this problem is marked wrong if you do so.]
To determine when two Cartesian products are equal we need to know when two ordered pairs are equal.

Definition 6.18.

Let \(A\) and \(B\) be sets. Saying that \((a,b)\in A\times B\) and \((c,d)\in A\times B\) are equal means that \(a=c\) and \(b=d\text{.}\)
When \((a,b)\) and \((c,d)\) are equal, we write \((a,b)=(c,d)\text{.}\)
When \((a,b)\) and \((c,d)\) are not equal, we write \((a,b)\ne(c,d)\text{.}\)
So, two ordered pairs are equal if they have matching first components and matching second components. The fact that the elements \((a,b)\) of \(A \times B\) are called ordered pairs indicates that we must pay attention to order for Cartesian products. In comparison, recall that the order of the elements in a set given in roster form does not matter. (See Example 5.20.)

Example 6.19. Sets versus ordered pairs.

We have the equality of sets \(\{1,2\} = \{2,1\}\text{.}\) However, as ord:ered pairs, \((1,2)\neq(2,1)\text{.}\)
Since the empty set \(\emptyset\) does not contain any elements, there are no elements to be placed into the second component of the Cartesian product \(A\times \emptyset\text{.}\) So, we have that \(A\times\emptyset=\emptyset\) for any set \(A\text{.}\) Similarly, \(\emptyset \times B = \emptyset\) for any set \(B\text{.}\)
In Checkpoint 6.20 find all elements of a Cartesian product.

Checkpoint 6.20. Give Cartesian product in roster form.

Let \(A = \lbrace 5, 6, 7\rbrace\) and let \(B = \lbrace 1, 2\rbrace\text{.}\) Give the cartesion product of \(A\) and \(B\) in roster form:
\(A \times B = \lbrace\)\(\rbrace\)