• Call Now

1800-102-2727
•

# Types of Functions: One-One, Many-One, Onto and Into Functions

Function as we already know is basically a machine and we have different kinds of machine in this universe , so is the case with functions also .Functions can be classified on the basis of their domain, codomain & range.Let’s dig into the different types of functions in detail.

• One-one Function(Injective)
• Methods to determine whether a function is one-one or not
• Number of one-one Functions
• Many-one Function
• Number of Many-one Functions
• Onto Function
• Number of Onto Functions
• Into function
• Practice Problems
• FAQs

## One-one Function(Injective)

A function f : XY is defined to be one-one (or injective), if the images of distinct elements of X under f are distinct, i.e., for every x1, x2X, f(x1)=f(x2) x1=x2 .

Example: Let us consider the two functions as shown below:

In both the mappings, every element of set A is related to only one element of set B and no two elements in set A are related to the same element in set B. Therefore, both the mappings are injective or one-one.

## Methods to determine whether a function is one-one or not

There are two methods to determine whether the given function is one-one or not:

Method 1: Algebraic/Analytical Method

Let f:AB be a function, x1 and x2 be the two elements in set A, and the corresponding images of x1 and x2 in set B be f(x1) and f(x2), respectively. Now, for f to be a one-one function, f(x1)=f(x2)x1=x2 or x1x2f(x1)f(x2)

Example: Consider the function f:ℝℝ such that f(x)=3x+5.Now, in order to prove it is one-one, Let x1, x2ℝ such that f(x1)=f(x2)

3x1+5=3x2+5

3x1=3x2

x1=x2

So, x1, x2X, f(x1)=f(x2) x1=x2

Hence,the images of distinct elements of X under f are distinct.Therefore, the given function is one-one.

Example: Consider the function f:ℝℝ such that f(x)=x2+2.Now, let's check whether it is one-one or not, Let x1, x2ℝ such that f(x1)=f(x2)

x12+2=x22+2

x12=x22

x1=x2 or x1=-x2

So, x1, x2X, f(x1)=f(x2) x1=x2

Hence, the images of distinct elements of X under f are not distinct.Therefore, the given function is not one-one.

Method 2: Graphical Method (Horizontal line test)

Firstly, draw a horizontal line( parallel to x-axis) upon the graph of the function. Then,

• If the horizontal line intersects the graph at more than one point anywhere, then the function is not one-one.
• If the horizontal line intersects the graph at only one point everywhere, then the function is one-one.

This is just the graphical interpretation of ‘if xy, then f(x)f(y)

Example: Consider the function f(x)=y=x3

When we draw a horizontal line, parallel to x-axis, it cuts the graph of  only at one point, hence the function is one-one.

Method 3: Derivative Test

Let f:AB be a continuous and differentiable function, then f is one-one function if f'(x)<0 or f'(x)>0.

Example: Consider the function f:ℝ-{2}ℝ-{1} such that   Check whether the function is an injection or not.

Solution If f(x) is continuous and differentiable function then it will be injection if f'(x)<0 or f'(x)>0.

Here f(x) is a rational function, and a rational function is continuous and differentiable over it’s entire domain.

Therefore, f is one-one.

## Number of one-one functions

For a function f: AB, if n(A)=m and n(B)=n, then the number of one-one functions would be:

1. a) If nm, then 4P3
2. b) If n<m, then one-one functions do not exist.

Example: The number of one-one functions from set P={1,2,3} to set Q={4,5,6,7} is4P3 as n(A)=m= 3 and n(B)=n= 4.

Therefore, number of one-one functions from set P to Q is 24.

## Many-one Function

A function f:AB is said to be a many-one if there exist at least two or more elements of set A that have the same image in set B.In other words a function which is not one-one is many-one.

Example: Consider the given mapping,

It represents a many-one function as image of both x1,x2A is the same, i.e., y1B. Or we can write it as f(x1)=f(x2)=y1.

Note:

• If a function is one-one, then it cannot be many-one and vice-versa.
• Horizontal line test can be used to determine whether a function is many-one or not. If the horizontal line intersects the graph of the function at two or more points then it is a many-one function.
• Distinguish between many-one and constant function

Example: Consider the graph of the function f(x)=y=x2-4|x|+3=(|x|-2)2-1

When we draw an intersecting horizontal line parallel to x-axis, it intersects the graph of f(x) at more than one point as shown in the figure below. So, different values of x have the same image on y. Therefore, it is a many-one function

## Number of Many-one Functions

