Welcome to the Functions Interactive Laboratory
This interactive digital learning environment is designed according to the curriculum developed by Ghanashyam Adhikari. Functions are the foundational cornerstone of advanced mathematics, calculus, and scientific analysis.
In this module, you will explore:
- Intuitive input-output machines and relations
- Precise algebraic definitions of Domain, Co-domain, and Range
- Classification: One-one (Injective), Onto (Surjective), and Bijective maps
- Composition of functions \((g \circ f)(x)\) with 3-stage animated mappings
- Inverses of functions \(f^{-1}(x)\) and horizontal/vertical line tests
- Every single worked example and exercise from Ex 3.1, Ex 3.2, and Ex 3.3
Interactive Function Machine (Changeable Function Rule)
Choose any mathematical rule below, enter an input \(x\), and observe the processing:
What is a Function?
Let's say we have an input-output rule that for each allowable input gives exactly one output. Then we say the output depends on the input, or the output is a function of the input.
Example: The area of a square is a function of the side length, because you can find the area from the side length by squaring it. When the input is \(10\text{ cm}\), the output is \(100\text{ cm}^2\).
Tangible Daily Life Analogies:
- A Vending Machine: Entering a specific code like A1 (the input) always drops one exact snack, like a bag of chips (the output).
- The Cost of Fuel: Buying petrol depends on how many litres you pump. Pumping \(5\) litres (the input) results in one specific total price (the output).
- A Person's Age: Choosing a specific person (the input) gives back their current age (the output). A person cannot have two different ages at the exact same moment.
- Water Flow from a Tap: Turning the faucet handle a specific amount (the input) results in a specific rate of water flow (the output).
Real-World Applications in Modern Computing & Engineering:
Interactive 2D Cartesian Function Viewer
Interactive 3D Multi-Surface Visualization
Drag with your mouse or finger to rotate. The 3D surface transforms dynamically when you switch shapes.
Formal Definition
A function is a special type of relation that assigns each element of a set \(A\) to exactly one element of a set \(B\).
where for every \(a \in A\), there exists a unique \(b \in B\) such that \(f(a) = b\).
- Domain (\(\text{dom } f\)): The set \(A\) of all allowable input values for which the rule is defined: \(\text{dom}(f) = \{x : x \in A, \text{ where } y \text{ is defined}\}\).
- Co-domain: The whole set \(B\) into which outputs are mapped: \(\text{co-domain}(f) = \{y : y \in B\}\).
- Range (\(\text{range } f\)): The set of all actual images \(f(x) \in B\) for all \(x \in A\): \(\text{range}(f) \subseteq \text{co-domain}(f)\).
Interactive Arrow Mapping Test: Function vs Not a Function
VALID FUNCTION
Each input in A has exactly one target in B.
NOT A FUNCTION
Violation: Element 'b' is paired with both 2 and 3!
The Vertical Line Test
If any vertical line intersects a Cartesian curve at more than one point, the relation fails to be a function because a single input \(x\) would produce multiple outputs \(y\).
1. One-One (Injective) Function
A function \(f: A \to B\) is said to be one-one or injective if distinct elements in \(A\) have distinct images in \(B\).
Example: \(f: \mathbb{N} \to \mathbb{N}\) defined by \(f(x) = 2x\) is one-one because \(2x_1 = 2x_2 \implies x_1 = x_2\).
2. Onto (Surjective) Function
A function \(f: A \to B\) is said to be onto or surjective if every element of \(B\) is an image of at least one element of \(A\):
Example: Let \(E = \{2, 4, 6, \dots\}\) and \(f: \mathbb{N} \to E\) given by \(f(x) = 2x\). For each \(y \in E\), there exists \(x = y/2 \in \mathbb{N}\) such that \(f(x) = y\). Hence \(f\) is onto.
3. One-One Onto (Bijective) Function
A function that is both one-one and onto is called a bijective function (one-to-one correspondence).
Fundamental Theorem: A function has an inverse \(f^{-1}\) over its entire codomain if and only if it is bijective.
Definition of Composition of Functions
Let \(f: A \to B\) and \(g: B \to C\) be two functions. The composite function of \(f\) and \(g\) is the function from \(A\) to \(C\), denoted by \(g \circ f\) (read "\(g\) of \(f\)"):
Interactive 3-Stage Mapping Diagram: \(A \xrightarrow{f} B \xrightarrow{g} C\)
Input a value for \(x\), select function pairs, and observe the intermediate image in \(B\) and final output in \(C\):
Key Properties of Function Composition:
- Associative Property: \(f \circ (g \circ h) = (f \circ g) \circ h\)
- Injectivity Preservation: If \(f\) and \(g\) are one-one, then \(g \circ f\) is one-one.
- Surjectivity Preservation: If \(f\) and \(g\) are onto, then \(g \circ f\) is onto.
- Inverse of Composition: \((f \circ g)^{-1} = g^{-1} \circ f^{-1}\)
What Is an Inverse Function?
If a function \(f(x)\) takes an input \(x\) and yields output \(y\), then the inverse function \(f^{-1}(y)\) takes \(y\) and returns \(x\):
Algebraic Method to Find the Formula of \(f^{-1}(x)\):
- Write equation as \(y = f(x)\).
- Swap variables \(x\) and \(y\).
- Solve explicitly for \(y\).
- Replace \(y\) with \(f^{-1}(x)\).
Step 1: \(y = 2x - 4\)
Step 2: \(x = 2y - 4\)
Step 3: \(x + 4 = 2y \implies y = \frac{x + 4}{2}\)
Step 4: \(f^{-1}(x) = \frac{x + 4}{2}\)
Symmetry Reflection Visual
The graph of a function \(y = f(x)\) and its inverse \(y = f^{-1}(x)\) are reflections across the identity line \(y = x\).
Example 1: Determine whether the following functions are one-one, onto, both or neither:
(a) \(f : A \to A\), \(f(x) = 2x + 1\), \(x \in A\) and \(A = \mathbb{Z}^+\) (positive integers).
(b) \(f : B \to B\), \(f(x) = 3x\), \(x \in B\) and \(B = \mathbb{N}\) (natural numbers).
(c) \(f : C \to C\), \(f(x) = |x - 1|\), \(x \in C\) and \(C = \mathbb{R}\) (real numbers).
(d) \(f : \mathbb{R} \to \mathbb{R}\), \(f(x) = 3 - 4x\).
Let \(x_1, x_2 \in A\). Then \(f(x_1) = 2x_1 + 1\) and \(f(x_2) = 2x_2 + 1\).
\(f(x_1) = f(x_2) \implies 2x_1 + 1 = 2x_2 + 1 \implies x_1 = x_2\). Hence, \(f\) is one-one.
Now let \(y \in \mathbb{Z}^+\). Then \(y = 2x + 1 \implies x = \frac{y-1}{2}\). For \(y = 1 \in \mathbb{Z}^+\), \(x = 0 \notin \mathbb{Z}^+\). Therefore, \(f\) is not onto.
Let \(x_1, x_2 \in B\). \(f(x_1) = f(x_2) \implies 3x_1 = 3x_2 \implies x_1 = x_2\) (One-one).
For \(y = 2 \in \mathbb{N}\), \(x = 2/3 \notin \mathbb{N}\). Thus, \(f\) is not onto.
Take \(0, 2 \in \mathbb{R}\). \(f(0) = |0-1| = 1\) and \(f(2) = |2-1| = 1\). Since \(f(0) = f(2)\) but \(0 \neq 2\), \(f\) is not one-one.
Also, range of \(f = [0, \infty) \neq \mathbb{R}\), so it is not onto. Hence, neither one-one nor onto.
\(3 - 4x_1 = 3 - 4x_2 \implies -4x_1 = -4x_2 \implies x_1 = x_2\) (One-one).
For each \(y \in \mathbb{R}\), \(x = \frac{3-y}{4} \in \mathbb{R}\) such that \(f\left(\frac{3-y}{4}\right) = 3 - 4\left(\frac{3-y}{4}\right) = y\). Every element has a pre-image, so \(f\) is onto.
Hence, \(f\) is one-one and onto (bijective).
Example 2: Find the range of each of the following functions:
(a) \(f(x) = 2 - 3x\), \(x \in \mathbb{R}, x > 0\).
(b) \(f(x) = x^2 + 2\), \(x \in \mathbb{R}\).
Given \(x > 0 \implies \frac{2 - y}{3} > 0 \implies 2 - y > 0 \implies y < 2\).
Range = \((-\infty, 2)\).
\(x \in \mathbb{R}\) if \(y - 2 \ge 0 \implies y \ge 2\).
Range = \([2, \infty)\).
Example 3: Find the domain and range of the following functions:
(a) \(f(x) = \frac{1}{x-2}\), \(x \in \mathbb{R}\)
(b) \(f(x) = \frac{x}{x+5}\), \(x \in \mathbb{R}\)
(c) \(f(x) = \sqrt{x+2}\), \(x \in \mathbb{R}\)
Defined when \(x - 2 \neq 0 \implies x \neq 2\). Domain = \(\mathbb{R} \setminus \{2\}\).
\(y = \frac{1}{x-2} \implies x - 2 = \frac{1}{y} \implies x = \frac{1}{y} + 2\). Defined if \(y \neq 0\). Range = \(\mathbb{R} \setminus \{0\}\).
Defined when \(x + 5 \neq 0 \implies x \neq -5\). Domain = \(\mathbb{R} \setminus \{-5\}\).
\(y(x+5) = x \implies xy + 5y = x \implies x(1-y) = 5y \implies x = \frac{5y}{1-y}\). Real if \(1 - y \neq 0 \implies y \neq 1\). Range = \(\mathbb{R} \setminus \{1\}\).
Defined when \(x + 2 \ge 0 \implies x \ge -2\). Domain = \([-2, \infty)\).
\(y = \sqrt{x+2} \ge 0\) and \(y^2 = x + 2 \implies x = y^2 - 2 \ge -2 \implies y^2 \ge 0\). Range = \([0, \infty)\).
Example 4: Find the domain and range of the function \(f(x) = \frac{3x-1}{5x+2}\), \(x \in \mathbb{R}\).
Let \(y = \frac{3x-1}{5x+2} \implies 5xy + 2y = 3x - 1 \implies x(5y - 3) = -1 - 2y \implies x = \frac{2y+1}{3-5y}\).
Real when \(3 - 5y \neq 0 \implies y \neq \frac{3}{5}\). Range = \(\mathbb{R} \setminus \{\frac{3}{5}\}\).
Example 5: Find the domain and range of \(f : \mathbb{R} \to \mathbb{R}\) defined by \(f(x) = \sqrt{21 - 4x - x^2}\).
For real \(y\), \(5^2 - (x+2)^2 \ge 0 \implies (x+2)^2 \le 5^2 \implies -5 \le x+2 \le 5 \implies -7 \le x \le 3\).
Domain = \([-7, 3]\).
Again \(y^2 = 25 - (x+2)^2 \implies (x+2)^2 = 25 - y^2 \ge 0 \implies y^2 \le 25\). As \(y \ge 0\), \(0 \le y \le 5\).
Range = \([0, 5]\).
Example 6: Let \(f: \mathbb{R} \to \mathbb{R}\) be defined by \(f(x) = x^2\) and \(g: \mathbb{R} \to \mathbb{R}\) defined by \(g(x) = x - 1\). Find \((f \circ g)(x)\) and \((g \circ f)(x)\).
\((g \circ f)(x) = g(f(x)) = g(x^2) = \mathbf{x^2 - 1}\).
Example 7: Let \(f: \mathbb{R} \to \mathbb{R}\) be defined by \(f(x) = 8x^3\) and \(g(x) = x^{1/3}\). Find \((g \circ f)\) and \((f \circ g)\) and verify that \(g \circ f \neq f \circ g\).
\((f \circ g)(x) = f(g(x)) = f(x^{1/3}) = 8(x^{1/3})^3 = \mathbf{8x}\).
Clearly, \(2x \neq 8x\), so \(g \circ f \neq f \circ g\) (Proved).
Example 8: Let \(f(x) = x^2\) and \(g(x) = \sqrt{1 - x}\). Find \((g \circ f)(x)\) and \((f \circ g)(x)\).
\((f \circ g)(x) = f(g(x)) = f(\sqrt{1 - x}) = (\sqrt{1 - x})^2 = \mathbf{1 - x}\).
Example 9: If \(A = \{1, 2, 3\}\), \(B = \{4, 5, 6\}\) and \(f : A \to B\) is defined by \(f(1) = 4, f(2) = 5, f(3) = 6\). Write down \(f^{-1} : B \to A\) as a set of ordered pairs.
Reversing domain and range pairs gives:
\(f^{-1} = \{(4, 1), (5, 2), (6, 3)\}\).
Example 10: Let \(f: \mathbb{R} \to \mathbb{R}\) be defined by \(y = f(x) = 2x - 3\). Determine whether the inverse exists and find the formula for \(f^{-1}(x)\).
2. Onto: Let \(y = 2x - 3 \implies x = \frac{y+3}{2} \in \mathbb{R}\) for all \(y \in \mathbb{R}\). (Onto)
Since \(f\) is bijective, \(f^{-1}\) exists.
Now \(y = f(x) \iff x = f^{-1}(y) \implies f^{-1}(y) = \frac{y+3}{2}\).
Replacing dummy variable: \(f^{-1}(x) = \frac{x+3}{2}\).
Example 11: Let \(f : \mathbb{R} \to \mathbb{R}\) defined by \(y = f(x) = 4x + 3\) for all \(x \in \mathbb{R}\). Show that \(f\) is invertible and find \(f^{-1}\).
For any \(y \in \mathbb{R}\), \(x = \frac{y-3}{4} \in \mathbb{R}\) such that \(f(x) = 4\left(\frac{y-3}{4}\right) + 3 = y\) (Onto).
Therefore \(f\) is invertible.
Solving \(y = 4x + 3 \implies x = \frac{y-3}{4} \implies \mathbf{f^{-1}(x) = \frac{x-3}{4}}\).
Test your conceptual understanding with all 20 questions extracted from the official lesson quiz sheet:
Exercise 3.1: Functions, Domain, and Range
(b) Since \(-3 < 0\), \(f(-3) = (-3)^2 + 1 = 9 + 1 = \mathbf{10}\).
\(f(0) = 0 - 0 = 0\)
\(f(2) = 2^2 - 2(2) = 4 - 4 = 0\)
\(f(4) = 4^2 - 2(4) = 16 - 8 = 8\)
\(f(6) = 6^2 - 2(6) = 36 - 12 = 24\)
Range = \(\{0, 3, 8, 24\}\).
\(f(1) = 1/2, \quad f(2) = 2/3, \quad f(3) = 3/4, \quad f(4) = 4/5, \quad f(5) = 5/6, \quad f(6) = 6/7\).
Range = \(\{0, \frac{1}{2}, \frac{2}{3}, \frac{3}{4}, \frac{4}{5}, \frac{5}{6}, \frac{6}{7}\}\).
(i) Find the range of \(f\).
(ii) Is the function \(f\) one-one and onto or both?
(iii) If not, how can you make it one-to-one and onto both?
Range = \(\{-\frac{1}{2}, 0, \frac{1}{2}, 1, \frac{3}{2}, 2\}\).
(ii) Distinct elements have distinct images \(\implies\) \(f\) is one-one. However, \(\text{Range} \neq B\) (elements like \(-1\) and \(3\) in \(B\) have no pre-images), so \(f\) is not onto.
(iii) To make it both one-one and onto (bijective), restrict the co-domain \(B\) to equal the actual range set: \(B' = \{-\frac{1}{2}, 0, \frac{1}{2}, 1, \frac{3}{2}, 2\}\).
2. Onto: For any \(y \in \mathbb{R}\), there exists \(x = y^{1/5} \in \mathbb{R}\) such that \(f(x) = (y^{1/5})^5 = y\). Every element has a pre-image. Thus \(f\) is onto.
• The range is \([0, \infty)\). Negative real numbers (e.g. \(-5 \in \mathbb{R}\)) have no real pre-image. Hence \(f\) is not onto.
2. Onto: For any \(y \in \mathbb{R}\), \(y = 2x^3 + 1 \implies 2x^3 = y - 1 \implies x = \sqrt[3]{\frac{y-1}{2}} \in \mathbb{R}\). Thus every \(y\) has a pre-image, so \(f\) is onto.
(a) \(f: \mathbb{R} \to \mathbb{R}\), \(f(x) = 2x + 5\)
(b) \(f: \mathbb{R} \to \mathbb{R}\), \(f(x) = x^2 - 1\)
(c) \(f: [-2, 2] \to \mathbb{R}\), \(f(x) = x^2\)
(d) \(f: [0, 3] \to \mathbb{R}\), \(f(x) = x^2\)
(b) Neither: \(f(-1) = f(1) = 0\) (not one-one); range is \([-1, \infty) \neq \mathbb{R}\) (not onto).
(c) Neither: \(f(-2) = f(2) = 4\) (not one-one); range is \([0, 4] \neq \mathbb{R}\) (not onto).
(d) One-one but not onto: Since \(x \ge 0\), \(x_1^2 = x_2^2 \implies x_1 = x_2\) (one-one). Range is \([0, 9] \neq \mathbb{R}\) (not onto).
(a) \(y = 2x - 3\) | (b) \(f(x) = x^2 + 1\) | (c) \(y = x^2 - 6x + 6\)
(d) \(y = \frac{1}{x-3}\) | (e) \(y = \sqrt{x-1}\) | (f) \(y = \frac{x-2}{x+3}\)
(g) \(y = \frac{2x+1}{x-1}\) | (h) \(f(x) = \sqrt{9 - x^2}\) | (i) \(f(x) = \frac{1}{\sqrt{x-2}}\)
🔒 Locked Teacher Examination Portal
This assessment module generates official CDC Nepal specification grid examination items (Group A: 2 Marks, Group B: 3 Marks, Group C: 5 Marks). Enter the authorized instructor security key to unlock.
Use the floating pen toolbar to teach, sketch arrow diagrams, write formulas, or solve equations in real time!
Official curriculum video lecture on functions and inverse transformations:
0 Comments