Skip to content

Mathematics · Ch 2 — Relations and Functions

Cartesian Products of Sets

2.2

Cartesian Products of Sets

Ordered Pairs — The Building Block

Before we can talk about the Cartesian product, we need to be absolutely clear about what an ordered pair is. You have seen pairs of numbers before, like coordinates on a graph. The key word here is ordered.

An ordered pair is a pair of elements written in a fixed order, usually inside parentheses: (p,q)(p, q). The element pp is called the first component (or first element), and qq is called the second component. The order matters completely: (p,q)(p, q) is different from (q,p)(q, p) unless p=qp = q.

Important

Equality of ordered pairs: Two ordered pairs (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) are equal if and only if x1=x2x_1 = x_2 and y1=y2y_1 = y_2. Both components must match in their respective positions.

This is the first formal property the book establishes. It is the foundation for everything that follows. If you ever solve for unknowns in ordered pairs, you set the first components equal and the second components equal — that is the only rule.

The Cartesian Product — Definition and First Examples

Given two non-empty sets PP and QQ, the Cartesian product P×QP \times Q (read as "P cross Q") is the set of all possible ordered pairs where the first element comes from PP and the second element comes from QQ.

P×Q={(p,q):p∈P,q∈Q}P \times Q = \{ (p, q) : p \in P, q \in Q \}

If either PP or QQ is the empty set ϕ\phi, then P×QP \times Q is also the empty set: P×ϕ=ϕP \times \phi = \phi and ϕ×Q=ϕ\phi \times Q = \phi.

Let us see this with concrete sets. Suppose A={red,blue}A = \{\text{red}, \text{blue}\} and B={b,c,s}B = \{b, c, s\} (where bb is a bag, cc a coat, ss a shirt). To form A×BA \times B, you take each colour from AA and pair it with every object from BB:

A×B={(red,b),(red,c),(red,s),(blue,b),(blue,c),(blue,s)}A \times B = \{(\text{red}, b), (\text{red}, c), (\text{red}, s), (\text{blue}, b), (\text{blue}, c), (\text{blue}, s)\}

There are 2×3=62 \times 3 = 6 ordered pairs. Notice that (red,b)(\text{red}, b) and (b,red)(b, \text{red}) are not the same thing — the first has a colour first, the second has an object first. They belong to different Cartesian products entirely.

Another example: let A={DL,MP,KA}A = \{DL, MP, KA\} (state codes) and B={01,02,03}B = \{01, 02, 03\} (licence plate number codes). Then:

A×B={(DL,01),(DL,02),(DL,03),(MP,01),(MP,02),(MP,03),(KA,01),(KA,02),(KA,03)}A \times B = \{(DL,01), (DL,02), (DL,03), (MP,01), (MP,02), (MP,03), (KA,01), (KA,02), (KA,03)\}

There are 3×3=93 \times 3 = 9 pairs. This is exactly how licence plate codes are structured — the state code comes first, then the number. The order is not negotiable.

One more: A={a1,a2}A = \{a_1, a_2\} and B={b1,b2,b3,b4}B = \{b_1, b_2, b_3, b_4\} gives:

A×B={(a1,b1),(a1,b2),(a1,b3),(a1,b4),(a2,b1),(a2,b2),(a2,b3),(a2,b4)}A \times B = \{(a_1, b_1), (a_1, b_2), (a_1, b_3), (a_1, b_4), (a_2, b_1), (a_2, b_2), (a_2, b_3), (a_2, b_4)\}

That is 2×4=82 \times 4 = 8 ordered pairs. If AA and BB are subsets of the real numbers, these pairs represent points in the plane — and the point (a1,b2)(a_1, b_2) is clearly different from (b2,a1)(b_2, a_1).

Four Key Remarks (Properties)

The textbook lists four important observations about Cartesian products. Each one is a property you must know.

Remember

Remark (i) — Equality of ordered pairs (restated): Two ordered pairs are equal iff their corresponding first elements are equal and their second elements are equal. This is the definition we already covered, but it is worth repeating because it is the single most used rule when solving problems.

