Curvingo · Made in India

Glossary

Select one of the keywords on the left…

Relations and FunctionsCartesian Products of Sets

Reading time: ~30 min

At the school's Diwali mela, Riya runs a dyeing stall. She has dye in two colours, red and blue, and three plain things to dye: a bag (b), a coat (c) and a shirt (s). Each customer picks one colour and one thing. How many different coloured things can Riya offer?

Call the set of colours A = {red, blue} and the set of things B = {b, c, s}. Throughout this chapter, elements of the first set are blue, elements of the second set are green, and the pairs that link them are purple.

Make every coloured thing Riya can offer. Tap a colour, then a thing — the pair lands on the grid. Stop when there is no new pair left to make.

You made 6 pairs: (red, b), (red, c), (red, s), (blue, b), (blue, c), (blue, s). Look at how each one is written: colour first, thing second. A pair written in brackets with its order fixed like this is an ordered pair: for any sets P and Q, the ordered pair (p, q) with p \in P and q \in Q puts p first and q second.

Definition 1: Let P and Q be two non-empty sets. The cartesian product P \times Q is the set of all ordered pairs whose first element comes from P and whose second element comes from Q:

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

So Riya's whole menu is A \times B = {(red, b), (red, c), (red, s), (blue, b), (blue, c), (blue, s)}. If either set is the null set — say Riya runs out of dye — there is nothing to pair, so P \times \phi = \phi: the product is .

Codes on Number Plates

Order matters even more when pairs are used as codes. Suppose three states — Delhi (DL), Madhya Pradesh (MP) and Karnataka (KA) — make number-plate codes that start with a state from A = {DL, MP, KA} and end with a number from B = {01, 02, 03}.

Every dot of the grid is one code, so A \times B holds 3 × 3 = 9 codes: (DL, 01), (DL, 02), (DL, 03), (MP, 01), (MP, 02), (MP, 03), (KA, 01), (KA, 02) and (KA, 03).

Which of these is not a code in A \times B?

(DL, 02)
(KA, 03)
(01, DL)
(MP, 01)

Order is everything

(01, DL) has its entries the wrong way round: the first entry of a pair in A \times B must come from A. Swapping the two entries of an ordered pair gives a different pair, unless the two entries are equal. That is why A \times B and B \times A are, in general, different sets.

As a final illustration, take A = \{a_1, a_2\} and B = \{b_1, b_2, b_3, b_4\}. Now A \times B has 2 × 4 = 8 ordered pairs. When A and B are sets of real numbers, each pair can be read as the position of a point in the plane — and the point (a_1, b_2) is a different point from (b_2, a_1).

How Many Pairs?

Riya had 2 colours and 3 things, and got 2 × 3 = 6 pairs; the number plates had 3 × 3 = 9 codes. Let A have p elements and B have q elements.

Drag p and q. Find all four ways to make a product A \times B with exactly 12 ordered pairs.

n(A) = p = ${p}

n(B) = q = ${q}

Remarks

(i) Two ordered pairs are equal exactly when their first elements are equal and their second elements are equal: (a, b) = (x, y) means a = x and b = y.

(ii) If n(A) = p and n(B) = q, then n(A \times B) = pq.

(iii) If A and B are non-empty and either of them is , then A \times B is infinite too.

(iv) Three sets can be multiplied as well: A \times A \times A = \{(a, b, c) : a, b, c \in A\}. Here (a, b, c) is called an ordered triplet.

Two quick examples, one on equal pairs and one on order.

Example 1 : If (x + 1, y - 2) = (3, 1), find the values of x and y.

Solution : Equal ordered pairs have equal first elements and equal second elements, so x + 1 = 3 and y - 2 = 1. Hence x = and y = .

Example 2 : If P = {a, b, c} and Q = {r}, form the sets P × Q and Q × P. Are these two products equal?

Solution : By the definition, P × Q = {(a, r), (b, r), (c, r)} and Q × P = {(r, a), (r, b), (r, c)}. The pair (a, r) is to the pair (r, a), because their first elements differ. So P × Q ≠ Q × P — even though both products have the number of elements, 3.

Products Meet Unions and Intersections

Example 3 : Let A = {1, 2, 3}, B = {3, 4} and C = {4, 5, 6}. Find

(i) A \times (B \cap C)    (ii) (A \times B) \cap (A \times C)

(iii) A \times (B \cup C)    (iv) (A \times B) \cup (A \times C)

Every dot of the grid below is a pair (a, y) with a from A. The blue bar marks the rows that belong to B and the green bar the rows that belong to C.

Tap each part, (i) to (iv), and watch which dots light up.

Solution : (i) B \cap C = \{4\}, so A \times (B \cap C) = \{(1, 4), (2, 4), (3, 4)\}.

(ii) A × B = {(1, 3), (1, 4), (2, 3), (2, 4), (3, 3), (3, 4)} and A × C = {(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)}. The pairs in both lists are (1, 4), (2, 4) and (3, 4), so (A × B) (A × C) = {(1, 4), (2, 4), (3, 4)} — the same set as in (i).

(iii) B \cup C = \{3, 4, 5, 6\}, so A \times (B \cup C) has 3 × 4 = pairs: (1, 3), (1, 4), (1, 5), (1, 6), (2, 3), (2, 4), (2, 5), (2, 6), (3, 3), (3, 4), (3, 5), (3, 6).

(iv) Putting the lists of A × B and A × C from part (ii) together gives the same twelve pairs, so (A × B) ∪ (A × C) = A × (B ∪ C).

Tip

What you just saw holds for all sets: A \times (B \cap C) = (A \times B) \cap (A \times C) and A \times (B \cup C) = (A \times B) \cup (A \times C). The product "spreads over" intersections and unions.

Products of three sets, and the most famous product of all.

Example 4 : If P = {1, 2}, form the set P × P × P.

Solution : Each triplet has three places, and each place can hold 1 or 2, so there are 2 × 2 × 2 = triplets: P × P × P = {(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2), (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)}.

Example 5 : If R is the set of all real numbers, what do the products R × R and R × R × R represent?

Solution : \mathbf{R} \times \mathbf{R} = \{(x, y) : x, y \in \mathbf{R}\} is the set of coordinates of all the points of the : two-dimensional space. In the same way, \mathbf{R} \times \mathbf{R} \times \mathbf{R} = \{(x, y, z) : x, y, z \in \mathbf{R}\} is the set of coordinates of all the points of three-dimensional space.

A well-known story says that Descartes got this idea while watching a fly on his ceiling: two numbers — how far along, how far up — pin down exactly where the fly is. That is why these products carry his name: Cartesian products.

Example 6 : If A × B = {(p, q), (p, r), (m, q), (m, r)}, find A and B.

Solution : A is the set of elements of the pairs, so A = {p, m}, and B is the set of second elements, so B = {q, r}.

Speed Round: In or Out?

Read the two sets, then decide: is the pair in A \times B? Or how many pairs does it have? After each answer you will see why.

Get five right to move on.

Sina