Lesson 1 · Introduction to Series and Sigma (Σ) Notation

Cartesian Product of Two Sets

Optional MathematicsSubject
8 minEstimated read

Making Pairs from Two Sets

Suppose you have two colours of paint, red and blue, and three things to paint: a pen, a ruler and a pencil. Every object can be painted in either colour. How many different coloured objects can you make? A red pen, a red ruler, a red pencil, a blue pen, a blue ruler and a blue pencil. That is six. Each one is made by taking one choice from the first collection and joining it to one choice from the second.

Written with sets, the colours are \( C = \{\text{Red}, \text{Blue}\} \) and the objects are \( O = \{\text{Pen}, \text{Ruler}, \text{Pencil}\} \). Each coloured object can be written as an ordered pair such as (Red, Pen), with the colour always first and the object always second. Two colours with three objects give \( 2 \times 3 = 6 \) pairs.

The same idea appears when two dice are rolled together. Let the number on die (1) be the first component and the number on die (2) be the second. If die (1) shows 3 and die (2) shows 5, the roll is the ordered pair (3, 5), and it can be marked as a single point on graph paper. Every possible roll is a pair made from the set {1, 2, 3, 4, 5, 6} with the same set.

Die (1) gives the first component and die (2) gives the second, so every roll is an ordered pair that can be plotted as one point on the grid.
Die (1) gives the first component and die (2) gives the second, so every roll is an ordered pair that can be plotted as one point on the grid.

Now try it with small sets of numbers. Let \( A = \{1, 2\} \) and \( B = \{3, 4\} \). Take each element of A as the first component and each element of B as the second component. The pairs are (1, 3), (1, 4), (2, 3) and (2, 4). This new set of pairs has a special name and a special symbol.

The Cartesian Product A × B

Definition

Cartesian product: If A and B are two non-empty subsets of the universal set U, then the set of all ordered pairs (a, b) such that a is an element of A and b is an element of B is called the Cartesian product of A and B. It is denoted by A × B and read as "A cross B".

\[ A \times B = \{(a, b) : a \in A \text{ and } b \in B\} \]

The set written first supplies the first components, and the set written second supplies the second components. So for \( A = \{1, 2\} \) and \( B = \{3, 4\} \) we have \( A \times B = \{(1, 3), (1, 4), (2, 3), (2, 4)\} \). Every element of A appears as a first component, and each of them is paired with every element of B. No pair is left out and no pair is written twice.

Common mistake

A × B is a set of ordered pairs, not a set of numbers. Multiplying the elements, as in {3, 4, 6, 8}, or joining the sets, as in {1, 2, 3, 4}, is not the Cartesian product.

Is A × B the Same as B × A?

Let \( A = \{2, 5\} \) and \( B = \{3, 5\} \). We find A × B and B × A and then check whether they are equal. A good way to make sure no pair is missed is to branch out from each element of the first set to every element of the second set.

Step 1: Taking the element 2 from A and pairing it with each element of B gives:

\[ (2, 3), \ (2, 5) \]

The element 2 of A branches to 3 and to 5 of B, giving (2, 3) and (2, 5).
The element 2 of A branches to 3 and to 5 of B, giving (2, 3) and (2, 5).

Step 2: Taking the element 5 from A and pairing it with each element of B gives:

\[ (5, 3), \ (5, 5) \]

The element 5 of A branches to 3 and to 5 of B, giving (5, 3) and (5, 5).
The element 5 of A branches to 3 and to 5 of B, giving (5, 3) and (5, 5).

Step 3: Collecting all four pairs into one set:

\[ A \times B = \{(2, 3), (2, 5), (5, 3), (5, 5)\} \]

Step 4: For B × A the order is reversed. Each element of B now becomes the first component and is paired with each element of A, so 3 gives (3, 2) and (3, 5), and 5 gives (5, 2) and (5, 5):

\[ B \times A = \{(3, 2), (3, 5), (5, 2), (5, 5)\} \]

