For a mapping to be a function, we can have two cases. The first occurs when the mapping is one-to-one and the second case occurs when the mapping is many-to-one. Essentially, this means that a function can have multiple input values producing the same output value, but not multiple outputs produced by a single input.
Here, we will learn about the two cases of mapping that are considered functions. In addition, we will look at some examples to apply the concepts.
Case (i): One-to-one mapping
We are going to consider two non-empty sets A and B. A mapping from A to B is a rule that associates each element of set A with an element of set B.
A mapping can be represented using a mapping diagram. Consider the following mapping that has the sets A={-2, -1, 0, 1, 2} and B={0, 1, 2, 3, 4, 5, 6}.

In case (i), we observe that each element of set A is related to only one element of set B. This is a so-called one-to-one mapping.
The fact that there are no elements of set A that are related to elements 0 or 1 in set B is not important.
A one-to-one mapping is called a function. Usually, we denote using f the rule that associates each element of A with an element of B.
For example, in the mapping above, the rule is “add 4”. Using function notation, we can write:
$latex f(x)=x+4~~$ or $latex ~~f:~x\rightarrow x+4$
Case (ii): Many-to-one mapping
Again, we are going to consider the sets A={-2, -1, 0, 1, 2} and B={0, 1, 2, 3, 4, 5, 6}, but in this case, we have the following mapping diagram:

In case (ii) we observe that two elements of set A are related to one element of set B. This is either a two-to-one mapping or a many-to-one mapping.
A many-to-one mapping is also called a function.
For example, in the mapping above, the rule is “square”. Using function notation, we can write:
$latex f(x)=x^2~~$ or $latex ~~f:~x\rightarrow x^2$
Examples of mappings that are functions
In the following examples, we can apply what we have learned about one-to-one and many-to-one mapping to determine what type of relationship the following functions are.
EXAMPLE 1
Determine whether the function $latex f(x)=\frac{x}{2}+2$ is a one-to-one or many-to-one function.
Solution: The graph of the function f is as follows

We can see that the graph of $latex f(x)=\frac{x}{2}+2$ is a straight line. Furthermore, we clearly see that the function is one-to-one since each value of x is related to only one value of y.
EXAMPLE 2
Determine whether the function $latex f(x)=x^2+1$ is a one-to-one or many-to-one function.
Solution: Since we have $latex f(-1)=(-1)^2+1=2$ and $latex f(1)=1^2+1=2$, we know that the function is not one to one. Its graph is:

Looking at the graph of the function, we see that this function is many to one, specifically two to one.
EXAMPLE 3
Is the function $latex f(x)=(x^4+1)^2-3$ a one-to-one or many-to-one function?
Solution: One way to determine if a function is many-to-one is to use the $latex f(-1)=f(1)$ test. Therefore, we have:
$latex f(1)=(1^4+1)^2-3$
$latex =(2)^2-3$
$latex =4-3$
$latex =1$
$latex f(-1)=((-1)^4+1)^2-3$
$latex =(2)^2-3$
$latex =4-3$
$latex =1$
We see that $latex f(-1)=f(1)$ is true. This means that the function is many to one.
Note: Consider that the $latex f(-1)=f(1)$ test works only when the function is symmetric about the y-axis.
See also
Interested in learning more about algebraic functions? Take a look at these pages: