girgit.org

Relations and Functions

What is a relation?

The big ideaA relation from \( A \) to \( B \) is a subset of \( A \times B \): out of all possible pairs, it keeps only the ones that obey some rule.

In simple words

First write down every pair you could possibly make. Then cross out the pairs that do not fit your rule, such as "this city is in this state". The pairs left over tell you who is linked to whom. That leftover list is the relation. You can show it as a list, as a rule, or as a picture with arrows from one group to the other.

From all pairs to the pairs that matter

Let \( S = \{\text{Kerala}, \text{Punjab}, \text{Assam}\} \) and \( C = \{\text{Kochi}, \text{Amritsar}, \text{Guwahati}, \text{Ludhiana}\} \). The product \( S \times C \) has \( 3 \times 4 = 12 \) pairs, such as (Kerala, Kochi), (Kerala, Amritsar), (Punjab, Ludhiana) and so on. Most of them are nonsense as facts.

Now keep only the pairs that follow the rule "city \( y \) is in state \( x \)":

\[ R = \{\, (x, y) : y \text{ is a city in the state } x,\ x \in S,\ y \in C \,\} \] \[ R = \{(\text{Kerala}, \text{Kochi}),\ (\text{Punjab}, \text{Amritsar}),\ (\text{Punjab}, \text{Ludhiana}),\ (\text{Assam}, \text{Guwahati})\} \]

The set \( R \) has 4 of the 12 pairs. It is a subset of \( S \times C \). This is exactly what a relation is.

The definition

A relation \( R \) from a non-empty set \( A \) to a non-empty set \( B \) is a subset of the Cartesian product \( A \times B \). The subset is chosen by stating how the first element and the second element of each ordered pair are linked.

\[ R \subset A \times B \]

If \( (x, y) \in R \), we say "\( x \) is related to \( y \)", and we call \( y \) the image of \( x \) under \( R \). In the example, Amritsar and Ludhiana are both images of Punjab. One element can have several images, or none at all.

Three ways to show a relation

NCERT uses all three, and exam questions switch between them.

  1. Roster method: list every ordered pair, as in \( R = \{(1, 4), (2, 4), (2, 6)\} \).
  2. Set-builder method: state the rule, as in \( R = \{\, (x, y) : x \text{ is a factor of } y \,\} \).
  3. Arrow diagram: a picture. Draw two ovals side by side. Write the elements of \( A \) in the left oval and the elements of \( B \) in the right oval. For each pair \( (x, y) \) in \( R \), draw an arrow from \( x \) on the left to \( y \) on the right. An element with no arrow leaving it is not related to anything.

Worked example

\( A = \{2, 3, 5\} \), \( B = \{4, 6, 9, 10\} \). Define \( R = \{\, (x, y) : x \text{ is a factor of } y,\ x \in A,\ y \in B \,\} \). Write \( R \) in roster form and describe its arrow diagram.

  1. 2 divides 4, 6 and 10 (not 9): pairs \( (2, 4), (2, 6), (2, 10) \).
  2. 3 divides 6 and 9: pairs \( (3, 6), (3, 9) \).
  3. 5 divides 10 only: pair \( (5, 10) \).
  4. So \( R = \{(2, 4), (2, 6), (2, 10), (3, 6), (3, 9), (5, 10)\} \).

In the arrow diagram, three arrows leave 2, two arrows leave 3 and one leaves 5. The element 6 receives two arrows (from 2 and from 3), and so does 10 (from 2 and from 5).

Try it: the same \( A \) and \( B \), shown three ways at once. Change the rule, or pick pairs yourself.

Worked example

Write \( R = \{\, (x, x^2) : x \text{ is an odd natural number less than } 8 \,\} \) in roster form.

  1. The odd natural numbers less than 8 are 1, 3, 5, 7.
  2. Square each: 1, 9, 25, 49.
  3. \( R = \{(1, 1), (3, 9), (5, 25), (7, 49)\} \).

Don't mix these up

  • A relation is a set of ordered pairs, not a rule by itself. The rule is just one way to describe that set.
  • "From \( A \) to \( B \)" fixes the order: first elements from \( A \), second elements from \( B \).
  • The empty set \( \phi \) and the whole of \( A \times B \) are both relations from \( A \) to \( B \), since both are subsets of \( A \times B \).

Try it. \( A = \{1, 2, 3, 4\} \), \( B = \{3, 5, 8\} \). Write in roster form the relation \( R = \{\, (x, y) : y - x \text{ is odd},\ x \in A,\ y \in B \,\} \).

Answer
Odd minus even or even minus odd is odd. So odd \( x \) (1, 3) pair with even \( y \) (8), and even \( x \) (2, 4) pair with odd \( y \) (3, 5). \( R = \{(1, 8), (2, 3), (2, 5), (3, 8), (4, 3), (4, 5)\} \).

Words to know

Relation from \( A \) to \( B \)
Any subset of \( A \times B \), usually picked out by a rule.
Image
If \( (x, y) \in R \), then \( y \) is an image of \( x \).
Roster method
Writing a relation as a list of all its ordered pairs.
Set-builder method
Writing a relation by stating the rule its pairs obey.
Arrow diagram
A picture of a relation: arrows from elements of \( A \) to their images in \( B \).

\( A = \{1, 2\} \), \( B = \{1, 2\} \). Which of these is not a relation from \( A \) to \( B \)?

  1. \( \phi \)
  2. \( \{(1, 2), (2, 2)\} \)
  3. \( \{(1, 1), (3, 1)\} \)

\( R = \{\, (x, y) : y = x + 3 \,\} \) on \( A = \{1, 2, 3, 4, 5\} \). Which list is \( R \)?

  1. \( \{(1, 4), (2, 5)\} \)
  2. \( \{(1, 4), (2, 5), (3, 6), (4, 7), (5, 8)\} \)
  3. \( \{(4, 1), (5, 2)\} \)

In an arrow diagram of a relation from \( A \) to \( B \), what does an arrow from \( x \) to \( y \) mean?

  1. \( x = y \)
  2. \( (x, y) \in R \)
  3. \( (y, x) \in R \)