Remark (ii) — Cardinality of a Cartesian product: If n(A)=pn(A) = p and n(B)=qn(B) = q, then n(A×B)=pqn(A \times B) = pq.

This is straightforward: for each of the pp choices for the first component, there are qq choices for the second component. The total number of ordered pairs is the product p×qp \times q.

Watch out

This formula only works when both sets are finite. If either set is infinite, the product is infinite — that is the next remark.

Remark (iii) — Infinite sets: If AA and BB are non-empty and at least one of them is infinite, then A×BA \times B is also infinite. …

Definition 1Cartesian Products of Sets

Definition

Given two non-empty sets PP and QQ, the Cartesian product P×QP \times Q is the set of all ordered pairs (p,q)(p, q) where pp belongs to PP and qq belongs to QQ. In symbols:

P×Q={(p,q):p∈P,  q∈Q}P \times Q = \{ (p, q) : p \in P,\; q \in Q \}

If either PP or QQ is the empty set ϕ\phi, then P×QP \times Q is also the empty set: P×Q=ϕP \times Q = \phi.

Important

The order inside the pair matters. (p,q)(p, q) is not the same as (q,p)(q, p) unless p=qp = q and the sets are the same. Two ordered pairs are equal only when their first elements match and their second elements match.

Intuition

Think of a menu: if PP is a set of 2 drinks (tea, coffee) and QQ is a set of 3 snacks (biscuit, cake, sandwich), then P×QP \times Q lists every possible drink–snack combination. You get 2×3=62 \times 3 = 6 distinct combos, each written as an ordered pair like (tea, biscuit). The order is fixed — (tea, biscuit) is different from (biscuit, tea), which wouldn't even be in the set because biscuit isn't a drink.

Tiny Concrete Example …

Figure 2.1A × B as a lattice of the 6 ordered pairs (A={red, blue}, B={b, c, s})
Fig. 2.1 — A × B as a lattice of the 6 ordered pairs (A={red, blue}, B={b, c, s})

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

Fig 2.1 is a visual representation of the Cartesian product of two small sets. The grid has two columns, labelled red and blue at the bottom, and three rows, labelled b, c, s up the left side. At each of the six intersections — where a column and a row meet — there is a dot. The slate frame around the grid gives it the look of a lattice or a coordinate system.

The physical idea is straightforward: every possible pairing of a colour from the set A={red,blue}A = \{\text{red}, \text{blue}\} with an object from the set B={b,c,s}B = \{b, c, s\} (bag, coat, shirt) is represented by exactly one dot. The dot at the intersection of the red column and the b row, for instance, corresponds to the ordered pair (red, b). The grid makes it obvious that there are 2×3=62 \times 3 = 6 such pairs, and that the order matters — (red, b) is a different dot from (b, red), which would require a different grid entirely.

This figure is the textbook’s concrete introduction to the definition of the Cartesian product. The key formula it leads to is:

A×B={(a,b):a∈A,  b∈B}A \times B = \{(a, b) : a \in A,\; b \in B\}

Here AA and BB are any two non-empty sets. The symbol ×\times is read “cross” — it does not mean multiplication of numbers, but the formation of all ordered pairs. The notation (a,b)(a, b) is an ordered pair: the first element comes from AA, the second from BB. Because the pair is ordered, (a,b)(a, b) is different from (b,a)(b, a) unless a=ba = b.

From the grid, the textbook immediately extracts a counting rule: if n(A)=pn(A) = p and n(B)=qn(B) = q, then the number of elements in A×BA \times B is pqpq. In the figure, p=2p = 2 and q=3q = 3, so n(A×B)=6n(A \times B) = 6. This is not a coincidence — it is a direct consequence of the fact that each of the pp choices for the first coordinate can be paired with each of the qq choices for the second, giving a rectangular array of dots. …

Figure 2.2A × B as a lattice of the 9 pairs (A={DL, MP, KA}, B={01, 02, 03})
Fig. 2.2 — A × B as a lattice of the 9 pairs (A={DL, MP, KA}, B={01, 02, 03})

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