Step 5: Comparing the two sets. The pair (2, 3) belongs to A × B but it is not in B × A, because (2, 3) and (3, 2) are different ordered pairs. Therefore:

\[ A \times B \neq B \times A \]

A graph makes the difference easy to see. Plot each pair with its first component along the x-axis and its second component along the y-axis. The points of A × B and the points of B × A land in different places. Only (5, 5) is common to both graphs, because its two components are equal, so swapping them changes nothing.

The four points of A × B and the four points of B × A sit in different places, which shows the two products are not equal.
The four points of A × B and the four points of B × A sit in different places, which shows the two products are not equal.
The graph of B × A: the points (3, 2), (3, 5), (5, 2) and (5, 5).
The graph of B × A: the points (3, 2), (3, 5), (5, 2) and (5, 5).
Key idea

Order matters. A × B and B × A are usually different sets, although they always contain the same number of pairs. They are equal only when A = B.

Four Ways to Show a Cartesian Product

The same Cartesian product can be shown in four different ways. Each way carries exactly the same pairs; only the picture changes. We use the sets \( A = \{3, 2\} \) and \( B = \{1, 4\} \) for all four.

Listing the Elements

Write every ordered pair inside curly brackets, separated by commas. This is the method used so far:

\[ A \times B = \{(3, 1), (3, 4), (2, 1), (2, 4)\} \]

Tabulating

Draw a table with the sign × in the top left corner. Write the elements of B across the top row and the elements of A down the left column. Each cell holds the ordered pair made from its row element, written first, and its column element, written second. A table with 2 rows and 2 columns has 4 cells, one for each pair.

Rows come from A and columns from B, so every cell holds (row element, column element).
Rows come from A and columns from B, so every cell holds (row element, column element).

Arrow Diagram

Draw two ovals, one for A on the left and one for B on the right, and write the elements inside. Then draw an arrow from each element of A to each element of B. Every arrow stands for one ordered pair: the element at the tail is the first component and the element at the head is the second. Here 3 sends arrows to 1 and 4, and 2 also sends arrows to 1 and 4, so there are 4 arrows.

Each of the four arrows starts in A and ends in B, and each arrow stands for one ordered pair.
Each of the four arrows starts in A and ends in B, and each arrow stands for one ordered pair.

Graph

Draw the x-axis and the y-axis. For each pair, move along the x-axis by the first component and up by the second component, and mark a dot. The point (3, 1) is 3 units to the right and 1 unit up. The four dots together are the graph of A × B.

The pairs (2, 1), (3, 1), (2, 4) and (3, 4) plotted as four points, the first component read across and the second read up.
The pairs (2, 1), (3, 1), (2, 4) and (3, 4) plotted as four points, the first component read across and the second read up.
Careful with the order

In the table the row element is written first, in the arrow diagram the tail is written first, and on the graph the x value is written first. Mixing these up turns A × B into B × A.

Worked Example: One Product Shown Four Ways

Let \( A = \{3, 5\} \) and \( B = \{5, 4\} \). We find A × B and show it by a set of ordered pairs, a table, an arrow diagram and a graph.

(i) As a set of ordered pairs, pairing 3 with 5 and 4, then 5 with 5 and 4:

\[ A \times B = \{(3, 5), (3, 4), (5, 5), (5, 4)\} \]

(ii) By tabulating. The elements of B, 5 and 4, go across the top, and the elements of A, 3 and 5, go down the side:

The table of A × B: row 3 gives (3, 5) and (3, 4), row 5 gives (5, 5) and (5, 4).
The table of A × B: row 3 gives (3, 5) and (3, 4), row 5 gives (5, 5) and (5, 4).

(iii) By an arrow diagram. From each of 3 and 5 in A, one arrow goes to 4 and one goes to 5 in B, so there are four arrows. Notice that 5 belongs to both sets, and the arrow from 5 in A to 5 in B is the pair (5, 5):

Four arrows from A to B, one for each pair of A × B.
Four arrows from A to B, one for each pair of A × B.

