Types of Functions
We can divide all functions into two categories: injective (one-to-one) and non-injective (many-to-one), based on whether distinct inputs always produce distinct outputs. Injective functions ensure that no two different inputs map to the same output, while non-injective functions allow multiple inputs to share the same output.
Independently, we can also classify functions into two categories: surjective (onto) and non-surjective (into), based on whether every element in the codomain is mapped by at least one element from the domain. Surjective functions cover the entire codomain, while non-surjective functions leave some elements in the codomain unmapped.
Combining these two classifications, functions can be categorized into four distinct types:
- One-one onto (also called bijective): Functions that are both injective and surjective.
- One-one into: Functions that are injective but not surjective.
- Many-one onto: Functions that are surjective but not injective.
- Many-one into: Functions that are neither injective nor surjective.
Injective Function (One-to-One Function) vs Non-Injective Function (Many-to-One Function)
A function \( f: A \to B \) is said to be injective (or a one-to-one function) if and only if:
This means that no two distinct elements in the domain \( A \) can map to the same element in the codomain \( B \). The injectivity of a function ensures that the outputs of \( f \) are unique for distinct inputs.
Logical Explanation:
If someone claims that the outputs of \( f \) at \( x_1 \) and \( x_2 \) are equal (i.e., \( f(x_1) = f(x_2) \)), then by the definition of injectivity, it must follow that \( x_1 = x_2 \). In other words, if the outputs \( f(x_1) \) and \( f(x_2) \) are the same, the corresponding inputs \( x_1 \) and \( x_2 \) cannot be distinct—they must be equal.
Contrapositive:
An equivalent way of expressing injectivity is:
This means distinct inputs in \( A \) must always map to distinct outputs in \( B \).
To understand, consider the following contrasting examples:
-
Injective Function: \( f(x) = 2x \) for \( x \in \mathbb{R} \):
To prove injectivity, assume:
\[ f(x_1) = f(x_2). \]This implies:
\[ 2x_1 = 2x_2. \]Dividing through by 2, we get:
\[ x_1 = x_2. \]Hence, \( f(x) = 2x \) is injective, as no two distinct inputs produce the same output.
-
Non-Injective Function: \( f(x) = x^2 \) for \( x \in \mathbb{R} \):
To test injectivity, assume:
\[ f(x_1) = f(x_2). \]This implies:
\[ x_1^2 = x_2^2. \]Taking square roots:
\[ x_1 = x_2 \quad \text{or} \quad x_1 = -x_2. \]Since \( x_1 \) and \( x_2 \) can be distinct (\( x_1 = 2 \) and \( x_2 = -2 \)) but yield the same output (\( f(2) = f(-2) = 4 \)), \( f(x) = x^2 \) is not injective.
Horizontal Line Test for Injectivity
The horizontal line test is a direct way to visually verify if a function \( f(x) \) is injective. It works as follows:
- If any horizontal line drawn in the graph's range intersects the function's graph at most once, the function is injective.
- If any horizontal line intersects the graph more than once, the function is not injective.
This test aligns with the formal definition of injectivity: if \( f(x_1) = f(x_2) \), then \( x_1 = x_2 \). A horizontal line intersecting the graph more than once indicates that there exist distinct \( x_1 \) and \( x_2 \) such that \( f(x_1) = f(x_2) \), violating injectivity.
Example
1. Injective Function \( f(x) = 2x \):
The graph of \( f(x) = 2x \) is a straight line through the origin with a positive slope. No matter where a horizontal line is drawn, it intersects the graph at most one point. This confirms that \( f(x) = 2x \) is injective.
2. Non-Injective Function \( f(x) = x^2 \):
The graph of \( f(x) = x^2 \) is a parabola symmetric about the y-axis. Horizontal lines drawn above the x-axis (e.g., \( y = 4 \)) intersect the parabola at two points (e.g., \( x = 2 \) and \( x = -2 \)). This indicates \( f(2) = f(-2) = 4 \), proving \( f(x) = x^2 \) is not injective.
Example
Let \( f : \mathbb{R} \to \mathbb{R} \) and \( f(x) = x^3 \). Show that \( f \) is a one-to-one function.
Solution: Let \( x_1, x_2 \in \text{Dom}(f) = \mathbb{R} \).
Thus, the function \( f(x) \) is one-to-one.
Proving injectivity using derivatives
*ignore this section till you complete application of derivatives*
Proving injectivity using the definition \( f(x_1) = f(x_2) \implies x_1 = x_2 \) is mathematically rigorous and perfect. However, applying this method can become cumbersome and complex, especially for functions with intricate or non-trivial algebraic forms.
For most functions of our concern, calculus provides a more practical and efficient way to determine injectivity. A differentiable function (even if non-differentiable at some isolated points) is one-to-one if and only if it is strictly increasing or strictly decreasing on its entire domain. This condition eliminates the possibility of two distinct inputs mapping to the same output.
Key Criterion for Injectivity Using Calculus:
-
A function \( f(x) \) is strictly increasing on an interval if:
\[ f'(x) \geq 0 \quad \text{for all } x \text{ in the interval, with equality occurring only at isolated points.} \]This ensures that \( f(x) \) does not "flatten" over any subinterval (derivative is only zero at isolated points and not intervals) and it does not have any turnings, preventing multiple inputs from producing the same output.
-
A function \( f(x) \) is strictly decreasing on an interval if:
\[ f'(x) \leq 0 \quad \text{for all } x \text{ in the interval, with equality occurring only at isolated points.} \]
Examples
1. \( f(x) = 3x + 5 \)
Here, \( f'(x) = 3 > 0 \) for all \( x \in \mathbb{R} \). Since \( f'(x) > 0 \), the function is strictly increasing and hence injective.
2. \( f(x) = x^3 \)
Here, \( f'(x) = 3x^2 \). Note that \( f'(x) = 0 \) only at the isolated point \( x = 0 \), and \( f'(x) > 0 \) elsewhere. Thus, \( f(x) = x^3 \) is strictly increasing and injective.
3. \( f(x) = x^2 \)
Here, \( f'(x) = 2x \). The derivative is zero at \( x = 0 \), but it changes sign at this point. Specifically, \( f'(x) > 0 \) for \( x > 0 \) and \( f'(x) < 0 \) for \( x < 0 \). Since the derivative is not consistently nonnegative or nonpositive, \( f(x) = x^2 \) is not injective (\( f(1) = f(-1) = 1 \)).
4. \( f(x) = \ln(x) \)
Here, \( f'(x) = 1/x > 0 \) for \( x > 0 \). Since \( f'(x) > 0 \) throughout the domain \( x > 0 \), \( f(x) \) is strictly increasing and injective.
Conclusion
Using calculus to determine injectivity is a powerful tool. By checking whether \( f'(x) \geq 0 \) (with equality only at isolated points) or \( f'(x) \leq 0 \) (with equality only at isolated points), we can efficiently verify one-to-one behavior. This method avoids the complexity of directly solving \( f(x_1) = f(x_2) \) for most functions. It is particularly useful for differentiable functions but can also provide insights for functions that are piecewise differentiable.
Example
Problem:
Let \( f : \mathbb{R}^+ \cup \{0\} \to \mathbb{R} \) such that \( f(x) = x^2 \). Is \( f(x) \) a one-to-one function?
Solution:
Method 1: Using Definition
Let \( a, b \in \mathbb{R}^+ \cup \{0\} \). Assume \( f(a) = f(b) \), i.e.,
From \( a+b = 0 \), and since \( a, b \geq 0 \), it must follow that:
Thus, \( a-b = 0 \) or \( a = b \). Therefore:
Since \( f(a) = f(b) \implies a = b \), the function \( f(x) = x^2 \) is one-to-one on \( \mathbb{R}^+ \cup \{0\} \).
Method 2: Using Derivatives
To check injectivity using calculus, we examine the monotonicity of \( f(x) = x^2 \) over the domain \( \mathbb{R}^+ \cup \{0\} \).
-
Compute the derivative:
\[ f'(x) = 2x. \] -
Check the sign of \( f'(x) \) over \( \mathbb{R}^+ \cup \{0\} \):
\[ f'(x) \geq 0 \quad \text{for all } x \geq 0. \]Moreover, \( f'(x) = 0 \) only at \( x = 0 \), which is an isolated point.
-
Since \( f'(x) > 0 \) for \( x > 0 \) and \( f'(x) = 0 \) only at an isolated point, \( f(x) = x^2 \) is strictly increasing on \( \mathbb{R}^+ \cup \{0\} \).
Thus, \( f(x) \) is one-to-one on \( \mathbb{R}^+ \cup \{0\} \).
Example
Prove that the function \( f : \mathbb{R} \setminus \left\{-\frac{d}{c}\right\} \to \mathbb{R} \) defined as:
is a one-to-one function.
Solution:
Method 1: Using the Definition of Injectivity
To prove \( f(x) \) is injective, we assume \( f(x_1) = f(x_2) \) and show that this implies \( x_1 = x_2 \). Starting with the given equation:
Since the denominators \( cx_1 + d \neq 0 \) and \( cx_2 + d \neq 0 \) (as \( x_1, x_2 \neq -\frac{d}{c} \)), we can cross-multiply:
Expanding both sides gives:
By canceling the common terms \( acx_1x_2 \) and \( bd \), we simplify the equation to:
Rearranging terms yields:
Factoring \( (x_1 - x_2) \), we have:
Since \( ad - bc \neq 0 \) (given), it follows that:
Thus, \( f(x) \) satisfies the definition of injectivity, as \( f(x_1) = f(x_2) \) implies \( x_1 = x_2 \).
Method 2: Using Calculus
Alternatively, we can use calculus to establish injectivity by checking whether \( f(x) \) is strictly monotonic (strictly increasing or decreasing) on its domain. Begin by differentiating \( f(x) = \frac{ax + b}{cx + d} \) using the quotient rule:
Simplifying the numerator:
Combining terms yields:
Now, analyze the derivative. The numerator \( ad - bc \) is a constant, and it is nonzero by the given condition \( ad - bc \neq 0 \). The denominator \( (cx + d)^2 \) is positive for all \( x \in \mathbb{R} \setminus \{-\frac{d}{c}\} \) because it is squared.
Thus, \( f'(x) > 0 \) if \( ad - bc > 0 \), or \( f'(x) < 0 \) if \( ad - bc < 0 \). In either case, \( f(x) \) is strictly monotonic on its domain, meaning it is either strictly increasing or strictly decreasing throughout. Since a strictly monotonic function cannot produce the same output for two different inputs, \( f(x) \) must be injective.
By both the definition of injectivity and the monotonicity test using calculus, we have shown that \( f(x) = \frac{ax + b}{cx + d} \) is a one-to-one function on the domain \( \mathbb{R} \setminus \{-\frac{d}{c}\} \). \(\blacksquare\)
Many-One Function
A function \( f: A \to B \) is said to be many-one if two or more distinct elements in the domain \( A \) map to the same element in the codomain \( B \). This means the function violates injectivity.
Formally, \( f \) is many-one if:
Example
Consider the function \( f(x) = x^2 \) with \( x \in \mathbb{R} \). Here:
Hence, \( f(x) = x^2 \) is a many-one function because two distinct inputs, \( x = -2 \) and \( x = 2 \), map to the same output, \( 4 \).
Graphical Representation of a Many-One Function:
On the graph of a many-one function, some horizontal lines intersect the curve more than once. This visually confirms that multiple inputs in the domain correspond to the same output.
Onto or Surjective Function
A function \( f \) defined from set \( A \) to set \( B \) is said to be onto or surjective if and only if every element of the codomain \( B \) has at least one preimage in the domain \( A \). Formally, \( f : A \to B \) is surjective if:
For every element \( b \) in the codomain \( B \), there exists at least one element \( a \) in the domain \( A \) such that the function \( f \) maps \( a \) to \( b \). In other words, for a function to be surjective, every element in the codomain must be the output of the function for at least one input from the domain.
This means that no element in the codomain is "unreachable" by the function. If even a single element in the codomain does not correspond to any input from the domain, the function is not surjective.
To understand surjectivity intuitively, imagine a mapping from one set to another. If every element in the codomain \( B \) is hit by at least one arrow from the domain \( A \), the function is surjective. However, if there exists even a single element in \( B \) that is not reached by any element in \( A \), the function is not surjective.
Graphically, surjective functions correspond to mappings where the codomain and range coincide. In other words, no part of the codomain is "left out."
Proving a Function is Onto
Theoretical Approach
The most direct method to prove a function is surjective is to verify that for every \( b \in B \), there exists at least one \( a \in A \) such that \( f(a) = b \). This method involves solving \( f(a) = b \) for \( a \) in terms of \( b \) and confirming that \( a \) belongs to the domain.
For example, consider the function \( f : \mathbb{R} \to \mathbb{R} \) defined by:
To check if \( f(x) \) is surjective, we need to verify whether every \( b \in \mathbb{R} \) has a corresponding \( x \in \mathbb{R} \) such that \( f(x) = b \). Assume \( f(x) = b \):
Solving for \( x \), we get:
Since \( x \in \mathbb{R} \), this confirms that for every \( b \in \mathbb{R} \), there exists an \( x \in \mathbb{R} \) such that \( f(x) = b \). Hence, \( f(x) \) is surjective.
In contrast to the above example, consider the following example:
Consider \( f : \mathbb{Z} \to \mathbb{Z} \) such that \( f(x) = 3x + 4 \). We will prove that \(f\) is not an onto function.
Let \( b \in \text{codomain}(f) \), i.e., \( b \in \mathbb{Z} \). Then we solve the equation:
For \( f(x) \) to be surjective, \( x \) must be an integer (\( x \in \mathbb{Z} \)) for every \( b \in \mathbb{Z} \). However, \( \frac{b - 4}{3} \) is not necessarily an integer for all \( b \in \mathbb{Z} \).
For example, if \( b = 5 \), we have:
Here, \( x \) is not an integer (\( x \notin \mathbb{Z} \)), which means that \( b = 5 \) has no preimage in the domain \( \mathbb{Z} \). Thus, \( f(x) \) is not surjective.
Similarly, if \( b = 7 \), we calculate:
Here, \( x \) is an integer, so \( b = 7 \) has a preimage. However, since not every \( b \in \mathbb{Z} \) satisfies this condition (as seen with \( b = 5 \)), the function is not onto.
Range-Based Approach
Another method to determine whether a function is surjective involves calculating its range and comparing it to its codomain. If the range equals the codomain, the function is surjective. If the range is a proper subset of the codomain, the function is not surjective.
For instance, consider the function \( f : \mathbb{R} \to \mathbb{R} \) defined by:
Here, observe that \( x^2 + 2 > 0 \) and \( x^4 + x^2 + 1 > 0 \) for all \( x \in \mathbb{R} \). Thus, \( f(x) > 0 \) for all \( x \in \mathbb{R} \). This implies that the range of \( f(x) \) consists only of positive values, which is a proper subset of \( \mathbb{R} \) (the codomain). Therefore, \( f(x) \) is not surjective.
In some cases, we may not need to explicitly calculate the entire range. A qualitative understanding of the function's behavior can often suffice. For example, if the function \( f(x) \) cannot produce certain values in the codomain due to its structure, we can directly conclude that it is not surjective.
Example
Let \( f : \mathbb{R} \to \mathbb{R} \) be defined as:
This function is surjective because it is a polynomial of odd degree, and it is well-known that the range of any polynomial of odd degree is equal to \( \mathbb{R} \). Thus, for every \( b \in \mathbb{R} \), there exists at least one \( x \in \mathbb{R} \) such that \( f(x) = b \).
Example
Let \( f : \mathbb{R} \to A \) be defined as:
Find the codomain \( A \) such that \( f \) is an onto function.
Solution:
To ensure that \( f(x) \) is onto, the codomain \( A \) must be equal to the range of \( f(x) \). We calculate the range of \( f(x) \) as follows:
-
Since \( \sin x \) is a periodic function with values satisfying:
\[ -1 \leq \sin x \leq 1 \quad \text{for all } x \in \mathbb{R}, \]the values of \( \sin x \) are confined to this interval.
-
Taking the exponential of \( \sin x \), we have:
\[ e^{-1} \leq e^{\sin x} \leq e^1. \]This follows from the fact that the exponential function \( e^x \) is strictly increasing, preserving the order of inequalities.
-
Multiplying \( e^{\sin x} \) by 2 (as per the definition of \( f(x) \)), we obtain:
\[ 2e^{-1} \leq f(x) \leq 2e. \]
Thus, the range of \( f(x) \) is the interval \( [2e^{-1}, 2e] \).
To make \( f(x) \) surjective, the codomain \( A \) must be equal to this range. Therefore:
Therefore, the function \( f(x) = 2e^{\sin x} \) is onto if the codomain \( A \) is \( [2e^{-1}, 2e] \).
Non-Surjective (Into) Function
A function \( f : A \to B \) is said to be non-surjective (or into) if there exists at least one element in the codomain \( B \) that is not the image of any element in the domain \( A \). In other words, the range of the function is a proper subset of the codomain.
Consider the function \( f : \mathbb{R} \to \mathbb{R} \) defined as \( f(x) = 1 - x^2 \). The domain is \( \mathbb{R} \), and the codomain is also \( \mathbb{R} \). To determine whether \( f(x) \) is surjective, we calculate the range of \( f(x) \).
The function \( f(x) = 1 - x^2 \) involves the square of \( x \), which satisfies \( x^2 \geq 0 \) for all \( x \in \mathbb{R} \). Thus, \( -x^2 \leq 0 \), and adding 1 gives \( f(x) = 1 - x^2 \leq 1 \). Therefore, the output of \( f(x) \) satisfies:
The range of \( f(x) \) is \( (-\infty, 1] \), which is the set of all real numbers less than or equal to 1. However, the codomain is \( \mathbb{R} \), which includes all real numbers. Clearly, there are elements in the codomain, such as \( 2 \) or \( 3 \), that are not in the range of \( f(x) \). For example, there does not exist any \( x \in \mathbb{R} \) such that \( f(x) = 2 \), because \( f(x) = 1 - x^2 \leq 1 \) for all \( x \).
Since the range \( (-\infty, 1] \) is strictly smaller than the codomain \( \mathbb{R} \), the function \( f(x) = 1 - x^2 \) is not surjective. Thus, it is a non-surjective (into) function.
Bijective Function
A function \( f : A \to B \) is said to be bijective if it is both injective (one-to-one) and surjective (onto). In simpler terms, a bijective function establishes a perfect "pairing" between elements of the domain \( A \) and elements of the codomain \( B \), such that every element in \( B \) is mapped to by exactly one element in \( A \).
Formally:
- Injectivity ensures that no two distinct elements in \( A \) are mapped to the same element in \( B \).
- Surjectivity ensures that every element in \( B \) has at least one preimage in \( A \).
Example
Prove that the function \( f : \mathbb{R} \to \mathbb{R} \), defined as:
is a bijective function.
Solution:
To prove that \( f(x) \) is bijective, we need to show that it is both injective (one-to-one) and surjective (onto).
Step 1: Prove Injectivity
To prove that \( f(x) \) is one-to-one, we calculate its derivative and show that \( f'(x) \) does not change sign, ensuring the function is strictly monotonic.
The derivative of \( f(x) \) is:
Since \( 3x^2 \geq 0 \) for all \( x \in \mathbb{R} \), we have:
This implies that \( f(x) \) is strictly increasing for all \( x \in \mathbb{R} \). A strictly increasing function is injective because distinct inputs \( x_1 \neq x_2 \) always yield distinct outputs \( f(x_1) \neq f(x_2) \).
Thus, \( f(x) \) is injective.
Step 2: Prove Surjectivity
To prove that \( f(x) \) is onto, we need to show that its range equals its codomain \( \mathbb{R} \).
The function \( f(x) = x^3 + 10x - 100 \) is a polynomial of degree 3. It is well-known that any odd-degree polynomial has a range equal to \( \mathbb{R} \), because as \( x \to \infty \), \( f(x) \to \infty \), and as \( x \to -\infty \), \( f(x) \to -\infty \). Furthermore, since \( f(x) \) is continuous (all polynomials are continuous), the Intermediate Value Theorem ensures that \( f(x) \) takes every real value \( b \in \mathbb{R} \) at some point \( x \in \mathbb{R} \).
Thus, the range of \( f(x) \) is \( \mathbb{R} \), which matches its codomain \( \mathbb{R} \).
Since \( f(x) \) is both injective and surjective, it is a bijective function.