Relations: domain, co-domain and range
A relation from A to B is any subset of A × B. Its first entries form the domain; its second entries form the range, inside the co-domain B.
What a relation is
A relation R from A to B links some elements of A to some elements of B. It is a subset of A × B. When (a, b) ∈ R, we say a is related to b and may write a R b. The empty set ∅ is also a relation; it is called the null relation.
Three sets to name
- Domain: the set of all first coordinates of the pairs in R.
- Co-domain: the whole set B, whether or not every element is used.
- Range: the set of all second coordinates of the pairs in R.
- The range is always a subset of the co-domain. They may or may not be equal.
How to draw an arrow diagram of a relation
- 1Draw two ovals side by side. Label the left oval A and the right oval B.
- 2Write the elements of A inside the left oval and the elements of B inside the right oval, one below the other.
- 3For each pair (a, b) in R, draw an arrow from a to b.
- 4Write the name of the relation, R, above the arrows.
Example 1: domain, co-domain and range
Let A = {1, 2, 3, 4} and B = {3, 6, 9, 12, 15}. A relation R from A to B is given by R = {(a, b) | b = 3a}. Write R in roster form and find its domain, co-domain and range.
- For a = 1, b = 3; for a = 2, b = 6; for a = 3, b = 9; for a = 4, b = 12.
- R = {(1, 3), (2, 6), (3, 9), (4, 12)}
- Domain = {1, 2, 3, 4}
- Co-domain = B = {3, 6, 9, 12, 15}
- Range = {3, 6, 9, 12}
Domain {1, 2, 3, 4}, co-domain {3, 6, 9, 12, 15}, range {3, 6, 9, 12}. Range ≠ co-domain, because 15 has no partner.
Example 2: counting relations
A = {p, q} and B = {1, 2, 3}. How many relations are there from A to B?
- n(A × B) = 2 × 3 = 6.
- Every subset of A × B is a relation from A to B.
- A set with 6 elements has 2⁶ subsets.
- 2⁶ = 64.
There are 64 relations from A to B, including the null relation.
In a class survey, the relation 'student → favourite millet' links each student to ragi, kambu or thinai. The millets actually chosen form the range; every millet on the list forms the co-domain.
2 marks: “Let A = {2, 5, 6} and B = {1, 4, 9}. Is (i) R₁ = {(2, 4), (5, 9), (6, 1)} and (ii) R₂ = {(2, 1), (5, 3)} a relation from A to B?” R₁ ⊆ A × B, so R₁ is a relation. R₂ is not, because 3 ∉ B, so (5, 3) ∉ A × B.
2 marks: “If n(A) = 2 and n(B) = 2, how many relations are there from A to B?” n(A × B) = 4, so there are 2⁴ = 16 relations.
5 marks: “Let A = {1, 2, 3, 4} and B = {2, 5, 7, 10, 17, 20}. R = {(x, y) | y = x² + 1} is a relation from A to B. Write R in roster form, find its domain, co-domain and range, and draw its arrow diagram.” R = {(1, 2), (2, 5), (3, 10), (4, 17)}. Domain {1, 2, 3, 4}; co-domain B; range {2, 5, 10, 17}. Arrow diagram: two labelled ovals with four arrows, 1 → 2, 2 → 5, 3 → 10, 4 → 17; 7 and 20 receive no arrow.
Domain = first entries, range = second entries used, co-domain = the whole second set.