Fig 2.2 is a visual representation of the Cartesian product A×BA \times B, where A={DL,MP,KA}A = \{\text{DL}, \text{MP}, \text{KA}\} and B={01,02,03}B = \{01, 02, 03\}. The figure is a 3×3 grid. Along the bottom (horizontal axis) are the three column labels: DL, MP, KA — these are the elements of set AA, the states. Along the left side (vertical axis) are the three row labels: 01, 02, 03, listed from bottom to top — these are the elements of set BB, the licence plate codes. At each of the nine intersections of a row and a column, an indigo dot is placed. The entire grid is enclosed by slate-coloured frame lines.

The physical idea is straightforward: every possible ordered pair (state, code) is represented by exactly one point in this grid. The dot at the intersection of the row labelled 02 and the column labelled MP, for example, corresponds to the ordered pair (MP, 02). Because the grid has 3 rows and 3 columns, there are 3×3=93 \times 3 = 9 such dots, matching the 9 ordered pairs listed in the textbook.

The key formula this figure illustrates is the cardinality of a Cartesian product:

n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B)

Here n(A)n(A) is the number of elements in set AA, and n(B)n(B) is the number of elements in set BB. In this case, n(A)=3n(A) = 3 and n(B)=3n(B) = 3, so n(A×B)=3×3=9n(A \times B) = 3 \times 3 = 9.

The figure also drives home a crucial point about ordered pairs: the pair (DL, 01) is not the same as (01, DL). In the grid, (DL, 01) is the dot at the intersection of column DL and row 01. The pair (01, DL) would require a different grid — one where the set of first elements is {01,02,03}\{01, 02, 03\} and the set of second elements is {DL,MP,KA}\{\text{DL}, \text{MP}, \text{KA}\} — and would occupy a different position. The grid layout makes this order-dependence visually obvious: the row and column labels are not interchangeable.

Watch out

A common mistake is to think that A×BA \times B and B×AB \times A contain the same pairs. They do not — the order of the elements in each pair matters. The figure for A×BA \times B has the states on the bottom and the codes on the left; swapping the sets would swap the axes, producing a different set of ordered pairs. …

Figure 2.3A × B as a lattice of the 8 pairs (A={a₁, a₂}, B={b₁..b₄})
Fig. 2.3 — A × B as a lattice of the 8 pairs (A={a₁, a₂}, B={b₁..b₄})

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

Fig. 2.3 is a visual representation of the Cartesian product A×BA \times B for the specific sets A={a1,a2}A = \{a_1, a_2\} and B={b1,b2,b3,b4}B = \{b_1, b_2, b_3, b_4\}. The figure is a simple grid: a 2‑column by 4‑row lattice. The two columns are labelled at the bottom with a1a_1 and a2a_2 (the elements of AA). The four rows are labelled on the left with b1,b2,b3,b4b_1, b_2, b_3, b_4, listed from bottom to top. At each of the 2×4=82 \times 4 = 8 intersections of a column and a row, a dot is placed. Each dot corresponds to exactly one ordered pair: the column gives the first coordinate (from AA), and the row gives the second coordinate (from BB).

The physical idea is that the Cartesian product A×BA \times B can be thought of as a grid of points — a lattice — in a plane. If AA and BB are subsets of the real numbers, then each ordered pair (ai,bj)(a_i, b_j) is the coordinate of a point in the plane. The figure makes it clear that the pair (a1,b2)(a_1, b_2) is a different point from (a2,b1)(a_2, b_1); the order matters. The grid layout also makes it obvious that the total number of ordered pairs is the product of the number of elements in AA and the number in BB.

n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B)

Here n(A)=2n(A) = 2, n(B)=4n(B) = 4, so n(A×B)=2×4=8n(A \times B) = 2 \times 4 = 8. This is the central counting formula the textbook develops with this figure. The figure itself is a concrete, visual proof of that formula: you can count the dots.

Watch out

The grid in Fig. 2.3 is not a standard xyxy-coordinate plane. The axes are not numerical; they are labelled with set elements. The vertical axis uses b1,b2,b3,b4b_1, b_2, b_3, b_4 (in that order from bottom to top), and the horizontal axis uses a1,a2a_1, a_2. The figure is a schematic of the product set, not a graph of a function. …