Relations and Functions : Detailed Notes, Solved Examples & Exam Questions | Grade 11 Mathematics Unit 1
Welcome, dear student! In this lesson we will learn about Relations and Functions, which is Unit 1 of your Grade 11 Mathematics. This topic is the foundation for many topics you will see later, so take your time and understand each part well. Ready? Let us start!
1. Ordered Pairs and Cartesian Product
1.1 Ordered Pair
Have you ever plotted a point like \( (3, 5) \) on a graph? That is an ordered pair. It means the first number is \( 3 \) and the second number is \( 5 \).
The most important thing about an ordered pair is that order matters. So \( (3, 5) \) is NOT the same as \( (5, 3) \).
Example 1: Which of the following ordered pairs are equal?
\( (4, 7),\; (7, 4),\; (4, 7),\; (4, 8) \)
1.2 Cartesian Product of Two Sets
Now, what if we have two sets and we want to form ALL possible ordered pairs by taking one element from each set? That is called the Cartesian product.
Notice carefully: \( A \times B \) is generally NOT the same as \( B \times A \). Why? Because the order in an ordered pair matters!
Example 2: Let \( A = \{1, 2\} \) and \( B = \{3, 4\} \). Find \( A \times B \) and \( B \times A \).
\( A \times B = \{(1, 3), (1, 4), (2, 3), (2, 4)\} \)
\( B \times A = \{(3, 1), (3, 2), (4, 1), (4, 2)\} \)
Can you see that \( A \times B \neq B \times A \)? The ordered pairs are different!
Example 3: Let \( A = \{1, 2, 3\} \). Find \( A \times A \).
\( A \times A = \{(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)\} \)
This has \( 3 \times 3 = 9 \) ordered pairs. In general, if \( A \) has \( n \) elements, then \( A \times A \) has \( n^2 \) elements.
Quick question for you: If set \( A \) has \( 4 \) elements and set \( B \) has \( 5 \) elements, how many ordered pairs are in \( A \times B \)? Think for a moment!
Answer:
\( A \times B = \{(a,1), (a,2), (a,3), (b,1), (b,2), (b,3)\} \)
Number of elements \( = 2 \times 3 = 6 \).
Practice Question 2: If \( A \times B \) has \( 20 \) elements and \( A \) has \( 4 \) elements, how many elements does \( B \) have?
Answer:
\( n(A \times B) = n(A) \times n(B) \), so \( 20 = 4 \times n(B) \), giving \( n(B) = 5 \).
Practice Question 3: Is \( A \times B = B \times A \) always true? Give a reason.
Answer:
No. For example, if \( A = \{1\} \) and \( B = \{2\} \), then \( A \times B = \{(1,2)\} \) but \( B \times A = \{(2,1)\} \). Since \( (1,2) \neq (2,1) \), the two products are not equal. They are equal only when \( A = B \).
2. Relations
2.1 What is a Relation?
In everyday life, you have relations with people, your teacher, your neighbour. In mathematics, a relation connects elements from one set to elements of another set through a rule or condition.
Every element of a relation is an ordered pair \( (a, b) \) where \( a \in A \) and \( b \in B \). If \( (a, b) \in R \), we say “\( a \) is related to \( b \)” and write \( aRb \).
Think of it this way: from all possible ordered pairs in \( A \times B \), we select some of them based on a rule. Those selected pairs form the relation.
Example 4: Let \( A = \{1, 2, 3, 4\} \). Define a relation \( R \) on \( A \) by the rule “is less than.” Write \( R \) as a set of ordered pairs.
\( R = \{(1,2), (1,3), (1,4), (2,3), (2,4), (3,4)\} \)
Note: There is no pair starting with \( 4 \) because no element in \( A \) is greater than \( 4 \).
Example 5: Let \( A = \{2, 3, 5, 7\} \) and \( B = \{1, 2, 3, 4\} \). Define relation \( R \) from \( A \) to \( B \) as “\( a \) is divisible by \( b \).” Find \( R \).
\( 2 \) is divisible by \( 1, 2 \) → \( (2,1), (2,2) \)
\( 3 \) is divisible by \( 1, 3 \) → \( (3,1), (3,3) \)
\( 5 \) is divisible by \( 1 \) → \( (5,1) \)
\( 7 \) is divisible by \( 1 \) → \( (7,1) \)
So \( R = \{(2,1), (2,2), (3,1), (3,3), (5,1), (7,1)\} \)
2.2 Representing Relations
A relation can be shown in several ways:
(a) Set of ordered pairs: Just listing them, as we did above.
(b) Arrow diagram: Draw two ovals for sets \( A \) and \( B \), write elements inside, and draw arrows from elements in \( A \) to related elements in \( B \).
(c) Table form:
| \( a \) (from A) | \( b \) (from B) | Rule: \( a \) divisible by \( b \) |
|---|---|---|
| 2 | 1 | Yes |
| 2 | 2 | Yes |
| 3 | 1 | Yes |
| 3 | 3 | Yes |
| 5 | 1 | Yes |
| 7 | 1 | Yes |
2.3 Domain, Range and Codomain
These three terms are VERY important. Many students confuse them, so pay close attention!
Domain of a relation \( R \): The set of all first components of the ordered pairs in \( R \).
Range of a relation \( R \): The set of all second components of the ordered pairs in \( R \).
Codomain: The set \( B \) (the second set in \( A \times B \)). The range is always a subset of the codomain.
Example 6: Let \( A = \{1, 2, 3, 4, 5\} \), \( B = \{1, 2, 3, 4, 5, 6, 7\} \), and \( R = \{(1,3), (2,5), (3,7), (4,3), (5,1)\} \). Find the domain, range, and codomain.
Domain = set of first components = \( \{1, 2, 3, 4, 5\} \)
Range = set of second components = \( \{3, 5, 7, 1\} = \{1, 3, 5, 7\} \) (order does not matter in a set)
Codomain = \( B = \{1, 2, 3, 4, 5, 6, 7\} \)
Notice: Range \( \{1, 3, 5, 7\} \subseteq \) Codomain \( \{1, 2, 3, 4, 5, 6, 7\} \). The elements \( 2, 4, 6 \) are in the codomain but NOT in the range. This is perfectly fine!
Think about this: Can the range ever be LARGER than the codomain? No! The range is always a subset of the codomain.
• Domain = all first elements of ordered pairs in \( R \).
• Range = all second elements of ordered pairs in \( R \) (written as a set, no repeats).
• Codomain = the set \( B \) from which second elements are taken.
• Range \( \subseteq \) Codomain (always true).
• Domain \( \subseteq A \) (always true, since \( R \subseteq A \times B \)).
Answer: Domain \( = \{2, 3, 4, 5\} \), Range \( = \{8, 27, 64, 125\} \).
Practice Question 2: A relation \( R \) from \( A = \{1, 2, 3, 4\} \) to \( B = \{x, y, z\} \) is \( R = \{(1, x), (2, y), (3, x), (4, z)\} \). Find domain, range, and codomain. Is range equal to codomain?
Answer: Domain \( = \{1, 2, 3, 4\} \), Range \( = \{x, y, z\} \), Codomain \( = \{x, y, z\} \). Yes, in this case the range equals the codomain because every element of \( B \) appears as a second component.
Practice Question 3: If the codomain is \( \{1, 2, 3, 4, 5\} \) and the range is \( \{2, 4\} \), which elements of the codomain are NOT in the range?
Answer: The elements not in the range are \( \{1, 3, 5\} \). These are the elements of the codomain that are never reached by the relation.
3. Types of Relations on a Set
When a relation is defined from a set to ITSELF (that is, \( R \subseteq A \times A \)), we can check some special properties. These are very important for exams!
3.1 Reflexive Relation
Example 7: Let \( A = \{1, 2, 3\} \). Is \( R = \{(1,1), (2,2), (3,3), (1,2)\} \) reflexive?
All three elements have self-pairs. So YES, \( R \) is reflexive.
Example 8: Is \( R = \{(1,1), (2,2), (1,2)\} \) on \( A = \{1, 2, 3\} \) reflexive?
Since \( (3,3) \) is missing, \( R \) is NOT reflexive. Even though it has some self-pairs, it must have ALL of them.
3.2 Symmetric Relation
Example 9: Let \( A = \{1, 2, 3\} \). Is \( R = \{(1,2), (2,1), (1,3), (3,1)\} \) symmetric?
\( (1,2) \in R \) and \( (2,1) \in R \) ✓
\( (1,3) \in R \) and \( (3,1) \in R \) ✓
No other non-self pairs exist. So YES, \( R \) is symmetric.
Example 10: Is \( R = \{(1,2), (2,1), (1,3)\} \) on \( A = \{1, 2, 3\} \) symmetric?
3.3 Transitive Relation
Example 11: Let \( A = \{1, 2, 3\} \). Is \( R = \{(1,2), (2,3), (1,3)\} \) transitive?
No other chains of length two exist. So YES, \( R \) is transitive.
Example 12: Is \( R = \{(1,2), (2,3)\} \) on \( A = \{1, 2, 3\} \) transitive?
3.4 Equivalence Relation
Example 13: Let \( A = \{1, 2, 3\} \). Is \( R = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2), (1,3), (3,1)\} \) an equivalence relation?
Reflexive? \( (1,1), (2,2), (3,3) \) all present ✓
Symmetric? \( (1,2) \leftrightarrow (2,1) \) ✓, \( (2,3) \leftrightarrow (3,2) \) ✓, \( (1,3) \leftrightarrow (3,1) \) ✓
Transitive? All chains: \( (1,2)+(2,3) \rightarrow (1,3) \) ✓, \( (1,2)+(2,1) \rightarrow (1,1) \) ✓, \( (2,1)+(1,3) \rightarrow (2,3) \) ✓, and so on. All present ✓
YES, \( R \) is an equivalence relation! In fact, this is the universal relation where every element is related to every element.
Example 14: Let \( A = \{1, 2, 3, 4, 5, 6\} \). Define \( R \) as “\( a \) and \( b \) have the same remainder when divided by \( 2 \).” Is \( R \) an equivalence relation?
Reflexive? Any number has the same remainder as itself ✓
Symmetric? If \( a \) and \( b \) have the same remainder, then \( b \) and \( a \) have the same remainder ✓
Transitive? If \( a \) and \( b \) have the same remainder, and \( b \) and \( c \) have the same remainder, then \( a \) and \( c \) have the same remainder ✓
YES, \( R \) is an equivalence relation!
Equivalence classes: \( \{1, 3, 5\} \) (odd numbers) and \( \{2, 4, 6\} \) (even numbers).
• Reflexive: Check ALL \( (a, a) \) pairs exist. If even ONE is missing → NOT reflexive.
• Symmetric: For EVERY pair \( (a, b) \), check that \( (b, a) \) also exists. Self-pairs \( (a,a) \) never break symmetry.
• Transitive: For EVERY chain \( (a, b), (b, c) \), check \( (a, c) \) exists.
• Equivalence = Reflexive + Symmetric + Transitive (ALL three must be true).
• The empty relation \( R = \emptyset \) on a non-empty set is symmetric and transitive, but NOT reflexive.
• The universal relation \( R = A \times A \) is always an equivalence relation.
Answer:
Reflexive? All self-pairs present ✓
Symmetric? \( (1,2) \leftrightarrow (2,1) \) ✓, \( (3,4) \leftrightarrow (4,3) \) ✓, all self-pairs fine ✓
Transitive? Chains: \( (1,2)+(2,1) \rightarrow (1,1) \) ✓. \( (2,1)+(1,2) \rightarrow (2,2) \) ✓. \( (3,4)+(4,3) \rightarrow (3,3) \) ✓. \( (4,3)+(3,4) \rightarrow (4,4) \) ✓. No cross-chains like \( (1,2)+(2,3) \) exist ✓
YES, \( R \) is an equivalence relation.
Practice Question 2: Let \( A = \{1, 2, 3\} \) and \( R = \{(1,2), (2,3)\} \). Check all three properties.
Answer:
Reflexive? No self-pairs → NOT reflexive ✗
Symmetric? \( (1,2) \in R \) but \( (2,1) \notin R \) → NOT symmetric ✗
Transitive? \( (1,2) \) and \( (2,3) \) are in \( R \) but \( (1,3) \notin R \) → NOT transitive ✗
\( R \) fails all three properties.
Practice Question 3: The relation “is a sibling of” on the set of all people. Is it reflexive? Symmetric? Transitive?
Answer:
Reflexive? A person is not a sibling of themselves → NOT reflexive ✗
Symmetric? If \( a \) is a sibling of \( b \), then \( b \) is a sibling of \( a \) → Symmetric ✓
Transitive? If \( a \) is a sibling of \( b \) and \( b \) is a sibling of \( c \), then \( a \) and \( c \) share the same parents, so \( a \) is a sibling of \( c \) → Transitive ✓
So it is symmetric and transitive, but not reflexive. Not an equivalence relation.
4. Functions
4.1 What is a Function?
A function is a SPECIAL type of relation. Not every relation is a function, but every function IS a relation. What makes it special?
In simpler words: each input gives exactly ONE output. No element in \( A \) is left out, and no element in \( A \) maps to two different elements in \( B \).
Example 15: Which of the following relations are functions?
| Relation | Ordered Pairs | Function? | Reason |
|---|---|---|---|
| \( R_1 \) | \( \{(1,2), (2,3), (3,4)\} \) | YES ✓ | Each input has exactly one output |
| \( R_2 \) | \( \{(1,2), (1,3), (2,4)\} \) | NO ✗ | Input 1 maps to both 2 and 3 |
| \( R_3 \) | \( \{(1,2), (3,4)\} \) on \( A=\{1,2,3,4\} \) | NO ✗ | Inputs 2 and 4 have no output |
| \( R_4 \) | \( \{(1,5), (2,5), (3,5)\} \) | YES ✓ | Each input has exactly one output (even though all map to 5) |
Notice from \( R_4 \): Multiple inputs CAN map to the SAME output. That is still a function! The rule is about inputs having exactly one output, NOT about outputs having exactly one input.
• One input → multiple outputs: NOT a function ✗
• Multiple inputs → one output: IS a function ✓
• Some inputs have no output: NOT a function ✗
• Every input has exactly one output: IS a function ✓
4.2 Function Notation
We write functions using special notation. Instead of writing \( (1, 2) \in f \), we write:
This is read as “\( f \) of 1 equals 2.” Here, \( 1 \) is the input (argument) and \( 2 \) is the output (value).
Example 16: A function \( f \) is defined by \( f(x) = 2x + 3 \). Find \( f(0) \), \( f(1) \), \( f(-2) \), and \( f(5) \).
\( f(0) = 2(0) + 3 = 3 \)
\( f(1) = 2(1) + 3 = 5 \)
\( f(-2) = 2(-2) + 3 = -4 + 3 = -1 \)
\( f(5) = 2(5) + 3 = 13 \)
Example 17: A function \( f \) is defined by \( f(x) = x^2 – 4x + 3 \). Find \( f(0) \), \( f(1) \), \( f(2) \), \( f(3) \), and \( f(4) \).
\( f(0) = 0 – 0 + 3 = 3 \)
\( f(1) = 1 – 4 + 3 = 0 \)
\( f(2) = 4 – 8 + 3 = -1 \)
\( f(3) = 9 – 12 + 3 = 0 \)
\( f(4) = 16 – 16 + 3 = 3 \)
Interesting: \( f(0) = f(4) = 3 \) and \( f(1) = f(3) = 0 \). This tells us the graph is a parabola symmetric about \( x = 2 \).
4.3 Domain and Range of a Function
For a function \( f: A \rightarrow B \):
- Domain = set \( A \) (all possible inputs)
- Codomain = set \( B \) (the set where outputs live)
- Range = set of all actual outputs \( \{ f(a) \mid a \in A \} \)
When a function is given as a formula, the domain is restricted by mathematical rules:
• If \( f(x) \) is a polynomial (like \( 3x^2 + 2x – 1 \)): Domain \( = \mathbb{R} \) (all real numbers)
• If \( f(x) \) has a fraction: the denominator cannot be zero
• If \( f(x) \) has a square root: the expression inside must be \( \geq 0 \)
• If both: apply both rules
Example 18: Find the domain of \( f(x) = \dfrac{1}{x – 3} \).
\( x – 3 \neq 0 \) → \( x \neq 3 \)
Domain \( = \mathbb{R} \setminus \{3\} = (-\infty, 3) \cup (3, \infty) \)
Example 19: Find the domain of \( f(x) = \sqrt{x – 2} \).
\( x – 2 \geq 0 \) → \( x \geq 2 \)
Domain \( = [2, \infty) \)
Example 20: Find the domain of \( f(x) = \dfrac{1}{\sqrt{x + 1}} \).
1. Square root must be defined: \( x + 1 \geq 0 \) → \( x \geq -1 \)
2. Denominator cannot be zero: \( \sqrt{x+1} \neq 0 \) → \( x + 1 \neq 0 \) → \( x \neq -1 \)
Combined: \( x > -1 \)
Domain \( = (-1, \infty) \)
• A function must have exactly one output for each input in the domain.
• Notation \( f: A \rightarrow B \) means \( A \) is the domain and \( B \) is the codomain.
• Range \( \subseteq \) Codomain (always).
• For domain: check denominator \( \neq 0 \) and square root argument \( \geq 0 \).
Answer: YES, it is a function. Each input maps to exactly one output (all map to 3). Domain \( = \{1, 2, 3\} \), Range \( = \{3\} \).
Practice Question 2: Find the domain of \( f(x) = \dfrac{x + 1}{x^2 – 4} \).
Answer: Denominator: \( x^2 – 4 \neq 0 \) → \( (x-2)(x+2) \neq 0 \) → \( x \neq 2 \) and \( x \neq -2 \). Domain \( = \mathbb{R} \setminus \{-2, 2\} = (-\infty, -2) \cup (-2, 2) \cup (2, \infty) \).
Practice Question 3: Find the domain of \( f(x) = \sqrt{5 – x} + \dfrac{1}{x – 1} \).
Answer: Condition 1: \( 5 – x \geq 0 \) → \( x \leq 5 \). Condition 2: \( x – 1 \neq 0 \) → \( x \neq 1 \). Combined: \( x \leq 5 \) and \( x \neq 1 \). Domain \( = (-\infty, 1) \cup (1, 5] \).
5. Types of Functions
Functions can be classified based on how elements of the domain map to elements of the codomain. This is a very important topic for exams!
5.1 One-to-One (Injective) Function
Example 21: Is \( f(x) = 2x + 1 \) injective?
\( 2a + 1 = 2b + 1 \)
\( 2a = 2b \)
\( a = b \)
Since \( f(a) = f(b) \) implies \( a = b \), the function is injective ✓.
Example 22: Is \( f(x) = x^2 \) injective on \( \mathbb{R} \)?
However, if we restrict the domain to \( [0, \infty) \), then \( f(x) = x^2 \) IS injective. So injectivity depends on the domain!
5.2 Onto (Surjective) Function
Example 23: Let \( f: \{1, 2, 3\} \rightarrow \{a, b, c\} \) be \( f = \{(1,a), (2,b), (3,c)\} \). Is \( f \) surjective?
Example 24: Let \( f: \{1, 2, 3\} \rightarrow \{a, b, c, d\} \) be \( f = \{(1,a), (2,b), (3,c)\} \). Is \( f \) surjective?
It is impossible for a function with 3 elements in the domain to be onto a codomain with 4 elements!
5.3 Bijective Function
Example 25: Let \( f: \{1, 2, 3\} \rightarrow \{a, b, c\} \) be \( f = \{(1,a), (2,b), (3,c)\} \). Is \( f \) bijective?
Injective? Each input maps to a different output ✓
Surjective? Range \( = \{a, b, c\} = \) Codomain ✓
YES, bijective ✓
Example 26: Is \( f: \mathbb{R} \rightarrow \mathbb{R} \) defined by \( f(x) = 3x – 1 \) bijective?
Injective? If \( f(a) = f(b) \), then \( 3a – 1 = 3b – 1 \), so \( 3a = 3b \), so \( a = b \) ✓
Surjective? For any \( y \in \mathbb{R} \), let \( x = \dfrac{y + 1}{3} \). Then \( f(x) = 3 \cdot \dfrac{y+1}{3} – 1 = y + 1 – 1 = y \) ✓
YES, bijective ✓
5.4 Many-to-One and Into Functions
Into: The range is a proper subset of the codomain. Some elements of the codomain are never reached. This is the opposite of surjective.
| Property | Injective | Surjective | Bijective | Many-to-One | Into |
|---|---|---|---|---|---|
| Different inputs → different outputs | Yes | May or may not | Yes | No | May or may not |
| Range = Codomain | May or may not | Yes | Yes | May or may not | No |
| Size condition | \( n(A) \leq n(B) \) | \( n(A) \geq n(B) \) | \( n(A) = n(B) \) | Any | \( n(A) < n(B) \) possible |
• To prove injective: assume \( f(a) = f(b) \) and show \( a = b \).
• To prove NOT injective: find two different inputs giving the same output.
• To prove surjective: for any \( y \) in codomain, find an \( x \) with \( f(x) = y \).
• To prove NOT surjective: find one element in codomain never reached.
• For finite sets: bijection is only possible when \( n(A) = n(B) \).
• A linear function \( f(x) = mx + c \) with \( m \neq 0 \) is always bijective on \( \mathbb{R} \).
Answer:
Injective? All outputs different (2, 3, 4, 5) ✓
Surjective? Range \( = \{2, 3, 4, 5\} \), Codomain \( = \{1, 2, 3, 4, 5\} \). Element 1 is not reached ✗
This function is injective but NOT surjective (it is “into”).
Practice Question 2: Prove that \( f: \mathbb{R} \rightarrow \mathbb{R} \) defined by \( f(x) = 5x + 2 \) is bijective.
Answer:
Injective: Suppose \( f(a) = f(b) \). Then \( 5a + 2 = 5b + 2 \), so \( 5a = 5b \), so \( a = b \) ✓
Surjective: For any \( y \in \mathbb{R} \), let \( x = \dfrac{y – 2}{5} \). Then \( f(x) = 5 \cdot \dfrac{y-2}{5} + 2 = y – 2 + 2 = y \) ✓
Since both properties hold, \( f \) is bijective.
Practice Question 3: Let \( f: \{1, 2, 3\} \rightarrow \{1, 2, 3\} \) be \( f = \{(1,1), (2,1), (3,3)\} \). Classify.
Answer:
Injective? No — \( f(1) = 1 \) and \( f(2) = 1 \), but \( 1 \neq 2 \) ✗
Surjective? Range \( = \{1, 3\} \), Codomain \( = \{1, 2, 3\} \). Element 2 not reached ✗
This function is many-to-one AND into. Neither injective nor surjective.
6. Special Types of Functions
6.1 Identity Function
Example: \( I: \mathbb{R} \rightarrow \mathbb{R} \), \( I(x) = x \). So \( I(3) = 3 \), \( I(-5) = -5 \), \( I(0) = 0 \).
6.2 Constant Function
6.3 Linear Function
6.4 Quadratic Function
6.5 Modulus (Absolute Value) Function
• Identity function: always bijective.
• Constant function: never injective (domain \( > 1 \)), rarely surjective.
• Linear function \( f(x) = mx + c \): bijective if \( m \neq 0 \).
• Quadratic function: never injective on \( \mathbb{R} \), never surjective onto \( \mathbb{R} \).
• \( f(x) = |x| \): never injective on \( \mathbb{R} \), range is \( [0, \infty) \).
Answer: \( f = \{(a,a), (b,b), (c,c)\} \). Injective: each output unique ✓. Surjective: Range = Codomain ✓. Bijective ✓.
Practice Question 2: Is \( f(x) = -x \) on \( \mathbb{R} \) bijective? Explain.
Answer: Yes. Injective: \( -a = -b \Rightarrow a = b \) ✓. Surjective: for any \( y \), let \( x = -y \), then \( f(x) = -(-y) = y \) ✓.
Practice Question 3: \( f: \mathbb{R} \rightarrow \mathbb{R} \) is \( f(x) = x^2 + 1 \). Find the range. Is it injective? Surjective?
Answer: Since \( x^2 \geq 0 \), \( x^2 + 1 \geq 1 \). Range \( = [1, \infty) \). Injective? No — \( f(1) = f(-1) = 2 \) ✗. Surjective? No — Range \( \neq \mathbb{R} \) ✗.
7. Composition of Functions
7.1 What is Composition?
Sometimes we want to apply one function after another. If \( f: A \rightarrow B \) and \( g: B \rightarrow C \), we can create a new function that first applies \( f \), then applies \( g \) to the result.
Important: The codomain of \( f \) must be contained in the domain of \( g \). Otherwise \( g \circ f \) is not defined!
Example 27: Let \( f(x) = 2x + 1 \) and \( g(x) = x^2 \). Find \( (g \circ f)(3) \) and \( (f \circ g)(3) \).
\( (g \circ f)(3) = g(f(3)) \): First \( f(3) = 2(3)+1 = 7 \). Then \( g(7) = 7^2 = 49 \). So \( (g \circ f)(3) = 49 \).
\( (f \circ g)(3) = f(g(3)) \): First \( g(3) = 3^2 = 9 \). Then \( f(9) = 2(9)+1 = 19 \). So \( (f \circ g)(3) = 19 \).
Notice: \( 49 \neq 19 \)! Composition is generally NOT commutative.
Example 28: Let \( f(x) = x + 3 \) and \( g(x) = 2x \). Find general formulas for \( g \circ f \) and \( f \circ g \).
\( (g \circ f)(x) = g(f(x)) = g(x+3) = 2(x+3) = 2x + 6 \)
\( (f \circ g)(x) = f(g(x)) = f(2x) = 2x + 3 \)
Different results! \( 2x + 6 \neq 2x + 3 \).
Example 29: Let \( f(x) = \dfrac{1}{x} \) and \( g(x) = x + 1 \). Find \( (g \circ f)(x) \) and \( (f \circ g)(x) \). State the domains.
\( (g \circ f)(x) = g\!\left(\dfrac{1}{x}\right) = \dfrac{1}{x} + 1 = \dfrac{1 + x}{x} \), Domain: \( x \neq 0 \)
\( (f \circ g)(x) = f(x+1) = \dfrac{1}{x + 1} \), Domain: \( x \neq -1 \)
The domains are DIFFERENT!
7.2 Properties of Composition
1. Composition is NOT commutative: \( g \circ f \neq f \circ g \) in general.
2. Composition IS associative: \( (h \circ g) \circ f = h \circ (g \circ f) \).
3. Identity property: \( f \circ I_A = I_B \circ f = f \).
• Read \( g \circ f \) from RIGHT to LEFT: first apply \( f \), then \( g \).
• Always check the output of the first function is a valid input for the second.
• \( g \circ f \neq f \circ g \) in general.
• The domain of \( g \circ f \) is all \( x \) in domain of \( f \) such that \( f(x) \) is in domain of \( g \).
Answer:
\( (g \circ f)(2) = g(f(2)) = g(4) = 5 \)
\( (f \circ g)(2) = f(g(2)) = f(3) = 9 \)
Different: \( 5 \neq 9 \).
Practice Question 2: Let \( f(x) = 3x – 2 \) and \( g(x) = x + 5 \). Find \( (f \circ g)(x) \).
Answer: \( (f \circ g)(x) = f(x+5) = 3(x+5) – 2 = 3x + 15 – 2 = 3x + 13 \).
Practice Question 3: If \( f(x) = 2x + 3 \) and \( (g \circ f)(x) = 4x + 7 \), find \( g(x) \).
Answer: \( g(f(x)) = g(2x+3) = 4x + 7 \). Let \( u = 2x + 3 \), so \( x = \dfrac{u – 3}{2} \). Then \( g(u) = 4 \cdot \dfrac{u-3}{2} + 7 = 2(u-3) + 7 = 2u – 6 + 7 = 2u + 1 \). So \( g(x) = 2x + 1 \).
Verification: \( g(f(x)) = g(2x+3) = 2(2x+3)+1 = 4x+7 \) ✓
8. Inverse of a Function
8.1 What is an Inverse Function?
If a function “does something” to an input, the inverse function “undoes” that operation. It reverses the mapping.
Why must \( f \) be bijective?
- If NOT injective: two inputs map to the same output — the inverse would not know which to return!
- If NOT surjective: some codomain elements have no pre-image — the inverse would have undefined values!
8.2 Finding the Inverse (Algebraic Method)
1. Write \( y = f(x) \)
2. Solve for \( x \) in terms of \( y \)
3. Replace \( y \) with \( x \) to get \( f^{-1}(x) \)
Example 30: Find the inverse of \( f(x) = 5x + 3 \).
Step 1: \( y = 5x + 3 \)
Step 2: \( y – 3 = 5x \), so \( x = \dfrac{y – 3}{5} \)
Step 3: Replace \( y \) with \( x \):
Example 31: Find the inverse of \( f(x) = \dfrac{2x + 1}{x – 3} \), \( x \neq 3 \).
\( y = \dfrac{2x + 1}{x – 3} \)
\( y(x – 3) = 2x + 1 \)
\( xy – 3y = 2x + 1 \)
\( xy – 2x = 3y + 1 \)
\( x(y – 2) = 3y + 1 \)
\( x = \dfrac{3y + 1}{y – 2} \)
8.3 Properties of Inverse Functions
1. \( (f^{-1})^{-1} = f \) — the inverse of the inverse is the original function.
2. \( f^{-1}(f(x)) = x \) for all \( x \) in domain of \( f \).
3. \( f(f^{-1}(x)) = x \) for all \( x \) in domain of \( f^{-1} \).
4. Domain of \( f^{-1} \) = Range of \( f \).
5. Range of \( f^{-1} \) = Domain of \( f \).
6. The graph of \( f^{-1} \) is the reflection of the graph of \( f \) across the line \( y = x \).
• Only bijective functions have inverses. Always check bijectivity first!
• To find inverse: write \( y = f(x) \), solve for \( x \), swap variables.
• Always verify: \( f^{-1}(f(x)) = x \).
• Domain and range swap between a function and its inverse.
Answer:
\( y = \dfrac{x-4}{3} \Rightarrow 3y = x – 4 \Rightarrow x = 3y + 4 \)
\( f^{-1}(x) = 3x + 4 \)
Verification: \( f^{-1}(f(7)) = f^{-1}(1) = 3(1)+4 = 7 \) ✓
Practice Question 2: Does \( f(x) = x^2 \) on \( \mathbb{R} \) have an inverse? Why or why not?
Answer: No, because \( f(x) = x^2 \) on \( \mathbb{R} \) is not injective (\( f(2) = f(-2) = 4 \)). Since it is not bijective, it does not have a proper inverse. However, if we restrict domain to \( [0, \infty) \), then \( f^{-1}(x) = \sqrt{x} \).
Practice Question 3: If \( f(x) = 3x – 5 \), find \( f^{-1}(8) \) WITHOUT finding the general formula for \( f^{-1} \).
Answer: We need \( x \) such that \( f(x) = 8 \). So \( 3x – 5 = 8 \Rightarrow 3x = 13 \Rightarrow x = \dfrac{13}{3} \). Therefore \( f^{-1}(8) = \dfrac{13}{3} \).
9. Graphs of Functions and Line Tests
9.1 The Vertical Line Test
Example: The graph of \( y = x^2 \) passes the vertical line test → it IS a function ✓.
Example: The graph of \( x^2 + y^2 = 25 \) (a circle) fails — the vertical line \( x = 3 \) hits at \( (3, 4) \) and \( (3, -4) \) → NOT a function ✗.
9.2 The Horizontal Line Test
Example: \( y = x^2 \) fails the horizontal line test (\( y = 4 \) hits at \( x = 2 \) and \( x = -2 \)) → NOT injective ✗.
Example: \( y = 2x + 1 \) passes the horizontal line test → IS injective ✓.
• Vertical line test → checks if relation is a function.
• Horizontal line test → checks if function is injective.
• Both tests pass + range = codomain → function is bijective.
• Linear functions \( f(x) = mx + c \) with \( m \neq 0 \) always pass both tests on \( \mathbb{R} \).
• Parabolas fail the horizontal line test on \( \mathbb{R} \).
Answer: Vertical line test: YES ✓ (it is a function). Horizontal line test: NO ✗ (e.g., \( y = 2 \) hits at \( x = 2 \) and \( x = -2 \)). So \( f(x) = |x| \) is a function but NOT one-to-one (many-to-one).
Practice Question 2: A relation on \( \mathbb{R} \) is defined by \( y^2 = x \). Is this a function?
Answer: No. For \( x = 4 \), we get \( y = 2 \) or \( y = -2 \). A vertical line at \( x = 4 \) hits two points. Fails vertical line test ✗.
Practice Question 3: Does \( f(x) = x^3 \) on \( \mathbb{R} \) pass both line tests? Is it bijective?
Answer: Vertical line test: YES ✓. Horizontal line test: YES ✓ (strictly increasing). Range of \( x^3 \) is \( \mathbb{R} \) = codomain ✓. So \( f(x) = x^3 \) is bijective on \( \mathbb{R} \).
10. More Worked Examples (Exam Style)
Example 32: Let \( A = \{1, 2, 3, 4\} \). Define \( R \) on \( A \) by \( R = \{(a, b) : a + b \text{ is even}\} \). List all elements of \( R \). Is \( R \) an equivalence relation?
\( R = \{(1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4)\} \)
Reflexive? All self-pairs present ✓
Symmetric? \( (1,3) \leftrightarrow (3,1) \) ✓, \( (2,4) \leftrightarrow (4,2) \) ✓
Transitive? \( (1,3)+(3,1) \rightarrow (1,1) \) ✓, \( (3,1)+(1,3) \rightarrow (3,3) \) ✓, \( (2,4)+(4,2) \rightarrow (2,2) \) ✓, \( (4,2)+(2,4) \rightarrow (4,4) \) ✓
YES, equivalence relation! Equivalence classes: \( \{1, 3\} \) and \( \{2, 4\} \).
Example 33: Let \( f: \mathbb{R} \rightarrow \mathbb{R} \) be \( f(x) = \dfrac{3x + 2}{5} \). Find \( f^{-1} \) and verify \( f^{-1}(f(x)) = x \).
\( y = \dfrac{3x+2}{5} \Rightarrow 5y = 3x+2 \Rightarrow 3x = 5y-2 \Rightarrow x = \dfrac{5y-2}{3} \)
\( f^{-1}(f(x)) = f^{-1}\!\left(\dfrac{3x+2}{5}\right) = \dfrac{5 \cdot \dfrac{3x+2}{5} – 2}{3} = \dfrac{3x + 2 – 2}{3} = \dfrac{3x}{3} = x \) ✓
Example 34: Let \( f(x) = 2x + 1 \) and \( g(x) = x^2 – 1 \). Find \( (f \circ g)(x) \), \( (g \circ f)(x) \), and \( (f \circ f)(x) \).
\( (f \circ g)(x) = f(x^2 – 1) = 2(x^2 – 1) + 1 = 2x^2 – 1 \)
\( (g \circ f)(x) = g(2x + 1) = (2x+1)^2 – 1 = 4x^2 + 4x + 1 – 1 = 4x^2 + 4x \)
\( (f \circ f)(x) = f(2x+1) = 2(2x+1) + 1 = 4x + 3 \)
• Read the question carefully — is it asking about a relation or a function?
• For “is this a function?” — check that each input has exactly one output.
• For equivalence relation — check ALL three properties.
• For inverse — first verify bijectivity, then use the algebraic method.
• For composition — remember to apply the RIGHT function first (read right to left).
• Show all working clearly — partial marks are often awarded!
Answer:
\( y = \dfrac{x}{x-1} \Rightarrow y(x-1) = x \Rightarrow xy – y = x \Rightarrow xy – x = y \Rightarrow x(y-1) = y \Rightarrow x = \dfrac{y}{y-1} \)
\( f^{-1}(x) = \dfrac{x}{x – 1} \), \( x \neq 1 \)
This function is its own inverse! (called an involution).
Practice Question 2: Let \( f: \{1,2,3,4\} \rightarrow \{1,2,3,4\} \) be \( f = \{(1,4),(2,3),(3,2),(4,1)\} \). Show it is bijective and find \( f^{-1} \).
Answer:
Injective: outputs \( \{4,3,2,1\} \) all different ✓. Surjective: Range = Codomain ✓. Bijective ✓.
\( f^{-1} = \{(4,1),(3,2),(2,3),(1,4)\} \) — just reverse each ordered pair.
Practice Question 3: If \( f(x) = x + 2 \) and \( g(x) = 3x \), find \( (g \circ f)^{-1} \) and verify it equals \( f^{-1} \circ g^{-1} \).
Answer:
\( (g \circ f)(x) = g(f(x)) = g(x+2) = 3(x+2) = 3x + 6 \)
\( (g \circ f)^{-1}(x) = \dfrac{x – 6}{3} \)
Now: \( f^{-1}(x) = x – 2 \), \( g^{-1}(x) = \dfrac{x}{3} \)
\( (f^{-1} \circ g^{-1})(x) = f^{-1}\!\left(\dfrac{x}{3}\right) = \dfrac{x}{3} – 2 = \dfrac{x – 6}{3} \)
So \( (g \circ f)^{-1} = f^{-1} \circ g^{-1} \) ✓
Quick Revision Notes — Relations and Functions
1. Key Definitions
Range: Set of all actual outputs (all second components, as a set with no repeats).
Codomain: The set \( B \) where outputs are drawn from.
Always: Range \( \subseteq \) Codomain.
2. Types of Relations (on set \( A \))
| Property | Condition | Quick Check Method |
|---|---|---|
| Reflexive | \( (a, a) \in R \) for ALL \( a \in A \) | Are ALL self-pairs present? |
| Symmetric | \( (a, b) \in R \Rightarrow (b, a) \in R \) | Does every pair have its reverse? |
| Transitive | \( (a, b), (b, c) \in R \Rightarrow (a, c) \in R \) | For every chain of 2, is the “shortcut” present? |
| Equivalence | Reflexive + Symmetric + Transitive | All three above must hold |
3. Types of Functions
| Type | Definition | Test | Size Condition |
|---|---|---|---|
| Injective (One-to-One) | Different inputs → different outputs | \( f(a) = f(b) \Rightarrow a = b \) | \( n(A) \leq n(B) \) |
| Surjective (Onto) | Every element of \( B \) is reached | Range = Codomain | \( n(A) \geq n(B) \) |
| Bijective | Both injective and surjective | Pass both tests | \( n(A) = n(B) \) |
| Many-to-One | Different inputs → same output | NOT injective | Any |
| Into | Some codomain elements not reached | NOT surjective | \( n(A) < n(B) \) possible |
4. Key Formulas
5. Finding the Inverse — Quick Steps
- Write \( y = f(x) \)
- Solve for \( x \) in terms of \( y \)
- Swap \( x \) and \( y \) to get \( f^{-1}(x) \)
- Verify: \( f^{-1}(f(x)) = x \)
6. Domain Rules
- Polynomial (e.g., \( 3x^2 + 2x \)): Domain \( = \mathbb{R} \)
- Fraction: Denominator \( \neq 0 \)
- Square root: Expression inside \( \geq 0 \)
- Both fraction and square root: Inside \( > 0 \) (strictly, because denominator can’t be 0)
7. Line Tests
- Vertical line test: Passes → graph is a function
- Horizontal line test: Passes → function is injective
- Both tests pass + range = codomain: Function is bijective
8. Common Mistakes to Avoid
Correction: Range = ACTUAL outputs. Codomain = where outputs COULD come from. Range \( \subseteq \) Codomain but they may not be equal.
Correction: Generally NOT equal. \( (a, b) \neq (b, a) \).
Correction: Multiple inputs CAN map to the same output (many-to-one is still a function). A function fails only if ONE input maps to TWO outputs.
Correction: You must check reflexive AND symmetric AND transitive. Missing even one means NOT an equivalence relation.
Correction: In \( g \circ f \), apply \( f \) FIRST, then \( g \). Read right to left.
Correction: Always verify bijectivity FIRST.
Correction: The order of composition reverses when taking the inverse.
Correction: The domain of \( f^{-1} \) equals the range of \( f \). Always state it.
9. Quick Examples
A: No. \( n(A) = 3 > n(B) = 2 \). By pigeonhole principle, at least two inputs share an output.
A: No. Only 2 outputs can be produced, but codomain has 3 elements.
A: Constant function. Not injective (domain \( > 1 \)). Not surjective (unless codomain is \( \{7\} \)). Many-to-one and into.
Challenge Exam Questions — Relations and Functions
Test yourself with these difficult questions! Try each one before checking the answer. Good luck!
Multiple Choice Questions
Question 1: If \( A = \{1, 2, 3, 4, 5\} \) and \( B = \{a, b, c\} \), what is the maximum number of elements in a relation from \( A \) to \( B \)?
The maximum relation is the full Cartesian product \( A \times B \). \( n(A \times B) = 5 \times 3 = 15 \).
Question 2: Let \( f: \mathbb{R} \rightarrow \mathbb{R} \) be \( f(x) = x^3 + 1 \). Which of the following is true?
Injective: If \( f(a) = f(b) \), then \( a^3 + 1 = b^3 + 1 \), so \( a^3 = b^3 \), so \( a = b \) ✓.
Surjective: For any \( y \in \mathbb{R} \), let \( x = \sqrt[3]{y – 1} \). Then \( f(x) = y \) ✓.
Both hold, so \( f \) is bijective.
Question 3: If \( R = \{(1, 2), (2, 1), (1, 3), (3, 1), (1, 4), (4, 1)\} \) on \( A = \{1, 2, 3, 4\} \), then \( R \) is:
Reflexive? \( (1,1) \notin R \) ✗. None of the self-pairs are present.
Symmetric? Every pair has its reverse ✓.
Transitive? \( (2,1) \) and \( (1,3) \) are in \( R \), but \( (2,3) \notin R \) ✗.
So \( R \) is symmetric only.
Question 4: The domain of \( f(x) = \sqrt{x – 1} + \sqrt{5 – x} \) is:
Condition 1: \( x – 1 \geq 0 \Rightarrow x \geq 1 \). Condition 2: \( 5 – x \geq 0 \Rightarrow x \leq 5 \). Combined: \( 1 \leq x \leq 5 \), i.e., \( [1, 5] \).
Question 5: How many bijective functions exist from \( \{1, 2, 3\} \) to \( \{a, b, c\} \)?
The number of bijections from a set of \( n \) elements to another set of \( n \) elements is \( n! \). Here \( n = 3 \), so \( 3! = 6 \).
The six bijections are: \( \{(1,a)(2,b)(3,c)\}, \{(1,a)(2,c)(3,b)\}, \{(1,b)(2,a)(3,c)\}, \{(1,b)(2,c)(3,a)\}, \{(1,c)(2,a)(3,b)\}, \{(1,c)(2,b)(3,a)\} \).
Fill in the Blank
Question 6: If \( A \) has 6 elements and \( B \) has 4 elements, then \( A \times B \) has ______ elements.
\( n(A \times B) = n(A) \times n(B) = 6 \times 4 = 24 \).
Question 7: A relation \( R \) on \( A \) is an equivalence relation if it is ______, ______, and ______.
Question 8: If \( f(x) = 3x – 7 \), then \( f^{-1}(8) = \) ______.
Solve \( f(x) = 8 \): \( 3x – 7 = 8 \Rightarrow 3x = 15 \Rightarrow x = 5 \). So \( f^{-1}(8) = 5 \).
Question 9: The composition \( g \circ f \) means we apply ______ first and then ______.
\( (g \circ f)(x) = g(f(x)) \). Read right to left.
Question 10: For a function to have an inverse, it must be ______.
Both injective (one-to-one) and surjective (onto).
Question 11: The number of functions from a set of 2 elements to a set of 3 elements is ______.
\( [n(B)]^{n(A)} = 3^2 = 9 \).
Short Answer Questions
Question 12: Let \( R = \{(1,1), (2,2), (3,3), (1,2), (2,1)\} \) be a relation on \( A = \{1, 2, 3\} \). Is \( R \) transitive? Justify.
Check all possible chains:
• \( (1,2) \) and \( (2,1) \) → need \( (1,1) \) → present ✓
• \( (2,1) \) and \( (1,2) \) → need \( (2,2) \) → present ✓
• \( (1,1) \) and \( (1,2) \) → need \( (1,2) \) → present ✓
• \( (2,2) \) and \( (2,1) \) → need \( (2,1) \) → present ✓
• \( (1,2) \) and \( (2,2) \) → need \( (1,2) \) → present ✓
• \( (2,1) \) and \( (1,1) \) → need \( (2,1) \) → present ✓
• All chains involving only self-pairs trivially work.
All chains satisfy the transitive condition.
Question 13: Find the domain of \( f(x) = \dfrac{\sqrt{x – 2}}{x – 5} \).
Condition 1 (square root in numerator): \( x – 2 \geq 0 \Rightarrow x \geq 2 \).
Condition 2 (denominator): \( x – 5 \neq 0 \Rightarrow x \neq 5 \).
Combined: \( x \geq 2 \) and \( x \neq 5 \). Domain \( = [2, 5) \cup (5, \infty) \).
Note: Since the square root is in the NUMERATOR (not denominator), we use \( \geq 0 \), not \( > 0 \).
Question 14: Is \( f(x) = x^3 \) on \( \mathbb{R} \) bijective? Give reasons.
Injective: \( x^3 \) is strictly increasing (if \( a < b \) then \( a^3 < b^3 \)). So different inputs always give different outputs. Alternatively, if \( a^3 = b^3 \), taking cube root gives \( a = b \) ✓.
Surjective: For any \( y \in \mathbb{R} \), let \( x = \sqrt[3]{y} \). Then \( f(x) = (\sqrt[3]{y})^3 = y \) ✓.
Both properties hold, so bijective.
Step-by-Step Calculation Questions
Question 15: Let \( f(x) = 2x + 3 \) and \( g(x) = x^2 \). Find \( (g \circ f)(x) \), \( (f \circ g)(x) \), and solve \( (g \circ f)(x) = 49 \).
\( (g \circ f)(x) = g(f(x)) = g(2x+3) = (2x+3)^2 = 4x^2 + 12x + 9 \)
\( (f \circ g)(x) = f(g(x)) = f(x^2) = 2x^2 + 3 \)
Solve \( (g \circ f)(x) = 49 \):
\( 4x^2 + 12x + 9 = 49 \)
\( 4x^2 + 12x – 40 = 0 \)
Divide by 4: \( x^2 + 3x – 10 = 0 \)
Factor: \( (x + 5)(x – 2) = 0 \)
\( x = -5 \) or \( x = 2 \)
Verification: \( (g \circ f)(-5) = 4(25) + 12(-5) + 9 = 100 – 60 + 9 = 49 \) ✓
\( (g \circ f)(2) = 4(4) + 12(2) + 9 = 16 + 24 + 9 = 49 \) ✓
Question 16: Let \( f: \mathbb{R} \setminus \{2\} \rightarrow \mathbb{R} \setminus \{1\} \) be \( f(x) = \dfrac{x}{x – 2} \). Prove that \( f \) is bijective and find \( f^{-1} \).
Step 1 — Injective: Suppose \( f(a) = f(b) \):
\( \dfrac{a}{a-2} = \dfrac{b}{b-2} \)
\( a(b-2) = b(a-2) \)
\( ab – 2a = ab – 2b \)
\( -2a = -2b \)
\( a = b \) ✓
Step 2 — Surjective: For any \( y \in \mathbb{R} \setminus \{1\} \):
\( \dfrac{x}{x-2} = y \Rightarrow x = y(x-2) \Rightarrow x = yx – 2y \Rightarrow x – yx = -2y \Rightarrow x(1-y) = -2y \Rightarrow x = \dfrac{2y}{y-1} \)
Check: \( x = \dfrac{2y}{y-1} \) is defined for \( y \neq 1 \) ✓. Also \( x \neq 2 \) because \( \dfrac{2y}{y-1} = 2 \) would require \( 2y = 2y – 2 \), i.e., \( 0 = -2 \), impossible ✓.
Step 3 — Bijective ✓
Step 4 — Find \( f^{-1} \):
From above: \( x = \dfrac{2y}{y-1} \)
Question 17: Let \( A = \{1, 2, 3, 4, 5, 6\} \). Define \( R \) on \( A \) by \( R = \{(a, b) : a – b \text{ is divisible by } 3\} \). Show that \( R \) is an equivalence relation and list the equivalence classes.
\( R = \{(1,1),(1,4),(2,2),(2,5),(3,3),(3,6),(4,1),(4,4),(5,2),(5,5),(6,3),(6,6)\} \)
Reflexive: \( a – a = 0 \) is divisible by 3 for all \( a \) ✓.
Symmetric: If \( a – b \) is divisible by 3, then \( b – a = -(a-b) \) is also divisible by 3 ✓.
Transitive: If \( a – b = 3k \) and \( b – c = 3m \), then \( a – c = (a-b)+(b-c) = 3(k+m) \), divisible by 3 ✓.
Equivalence relation ✓
Equivalence classes:
\( [1] = \{a : a – 1 \text{ divisible by } 3\} = \{1, 4\} \)
\( [2] = \{a : a – 2 \text{ divisible by } 3\} = \{2, 5\} \)
\( [3] = \{a : a – 3 \text{ divisible by } 3\} = \{3, 6\} \)
Partition of \( A \): \( \{\{1,4\}, \{2,5\}, \{3,6\}\} \).
Question 18: If \( f(x) = x + 1 \) and \( g(x) = x^2 – x + 1 \), find \( (f \circ g)(x) \), \( (g \circ f)(x) \), and compute \( (f \circ g)(2) – (g \circ f)(2) \).
\( (f \circ g)(x) = f(x^2 – x + 1) = (x^2 – x + 1) + 1 = x^2 – x + 2 \)
\( (g \circ f)(x) = g(x + 1) = (x+1)^2 – (x+1) + 1 = x^2 + 2x + 1 – x – 1 + 1 = x^2 + x + 1 \)
\( (f \circ g)(2) = 4 – 2 + 2 = 4 \)
\( (g \circ f)(2) = 4 + 2 + 1 = 7 \)
\( (f \circ g)(2) – (g \circ f)(2) = 4 – 7 = -3 \)
Question 19: Let \( f: \{1, 2, 3\} \rightarrow \{1, 2, 3\} \) be \( f(1) = 2, f(2) = 3, f(3) = 1 \). Find \( f \circ f \) and \( f \circ f \circ f \). What do you notice?
\( (f \circ f)(1) = f(f(1)) = f(2) = 3 \)
\( (f \circ f)(2) = f(f(2)) = f(3) = 1 \)
\( (f \circ f)(3) = f(f(3)) = f(1) = 2 \)
So \( f \circ f = \{(1,3), (2,1), (3,2)\} \)
\( (f \circ f \circ f)(1) = f(f(f(1))) = f(f(2)) = f(3) = 1 \)
\( (f \circ f \circ f)(2) = f(f(f(2))) = f(f(3)) = f(1) = 2 \)
\( (f \circ f \circ f)(3) = f(f(f(3))) = f(f(1)) = f(2) = 3 \)
So \( f \circ f \circ f = \{(1,1), (2,2), (3,3)\} = I_A \) (the identity function!)
Observation: \( f^3 = I_A \). This means applying \( f \) three times returns every element to itself. This is called a 3-cycle permutation. It also means \( f^{-1} = f \circ f \) (since \( f \circ f \circ f = I \) implies \( f^{-1} = f^2 \)).
Question 20: Find the domain and range of \( f(x) = \dfrac{1}{x^2 + 1} \).
Domain: \( x^2 + 1 \geq 1 > 0 \) for all real \( x \). Denominator is never zero.
Domain \( = \mathbb{R} \)
Range: Since \( x^2 \geq 0 \), we have \( x^2 + 1 \geq 1 \), so \( \dfrac{1}{x^2+1} \leq 1 \). Also \( \dfrac{1}{x^2+1} > 0 \) (always positive).
At \( x = 0 \): \( f(0) = 1 \) (maximum value).
As \( x \to \pm\infty \): \( f(x) \to 0 \) (approaches but never reaches 0).
Range \( = (0, 1] \)
Question 21: A function \( f \) satisfies \( f(1) = 5 \), \( f(2) = 8 \), \( f(3) = 11 \), \( f(4) = 14 \). Assuming \( f \) is linear, find its formula, determine if it is bijective on \( \mathbb{R} \), and find \( f^{-1}(20) \).
Since \( f \) is linear, let \( f(x) = mx + c \).
From \( f(1) = 5 \): \( m + c = 5 \) … (i)
From \( f(2) = 8 \): \( 2m + c = 8 \) … (ii)
Subtract (i) from (ii): \( m = 3 \). From (i): \( c = 2 \).
\( f(x) = 3x + 2 \)
Verification: \( f(3) = 11 \) ✓, \( f(4) = 14 \) ✓.
Bijective on \( \mathbb{R} \)? Yes. Slope \( m = 3 \neq 0 \), so strictly increasing (injective). For any \( y \), \( x = \frac{y-2}{3} \in \mathbb{R} \) (surjective).
Finding \( f^{-1}(20) \): Solve \( 3x + 2 = 20 \Rightarrow 3x = 18 \Rightarrow x = 6 \).
So \( f^{-1}(20) = 6 \).
(Alternatively: \( f^{-1}(x) = \frac{x-2}{3} \), so \( f^{-1}(20) = 6 \) ✓.)
Question 22: Let \( R \) on \( \mathbb{Z} \) be \( R = \{(a, b) : a – b \text{ is an even integer}\} \). Prove \( R \) is an equivalence relation and describe the equivalence classes.
Reflexive: \( a – a = 0 \), which is even. So \( (a, a) \in R \) for all \( a \in \mathbb{Z} \) ✓.
Symmetric: If \( (a, b) \in R \), then \( a – b = 2k \) for some integer \( k \). Then \( b – a = -2k = 2(-k) \), which is even. So \( (b, a) \in R \) ✓.
Transitive: If \( (a, b) \in R \) and \( (b, c) \in R \), then \( a – b = 2k \) and \( b – c = 2m \). Then \( a – c = (a-b)+(b-c) = 2k + 2m = 2(k+m) \), which is even. So \( (a, c) \in R \) ✓.
Equivalence relation ✓
Equivalence classes:
\( [0] = \{a \in \mathbb{Z} : a – 0 \text{ is even}\} = \{0, \pm 2, \pm 4, \pm 6, \ldots\} = \) set of all even integers
\( [1] = \{a \in \mathbb{Z} : a – 1 \text{ is even}\} = \{1, -1, 3, -3, 5, -5, \ldots\} = \) set of all odd integers
There are exactly 2 equivalence classes: even integers and odd integers. This partitions \( \mathbb{Z} \) into two disjoint subsets.
Question 23: Let \( f: \mathbb{Z} \rightarrow \mathbb{Z} \) be \( f(x) = 2x + 1 \). Is \( f \) injective? Surjective? Find the range.
Injective: If \( f(a) = f(b) \), then \( 2a + 1 = 2b + 1 \Rightarrow 2a = 2b \Rightarrow a = b \) ✓.
Surjective? For \( f(x) = 2x + 1 \) to equal some \( y \in \mathbb{Z} \), we need \( x = \dfrac{y – 1}{2} \). This is an integer only when \( y \) is odd. If \( y = 2 \) (even), then \( x = \dfrac{1}{2} \notin \mathbb{Z} \). So \( f \) does NOT reach even integers ✗.
Range: \( \{2x + 1 : x \in \mathbb{Z}\} = \{\ldots, -5, -3, -1, 1, 3, 5, \ldots\} \) = set of all odd integers.
\( f \) is injective but NOT surjective. It is an “into” function.