Number of many-one functions = (Total number of functions) - (number of one-one functions)

In general, if f:AB, n(A)=m and n(B)=n, then the number of many-one functions would be =nm - nPm.

Example: If A={1,2,3,4}, then the number of functions on set A, which are many-one, is:

1. a) 240 b) 248 c) 232 d) 256

Solution

Number of many-one functions = (Total number of functions) - (number of one-one functions) Number of many-one functions =nm - nPm;

Here, n=m=4;

Number of many-one functions= 44 - 4P4=256 - 24=232.

Hence, option (c) is the correct answer.

## Onto Function(Surjective)

If f:A→ B, is a function such that each and every element in B(codomain) has at least one preimage in A, then we say that f is an onto function.

In other words, iff b ∊ B, there exists some a ∈ A such that f(a)=b, then f is an onto function. An onto function is also known as a surjective function.

Note: A function, f is said to be an onto function if the range of f= codomain of the function f.

Example:

Both the functions given above are onto functions, as every element in the codomain set has at least one preimage in the domain set.

Number of onto functions

For obtaining the formula for the number of onto functions let us have a quick recap of the “Principle of inclusion & exclusion“

For two sets A & B the principle of inclusion and exclusion can be understood as:

Similarly for three sets A, B & C the principle of inclusion and exclusion can be understood as:

For a function f: AB, if n(A)=m and n(B)=n, then

Case 1: When m n

• ∑n(Ai) = Total number of functions when yi is excluded = nC1(n-1)m
• ∑n(Ai⋂Aj) = Total number of functions when yi and yjare excluded = nC2(n-2)m
• Total number of functions where at least one element is excluded =n(A1 A2A3.....An)

Number of onto functions = Total number of functions-Total number of functions where at least one element is excluded

Number of onto functions

Case 2: When n>m, onto function doesn’t exist.

## Into Functions

If a function, f:A→ B, is such that there exists at least one element in B (codomain) that is not the image of any element of A, then function f is known as an into function.

In other words , if the range of the function is a proper subset of its codomain, then the function is said to be an into function. Range Co-domain.

Example: Consider the mapping given below.

The function represented by this mapping is an into function as the elements a,e,fX2(codomain) are not the image of any element of set X1(domain).

Note: Number of into functions = (Total number of functions) - (Number of onto functions).

Example: f: ℝ ℝ be a function such that f(x) =x2+x-2, Check whether it is an into function or not?

Solution: Plotting the graph for f(x) =x2+x-2

Here, the domain and codomain of the given function is ℝ and the range of the function from the graph is [-94,∞).As the range is a subset of the codomain, the given function is an into function.

## Practice Problems

Example: Identify f(x) = x|x| as a one-one or many-one function.

Solution:Given, f(x) = x|x|

The graph for f(x) is plotted below:

Any line drawn parallel to x-axis will cut the graph at only one point.Therefore, the given function is a one-one function.

Example: Determine whether the function f(x) =|x| , where f: ℝ+ ℝ is into or onto function.

Solution

f(x) =|x| , where x ∊ ℝ+ , For x ∊ ℝ+, f(x) = x. Now plotting the graph for f(x)

For the domain, x ∊ ℝ+, the range of the function is y ∊ ℝ+and the codomain of the function is given as ℝ. Since the range and the co-domain of the given function are not equal, the given function is an into function.

Example: Determine whether the function f(x) given by  is one-one or not.

Solution:

As f'(x)>0, therefore f(x) is a one-one function.

Example: Determine whether the function f: ℝ-{0} ℝ, defined by f(x)=1-|log|x|| is an onto function or not.

Solution:

Let’s draw the graph of the function first.

As given, the domain of the function is ℝ-{0} and the codomain is ℝ.

Clearly from the graph, the range of the function is (-,1]. So, range codomain.

Therefore, the function is not onto.

## FAQs

Q 1 . Can a function be both one one as well as onto?
Answer: Yes a function can be both one one and onto simultaneously. Such functions are known as bijective functions.

Q 2. What is the difference between Vertical and Horizontal line test?
Answer: A vertical line test is used to check whether a relation is a function or not whereas a horizontal line test is used to check whether a function is one one or not.

Q 3.How to determine whether a function is onto using graph?
Answer: Using graph, we can figure out the range of the function and then we can compare it with the codomain to predict whether the given function is onto or not.

Q 4. Are one-one functions invertible?
Answer: For a function to be invertible, it should be both one one as well as onto.So we cannot predict whether the function is invertible just on the basis of one one condition.