(iv) By graph. The points (3, 4), (3, 5), (5, 4) and (5, 5) are plotted. The two points with first component 3 lie on one vertical line, and the two with first component 5 lie on another:

The graph of A × B for A = {3, 5} and B = {5, 4}.
The graph of A × B for A = {3, 5} and B = {5, 4}.

Counting the Pairs in A × B

Every element of A is paired with every element of B. If A has 2 elements and B has 3, each of the 2 elements makes 3 pairs, so there are \( 2 \times 3 = 6 \) pairs in all. This is exactly why the table method gives a rectangle of cells: the number of rows times the number of columns.

Definition

Cardinality of a Cartesian product: If the cardinalities of the sets A and B are n(A) and n(B), then the number of elements in A × B is n(A) × n(B).

\[ n(A \times B) = n(A) \times n(B) \]

Let us check the rule with \( A = \{1, 2\} \) and \( B = \{3, 5\} \).

Step 1: Listing the pairs of A × B:

\[ A \times B = \{(1, 3), (1, 5), (2, 3), (2, 5)\} \]

Step 2: Counting the elements gives \( n(A) = 2 \) and \( n(B) = 2 \). Counting the pairs just listed:

\[ n(A \times B) = 4 = 2 \times 2 = n(A) \times n(B) \]

Step 3: A set can also be crossed with itself. Pairing every element of A with every element of A:

\[ A \times A = \{(1, 1), (1, 2), (2, 1), (2, 2)\} \]

Step 4: Counting the pairs of A × A:

\[ n(A \times A) = 4 = 2 \times 2 = n(A) \times n(A) \]

Step 5: In the same way, pairing B with itself:

\[ B \times B = \{(3, 3), (3, 5), (5, 3), (5, 5)\} \]

Step 6: Counting the pairs of B × B:

\[ n(B \times B) = 4 = 2 \times 2 = n(B) \times n(B) \]

Key idea

If B = A, then A × B = A × A = B × B = B × A. When the two sets are the same, the order of crossing no longer matters.

Sets are often given in set-builder form, and must be listed before they are crossed. Let \( A = \{x : x \le 3, x \in N\} \) and \( B = \{x : x^2 - 1 = 0\} \). We find A × B, n(A × B), A × A and n(A × A).

Step 1: Listing A. The natural numbers that are not greater than 3 are 1, 2 and 3:

\[ A = \{1, 2, 3\} \]

Step 2: Listing B. Solving \( x^2 - 1 = 0 \) gives \( x^2 = 1 \), so x is 1 or -1:

\[ B = \{-1, 1\} \]

Step 3: Pairing each element of A with each element of B:

\[ \begin{aligned} A \times B = \{&(1, -1), (1, 1), (2, -1), \\ &(2, 1), (3, -1), (3, 1)\} \end{aligned} \]

Step 4: Using the counting rule with \( n(A) = 3 \) and \( n(B) = 2 \):

\[ n(A \times B) = 3 \times 2 = 6 \]

Step 5: Pairing each element of A with each element of A:

\[ \begin{aligned} A \times A = \{&(1, 1), (1, 2), (1, 3), \\ &(2, 1), (2, 2), (2, 3), \\ &(3, 1), (3, 2), (3, 3)\} \end{aligned} \]

Step 6: Counting with the rule:

\[ n(A \times A) = 3 \times 3 = 9 \]

Check your count

After listing a Cartesian product, count your pairs and compare with n(A) × n(B). If the numbers differ, a pair is missing or has been written twice.

Cartesian Product over Intersection and Union

When a third set C comes in, the Cartesian product works well with intersection and union. Let \( A = \{1, 2, 3\} \), \( B = \{3, 4\} \) and \( C = \{-1, 4\} \). We find A × (B ∩ C) and (A × B) ∩ (A × C) and check whether they are equal.

Step 1: Finding the intersection of B and C. The only common element is 4:

\[ B \cap C = \{4\} \]

Step 2: Crossing A with this intersection:

\[ A \times (B \cap C) = \{(1, 4), (2, 4), (3, 4)\} \]

