Chapter 1: Relations and Functions
Relations and their types
A relation R from a set A to a set B is any subset of A ร B. A relation in A is a subset of A ร A. If (a, b) โ R, we write a R b.
- Empty relation: R = ฯ. No element is related to any element.
- Universal relation: R = A ร A. Every element is related to every element.
Reflexive, symmetric and transitive relations
A relation R in a set A is called:
- Reflexive if (a, a) โ R for every a โ A.
- Symmetric if (aโ, aโ) โ R implies (aโ, aโ) โ R.
- Transitive if (aโ, aโ) โ R and (aโ, aโ) โ R imply (aโ, aโ) โ R.
A relation with all three properties is an equivalence relation.
Tip: To prove a property, argue with general elements. To show a property fails, one counter example is enough.
Equivalence classes
In Z, let R = {(a, b) : 2 divides a โ b}. It is an equivalence relation. Everything related to 0 is an even number and everything related to 1 is an odd number. These sets are written [0] and [1].
Every equivalence relation splits the set into disjoint parts: elements of one part are all related to each other, elements of different parts are not related, and the parts together make the whole set. These parts are the equivalence classes.
Types of functions
For f : X โ Y:
- One-one (injective): f(xโ) = f(xโ) implies xโ = xโ. Otherwise f is many-one.
- Onto (surjective): every element of Y is an image of some element of X, i.e. range = co-domain.
- Bijective: both one-one and onto.
For a finite set X, f : X โ X is one-one exactly when it is onto. This fails for infinite sets: f : N โ N, f(x) = 2x is one-one but not onto. The number of one-one functions from an n-element set to itself is n!.
Composition and invertible functions
For f : A โ B and g : B โ C, the composition is gof(x) = g(f(x)). First f acts, then g. In general gof โ fog.
A function f : X โ Y is invertible if some g : Y โ X satisfies gof = I_X and fog = I_Y. Then g = fโปยน. A function is invertible if and only if it is one-one and onto.
Exam tips
- Write all three properties separately when proving an equivalence relation.
- For one-one start with f(xโ) = f(xโ). For onto take y and solve for x.
- Always state the domain and co-domain.
At a glance
| Topic | Remember |
|---|---|
| Reflexive | (a, a) โ R for all a |
| Symmetric | (a, b) โ R โ (b, a) โ R |
| Transitive | (a, b), (b, c) โ R โ (a, c) โ R |
| One-one | f(xโ) = f(xโ) โ xโ = xโ |
| Onto | range = co-domain |
| gof | gof(x) = g(f(x)) |
| One-one functions from an n-set to itself | n! |
| Relations on an n-element set | 2^(nยฒ) |
| Reflexive relations on an n-element set | 2^(nยฒ โ n) |
Common mistakes
- Proving a property from a single example. One example only disproves a property.
- Forgetting the domain and co-domain. f(x) = 2x is onto on R โ R but not on N โ N.
- Reading gof as fog. In gof, f acts first.
- Mixing up symmetric (two elements) and transitive (three elements).
More practice questions
- Is R = {(a, b) : a + b is even} an equivalence relation on {1, 2, 3, 4}? Find its classes.
- Check R = {(a, b) : a divides b} on N.
- R = {(a, b) : 5 divides a โ b} on Z is an equivalence relation. How many classes does it have?
- Find the inverse of f : R โ R, f(x) = 5x โ 7.
- Is f : N โ N, f(x) = xยฒ one-one? Onto?
- For f(x) = x + 2 and g(x) = xยฒ, find gof and fog and compare them at x = 1.
- How many one-one functions map {1, 2, 3, 4} to itself? How many reflexive relations exist on a 3-element set?
- Is R = {(1, 1), (2, 2), (3, 3), (1, 3), (3, 1)} an equivalence relation on {1, 2, 3}?
Answers:
- Yes. a + b is even exactly when a and b have the same parity. Classes: {1, 3} and {2, 4}.
- Reflexive and transitive but not symmetric (2 divides 4, but 4 does not divide 2).
- 5 classes: [0], [1], [2], [3], [4].
- y = 5x โ 7 gives fโปยน(y) = (y + 7)/5.
- One-one, but not onto, since 2 is not a perfect square.
- gof(x) = (x + 2)ยฒ and fog(x) = xยฒ + 2. At x = 1 they give 9 and 3, so they differ.
- 4! = 24 functions, and 2^(9 โ 3) = 64 reflexive relations.
- Yes. All three properties hold. Classes: {1, 3} and {2}.
Important questions
Q1. Define a relation.
A relation R from A to B is any subset of A ร B. If (a, b) โ R, a is related to b.
Q2. What are the empty and universal relations? Give an example.
In the empty relation no element is related to any element (R = ฯ). In the universal relation every element is related to every element (R = A ร A). In a boys' school, "a is a sister of b" is empty. "The difference of heights of a and b is less than 3 metres" is universal.
Q3. Define reflexive, symmetric and transitive relations.
Reflexive: (a, a) โ R for all a. Symmetric: (a, b) โ R โ (b, a) โ R. Transitive: (a, b), (b, c) โ R โ (a, c) โ R.
Q4. What is an equivalence relation?
A relation that is reflexive, symmetric and transitive.
Q5. Check R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 3)} in {1, 2, 3}.
Reflexive, since (1, 1), (2, 2), (3, 3) โ R. Not symmetric, as (1, 2) โ R but (2, 1) โ R. Not transitive, as (1, 2), (2, 3) โ R but (1, 3) โ R.
Q6. Prove that R = {(a, b) : 2 divides a โ b} in Z is an equivalence relation.
Reflexive: a โ a = 0 is divisible by 2. Symmetric: if 2 divides a โ b, it divides b โ a. Transitive: if 2 divides a โ b and b โ c, it divides their sum a โ c. So R is an equivalence relation.
Q7. What are [0] and [1] for this relation?
[0] is the set of all even integers and [1] is the set of all odd integers. They are disjoint and their union is Z.
Q8. Check R = {(a, b) : b = a + 1} in {1, 2, 3, 4, 5, 6}.
R = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)}. Not reflexive: (1, 1) โ R. Not symmetric: (1, 2) โ R but (2, 1) โ R. Not transitive: (1, 2), (2, 3) โ R but (1, 3) โ R.
Q9. Show that R = {(a, b) : a โค b} in the real numbers is reflexive and transitive but not symmetric.
a โค a, so reflexive. a โค b and b โค c give a โค c, so transitive. But 1 โค 2 is true while 2 โค 1 is false, so not symmetric.
Q10. Show that R = {(a, b) : a โค bยฒ} in the real numbers is neither reflexive, nor symmetric, nor transitive.
Not reflexive: a = 1/2 gives 1/2 โค 1/4, false. Not symmetric: (1, 4) โ R since 1 โค 16, but (4, 1) โ R since 4 โค 1 is false. Not transitive: (10, 4) โ R (10 โค 16) and (4, 2) โ R (4 โค 4), but (10, 2) โ R.
Q11. Show that R = {(1, 2), (2, 1)} in {1, 2, 3} is symmetric but neither reflexive nor transitive.
Symmetric, as (2, 1) accompanies (1, 2). Not reflexive: (1, 1) โ R. Not transitive: (1, 2), (2, 1) โ R but (1, 1) โ R.
Q12. "Tโ is similar to Tโ" is an equivalence relation on triangles. For triangles with sides (3, 4, 5), (5, 12, 13) and (6, 8, 10), which are related?
Similarity is reflexive, symmetric and transitive. (6, 8, 10) = 2 ร (3, 4, 5), so the first and third triangles are related. The (5, 12, 13) triangle has different side ratios, so it is related to neither.
Q13. Define one-one and onto. Check f : N โ N, f(x) = 2x.
One-one: f(xโ) = f(xโ) โ xโ = xโ. Onto: every element of the co-domain has a pre-image. Here 2xโ = 2xโ gives xโ = xโ, so f is one-one. But no x โ N gives 2x = 1, so f is not onto.
Q14. Show that f : R โ R, f(x) = xยฒ is neither one-one nor onto.
f(โ1) = f(1) = 1 with โ1 โ 1, so not one-one. The value โ2 in the co-domain is never a square, so not onto.
Q15. Show that f : R โ R, f(x) = 3 โ 4x is bijective.
3 โ 4xโ = 3 โ 4xโ gives xโ = xโ, so one-one. For any y take x = (3 โ y)/4. Then f(x) = y, so onto.
Q16. f(x) = 1/x is bijective on R* (non-zero reals). What if the domain is N and the co-domain is still R*?
On R*: 1/xโ = 1/xโ gives xโ = xโ, and for any y take x = 1/y. With domain N it stays one-one but is not onto, because 1/x is never negative, so โ1 has no pre-image.
Q17. How do one-one and onto relate for finite and infinite sets?
For a finite set X, f : X โ X is one-one if and only if it is onto. For infinite sets this need not hold: f : N โ N, f(x) = 2x is one-one but not onto.
Q18. For f(x) = cos x and g(x) = 3xยฒ, find gof and fog. Are they equal?
gof(x) = g(cos x) = 3cosยฒx and fog(x) = f(3xยฒ) = cos(3xยฒ). At x = 0, gof(0) = 3 and fog(0) = 1. So gof โ fog.
Q19. f : N โ Y, f(x) = 4x + 3 (Y is the range of f) is invertible. Find the inverse.
From y = 4x + 3, x = (y โ 3)/4. Define g(y) = (y โ 3)/4. Then gof(x) = (4x + 3 โ 3)/4 = x and fog(y) = 4(y โ 3)/4 + 3 = y. So g is the inverse of f.
Q20. If Rโ and Rโ are equivalence relations in A, prove that Rโ โฉ Rโ is one too.
Reflexive: (a, a) lies in both, so in the intersection. Symmetric: if (a, b) is in both, so is (b, a). Transitive: if (a, b) and (b, c) are in both, then (a, c) is in both. Hence Rโ โฉ Rโ is an equivalence relation.
Quiz
1. Which statement is true for R = {(1, 2), (2, 2), (1, 1), (4, 4), (1, 3), (3, 3), (3, 2)} in {1, 2, 3, 4}?
All the pairs (a, a) are present, so it is reflexive. (1, 2) is in R but (2, 1) is not, so it is not symmetric. Checking every pair with a matching middle element shows the required pair is always in R, so it is transitive.
2. For f : R โ R, f(x) = xโด, which is true?
f(โ1) = f(1) = 1, so it is not one-one. No fourth power is negative, so โ1 has no pre-image and f is not onto.
3. For f : N โ N, f(x) = x + 1, which is true?
x + 1 = y + 1 gives x = y, so it is one-one. For 1 we would need x = 0, which is not in N, so it is not onto.
4. If f(x) = x + 1 and g(x) = 2x, what is gof(3)?
gof(3) = g(f(3)) = g(4) = 8.
5. How many equivalence relations on A = {1, 2, 3} contain (1, 2)?
There are only two: the relation with the classes {1, 2} and {3}, and the universal relation. If 3 is related to 1 or 2, symmetry and transitivity make every pair related.