girgit.org

Relations and Functions

Counting and using A × B

The big ideaTwo ordered pairs are equal only when their first elements match and their second elements match, and if \( A \) has \( p \) elements and \( B \) has \( q \), then \( A \times B \) has \( pq \).

In simple words

Two tickets are the same only if they start at the same place and end at the same place. If you have 4 shirts and 3 pairs of trousers, you can dress in 4 times 3, that is 12, ways. And if you let both numbers be any number on the number line, the pairs you make fill a whole flat sheet: the graph paper you draw on.

When are two ordered pairs equal?

Two ordered pairs are equal if and only if their first elements are equal and their second elements are equal:

\[ (a, b) = (x, y) \;\Leftrightarrow\; a = x \text{ and } b = y \]

This turns one equation between pairs into two ordinary equations, which is how most questions on it are solved.

Worked example

Find \( x \) and \( y \) if \( (2x - 1,\ y + 4) = (7,\ -2) \).

  1. First elements equal: \( 2x - 1 = 7 \), so \( 2x = 8 \) and \( x = 4 \).
  2. Second elements equal: \( y + 4 = -2 \), so \( y = -6 \).
  3. Check: \( (2 \cdot 4 - 1,\ -6 + 4) = (7, -2) \). Correct.

How many pairs?

Each of the \( p \) elements of \( A \) is paired with each of the \( q \) elements of \( B \). That is \( q \) pairs, \( p \) times over:

\[ n(A) = p,\ n(B) = q \;\Rightarrow\; n(A \times B) = pq \]

Here \( n(A) \) means "the number of elements in \( A \)". Some consequences:

  • \( n(A \times B) = n(B \times A) \), because \( pq = qp \). The two sets have the same size even though, in general, \( A \times B \ne B \times A \).
  • If \( A \) and \( B \) are non-empty and either one is infinite, then \( A \times B \) is infinite too. For example \( \{0, 1\} \times \mathbf{N} \) never runs out of pairs.

Ordered triplets

We can take products of three sets too. The product of a set with itself three times is

\[ A \times A \times A = \{\, (a, b, c) : a, b, c \in A \,\} \]

Here \( (a, b, c) \) is an ordered triplet: three objects in a fixed order. If \( n(A) = p \), then \( A \times A \times A \) has \( p \cdot p \cdot p = p^3 \) elements.

For \( A = \{0, 1\} \): \( A \times A \times A = \{(0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1)\} \). That is \( 2^3 = 8 \) triplets, the same as all the three-digit codes you can make with 0 and 1.

R × R and R × R × R

Take \( \mathbf{R} \), the set of all real numbers. Then

\[ \mathbf{R} \times \mathbf{R} = \{\, (x, y) : x, y \in \mathbf{R} \,\} \]

is the set of the coordinates of every point of the plane: the \( xy \)-plane of coordinate geometry. 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 the coordinates of every point in three-dimensional space. You will meet it again in the chapter on three-dimensional geometry.

Try it: start from a few dots and widen the sets until \( A \times B \) fills the plane.

Products with unions and intersections

A product spreads over \( \cap \) and \( \cup \), much like multiplication spreads over addition:

\[ A \times (B \cap C) = (A \times B) \cap (A \times C), \qquad A \times (B \cup C) = (A \times B) \cup (A \times C) \]

Worked example

Let \( A = \{1, 2\} \), \( B = \{a, b\} \), \( C = \{b, c\} \). Check the first law.

  1. \( B \cap C = \{b\} \), so \( A \times (B \cap C) = \{(1, b), (2, b)\} \).
  2. \( A \times B = \{(1, a), (1, b), (2, a), (2, b)\} \) and \( A \times C = \{(1, b), (1, c), (2, b), (2, c)\} \).
  3. The pairs common to both are \( (1, b) \) and \( (2, b) \). Same answer as step 1.

Working backwards from A × B

If you are given \( A \times B \), you can recover the sets: \( A \) is the set of all first elements and \( B \) the set of all second elements.

Worked example

\( A \times B = \{(u, 3), (u, 8), (v, 3), (v, 8), (w, 3), (w, 8)\} \). Find \( A \) and \( B \).

  1. First elements: \( u, v, w \). So \( A = \{u, v, w\} \).
  2. Second elements: \( 3, 8 \). So \( B = \{3, 8\} \).
  3. Check: \( n(A) \cdot n(B) = 3 \cdot 2 = 6 \), and there are 6 pairs.

Remember

  • \( (a, b) = (x, y) \Leftrightarrow a = x \) and \( b = y \).
  • \( n(A \times B) = n(A) \cdot n(B) \), and \( A \times \phi = \phi \).
  • In general \( A \times B \ne B \times A \).
  • \( \mathbf{R} \times \mathbf{R} \) is the plane; \( \mathbf{R} \times \mathbf{R} \times \mathbf{R} \) is space.

Try it. (a) \( n(A) = 4 \) and \( A \times B \) has 20 elements. Find \( n(B) \). (b) \( A \times A \) has 9 elements, two of which are \( (2, 5) \) and \( (5, 0) \). Find \( A \) and list \( A \times A \).

Answer
(a) \( 4 \cdot n(B) = 20 \), so \( n(B) = 5 \). (b) \( n(A)^2 = 9 \), so \( A \) has 3 elements. The pairs show that 2, 5 and 0 are all in \( A \), so \( A = \{0, 2, 5\} \). Then \( A \times A = \{(0,0), (0,2), (0,5), (2,0), (2,2), (2,5), (5,0), (5,2), (5,5)\} \).

Words to know

Equal ordered pairs
Pairs whose first elements match and whose second elements match.
\( n(A) \)
The number of elements in a finite set \( A \).
Ordered triplet \( (a, b, c) \)
Three objects written in a fixed order.
\( \mathbf{R} \times \mathbf{R} \)
All pairs of real numbers: the coordinates of every point in the plane.
\( \mathbf{R} \times \mathbf{R} \times \mathbf{R} \)
All triplets of real numbers: the coordinates of every point in space.

If \( (x + 2,\ 5) = (6,\ y - 1) \), what are \( x \) and \( y \)?

  1. \( x = 3,\ y = 7 \)
  2. \( x = 4,\ y = 6 \)
  3. \( x = 4,\ y = 4 \)

\( n(A) = 3 \) and \( n(B) = 5 \). How many elements does \( B \times A \) have?

  1. \( 8 \)
  2. \( 15 \)
  3. It depends on the order, so it cannot be found

Which set gives the coordinates of every point in the \( xy \)-plane?

  1. \( \mathbf{R} \)
  2. \( \mathbf{R} \times \mathbf{R} \)
  3. \( \mathbf{Z} \times \mathbf{Z} \)