We learned that a function is a rule that assigns one and only one value to each element of its domain. However a function may assign the same value to two or more elements in its domain. For example assigns 4 to both and . Or assigns the same value to both and . Or where is a constant, takes on the same value at all . But some functions assign distinct values to distinct elements of their domains. For example, takes on a different value at each value of . Such functions are called one-to-one or 1-1 functions.
Definition: A function is one-to-one (or an injection) if for all in
Equivalently we can say that a function is one-to-one whenever in , then .
The above definition states that a one-to-one function takes on each value in its range only once. If the graph of the function is cut by a horizontal line at more than one point, the value will correspond to more than one value of , and the function will not be one-to-one. We may use the following test to specify whether or not a function is one-to-one.
Horizontal line test for one-to-one functions:
A function is one-to-one if and only if each horizontal line intersects the graph of at most once.
Example 1
Let (). Is a one-to-one function?
Solution
Method 1: If then . Thus is a one-to-one function. Method 2: Each horizontal line intersects the graph of exactly once (not twice or more). So is a one-to-one function.
Figure 1: Graph of a linear function is cut by each horizontal line once
Example 2
Let . Is a one-to-one function?
Solution
Method 1: If then or . Therefore, is not a one-to-one function. Method 2: Because a horizontal line where intersects the graph of twice, it is not a one-to-one function.
Figure 2: is not one-to-one on its entire domain
Note that in the above example, although is not a one-to-one function on its entire natural domain , if we restrict the domain to , i.e. with , then the horizontal line test is passed and the function becomes one-to-one. Remark that the original and restricted functions are not the same functions because their domains are different. However, the two functions assume the same values on .
The function is also one-to-one.
Figure 3: Restricting the domain of to makes it a one-to-one function. As we can see each horizontal line meets the graph at most once.
Example 3
Let , where . Is a one-to-one function?
Solution
Method 1: Yes, it is because if then . Method 2: Each horizontal line () intersects the graph of once and never intersects the graph of .
Figure 4: Each horizontal line intersects the graph at most once
We can figure out whether or not a function is one-to-one just by looking at their graphs. In the following table, we have investigated some common functions:
function
natural domain
1-1 on natural domain?
Graphs
( is even)
no
( is odd)
yes
( is even)
yes
( is odd)
yes
( is even)
no
( is odd)
yes
Note that every monotonic function is one-to-one. Recall that a monotonic function is a function that is increasing or decreasing. Suppose is an increasing function because if then and if then . That is if then . Similarly, we can show that if is a decreasing function, then it is one-to-one.
Every increasing or decreasing function is one-to-one.