Step 3: Finding A × B:

\[ \begin{aligned} A \times B = \{&(1, 3), (1, 4), (2, 3), \\ &(2, 4), (3, 3), (3, 4)\} \end{aligned} \]

Step 4: Finding A × C:

\[ \begin{aligned} A \times C = \{&(1, -1), (1, 4), (2, -1), \\ &(2, 4), (3, -1), (3, 4)\} \end{aligned} \]

Step 5: Taking only the pairs that appear in both lists:

\[ (A \times B) \cap (A \times C) = \{(1, 4), (2, 4), (3, 4)\} \]

Step 6: Comparing Step 2 with Step 5, the two sets have exactly the same pairs, so:

\[ A \times (B \cap C) = (A \times B) \cap (A \times C) \]

The same sets show the rule for union. Here \( B \cup C = \{-1, 3, 4\} \), so A × (B ∪ C) has \( 3 \times 3 = 9 \) pairs. Joining the 6 pairs of A × B and the 6 pairs of A × C, and writing the 3 shared pairs only once, also gives 9 pairs, and they are the same 9:

\[ \begin{aligned} A \times (B \cup C) = \{&(1, -1), (1, 3), (1, 4), \\ &(2, -1), (2, 3), (2, 4), \\ &(3, -1), (3, 3), (3, 4)\} \end{aligned} \]

Definition

Distributive laws over intersection and union: For any three sets A, B and C, A × (B ∩ C) = (A × B) ∩ (A × C) and A × (B ∪ C) = (A × B) ∪ (A × C).

\[ A \times (B \cap C) = (A \times B) \cap (A \times C) \]

\[ A \times (B \cup C) = (A \times B) \cup (A \times C) \]

Cartesian Product over Difference

The difference of sets follows the same pattern. Let \( A = \{2, 3, 4\} \), \( B = \{3, 4, 5\} \) and \( C = \{4, 5\} \). We find A × (B - C) and (A × B) - (A × C) and check whether they are equal.

Step 1: Finding B - C, the elements of B that are not in C:

\[ B - C = \{3\} \]

Step 2: Crossing A with this difference:

\[ A \times (B - C) = \{(2, 3), (3, 3), (4, 3)\} \]

Step 3: Finding A × B, which has \( 3 \times 3 = 9 \) pairs:

\[ \begin{aligned} A \times B = \{&(2, 3), (2, 4), (2, 5), \\ &(3, 3), (3, 4), (3, 5), \\ &(4, 3), (4, 4), (4, 5)\} \end{aligned} \]

Step 4: Finding A × C, which has \( 3 \times 2 = 6 \) pairs:

\[ \begin{aligned} A \times C = \{&(2, 4), (2, 5), (3, 4), \\ &(3, 5), (4, 4), (4, 5)\} \end{aligned} \]

Step 5: Removing from A × B every pair that is also in A × C. Only the pairs whose second component is 3 are left:

\[ (A \times B) - (A \times C) = \{(2, 3), (3, 3), (4, 3)\} \]

Step 6: Comparing Step 2 with Step 5, the two sets are equal:

\[ A \times (B - C) = (A \times B) - (A \times C) \]

Definition

Distributive law over difference: If A, B and C are non-empty subsets of the universal set, then A × (B - C) = (A × B) - (A × C).

Key idea

Why the laws work: every pair in A × B and in A × C has its first component in A. So whether two pairs match depends only on their second components, and those come from B and C. Whatever you do to B and C, the same thing happens to the pairs.

Rules of Cartesian Product at a Glance

RuleIn symbols
DefinitionA × B = {(a, b) : a ∈ A and b ∈ B}
Order mattersA × B ≠ B × A unless A = B
Equal setsIf B = A, then A × B = A × A = B × B = B × A
Countingn(A × B) = n(A) × n(B)
Over intersectionA × (B ∩ C) = (A × B) ∩ (A × C)
Over unionA × (B ∪ C) = (A × B) ∪ (A × C)
Over differenceA × (B - C) = (A × B) - (A × C)
🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.