• Written By Keerthi Kulkarni
  • Last Modified 14-03-2024

Types of Functions: Definition, Classification and Examples

img-icon

Types of Functions: Functions are the relation of any two sets. A relation describes the cartesian product of two sets. Cartesian products of two sets \(A\) and \(B\) such that \(a \in A\) and \(b \in B\), is given by the collection of all the order pairs \((a, b)\). A function is a relation in which for every input value, there is only one output.

Different types of functions are based on the relationship between elements, such as into, onto, one to one, many to one onto (bijective), and many to one into functions. In this article, we will discuss different types of functions along with their properties and diagrams.

Definition of Function

Functions are the relation of any two sets. \(A\) relation describes the cartesian product of two sets. Cartesian product of two sets \(A\) and \(B,\) such that \(a∈A\) and \(b∈B,\) is given by the collection of all order pairs \((a, b).\)

Relation tells that every element of one set is mapped to one or more elements of the other set. The function is the special relation, in which elements of one set is mapped to only one element of another set. \(A\) function is a relation in which for every input value, there is only one output. Consider a relation \(f\) from set \(A\) to set \(B.\)

And, a relation \(f\) is said to be a function of each element of set \(A\) associated with only one element of set \(B.\)

Definition of Function

Domain, Co-Domain, and Range of Function

The set of all values, taken as the input to the function, is called the domain. The values of the domain are independent values. The set of all values, which comes as the output, is known as the function’s range. The value of the range is dependent variables. 

The set of all possible values of the function’s output is known as the function’s co-domain. The range is the part of the co-domain of the function.

Domain, Co-Domain and Range of Function

In the below example: The set of values \({\rm{\{ 1,2,3,4\} }}\) in the first set are the domain of the function. The set of all values \({\rm{\{ 1,2,3,4\} }}\) in the second set is co-domain of the function. But input values are mapped to only \({\rm{\{ 2,3\} }}\) of the second set, which is known as the range of the function.

Domain, Co-Domain and Range of Function

One to One (Injective) Function

A function \(f(x):x \to y\) is said to be one to one function if all the distinct elements of one set are mapped to distinct elements of another set. One to one function is also called an injective function.

Property:
The function \(f:A \to B,\) is called one to one function if \(f\left( {{x_1}} \right) = f\left( {{x_2}} \right),\) that means \({x_1} = {x_2}.\) Every element of set \(A\) is mapped to every distinct element of set \(B.\)

Condition:
After mapping, every element of the domain of the function has only one image with a co-domain in this type of function.

Example:
In the function \(f = \{ (A,1),(B,2),(C,3)\} ,\) every element of the domain \(\{ A,B,C\} \) are mapped to distinct elements of co-domain \({\rm{\{ 1,2,3,\} }}{\rm{.}}\) 

One to One (Injective) Function:

So, the given function is one to one function.

Many to One Function

A function \(f(x):x \to y\) is said to be many to one function if one or more than one element of a set is mapped to the same elements of another set.

Property: The function \(f:A \to B,\) is called many to one function if one or more elements of set \(A\) are mapped to the same element of set \(B.\)

Condition: After mapping, one or more than one element in the function domain has the same image with a co-domain in this type of function.

Example: In the function \(f:X \to Y = \{ (1,x),(2,x),(3,x),(4,y),(5,z)\} ,\) the elements \(\{ 1,2,3\} \) of the domain are mapped to same element \(\left\{ x \right\}\) of co-domain. 

So, the given function is many to one function.

Many to One Function:

Onto or Surjective Function

A function \(f(x):A \to B\) is said to be onto function or surjective if every element of set \(B\) is an image of any element of set \(A.\)  For every \(y∈B,\) there exists an element \(x\) in \(A,\) such that \(y = f\left( x \right).\)

In the onto function, the range and co-domain are equal. Every element of the co-domain is mapped with elements of the domain. We know that the elements which are mapped with the elements of the domain are range. Onto function is also called a surjective function.

Property:
The function \(f:A \to B,\) is called onto function if all the elements of set \(B\) are mapped with any of the elements of set \(A.\)

Condition:
The range of the onto function should be equal to the co-domain of the function.

Example:
In the function \(f:X \to Y = \{ (1,b),(2,a),(3,c),(4,c)\} ,\) all the elements \(\{ a,b,c\} \) of the co-domain are the images of the elements \(\{ 1,2,3,4\} \) of domain. 

So, the given function is onto function.

Onto or Surjective Function

Into Function

A function \(f(x):A \to B\) is said to be into a function if one or more than one element of set \(B\) is not an image of any element of set \(A.\)

In the into function, all the elements of the co-domain are not mapped with the elements of the function.

Property:
The function \(f:A \to B\) is called into function; at least one or more than one element of set \(B\) does not have a pre-image in the elements of set \(A.\)

Condition:
The range and co-domain of the onto function are not equal. At least one or more co-domain element does not have a pre-image in the elements of the domain.

Example:
In the function: \(f(x) = \{ (a,1),(b,2),(c,3)\} ,\) all the elements \(\{ 1,2,3,4\} \) of co-domain are not mapped with the elements of \(\{ a,b,c\} \) of the domain. 

Here, the range of the function \(f(x)\) is \(\{ 1,2,3\} \) is not equalled to the co-domain \(\{ 1,2,3,4\} \) of the function \(f(x).\)

So, the given function is into function.

Into Function

One to One Onto Function (Bijective Function)

A function \(f:A \to B\) is a bijective function if it is both one to one (injective) function and an onto (surjective) function.

Properties: 

  1. The function \(f:A \to B,\) is called one to one function if \(f\left( {{x_1}} \right)f = \left( {{x_2}} \right),\) that means \({x_1} = {x_2}.\) Every element of set \(A\) is mapped to every distinct element of set \(B.\)
  2. The function \(f:A \to B,\) is called onto function if all the elements of set B are mapped with any of the elements of set \(A.\)

Conditions:

  1. After mapping, every image of the domain of the function has only one image with a co-domain in this type of function.
  2. The range of the onto function should be equal to the co-domain of the function.

Example:
In the function \(f = \{ (A,1),(B,2),(C,3)\} ,\) every element of the domain \(\{ A,B,C\} \) are mapped to distinct elements of co-domain \(\{ 1,2,3,\} .\) 

So, the given function is one to one function.

And, all the elements of the co-domain \(\{ 1,2,3\} \) are the images of the elements of the domain \(\{ A,B,C\} .\) So, the given function is onto function.

Here, the function is both one to one and onto function. Therefore, the given function is bijective.

One to One Onto Function (Bijective Function)

Many to One Into Function

A function \(f:X \to Y\) is called the many to one into function if it is both a many to one function and also into function.

Properties:

  1. The function \(f:A \to B,\) is called one to one function if \(f\left( {{x_1}} \right)f = \left( {{x_2}} \right),\) that means \({x_1} = {x_2}.\) Every element of set \(A\) is mapped to every distinct element of set \(B.\)
  2. The function \(f:A \to B\) is called into function; at least one or more than one element of set \(B\) does not have a pre-image in the elements of set \(A.\)

Conditions:

  1. After mapping, more than one element in the function domain has the same image as a co-domain in this type of function.
  2. The range and co-domain of the onto function are not equal. At least one or more than one co-domain element does not have a pre-image in the elements of the domain.

Example

In the function, \(f:X \to Y,\) all the elements \(\{ a,b,c\} \) are mapped with the same element \(\{ 1\} \) of the co-domain. So, it is known as a many to one function.

And, the element \(\{ 2\} \) of the co-domain does not have any pre-image in the elements of the domain, so it is into function. Therefore, given function is many to one onto function.

Many to One Into Function

Solved Examples

Q.1. If \(f:R \to R,\) defined By \(f(x) = 2x + 1.\) Then check whether the function is Onto or not.
Ans: To check whether given function onto, equate \(f(x) = y.\)
\( \Rightarrow 2x + 1 = y\)
\( \Rightarrow 2x = y – 1\)
\( \Rightarrow x = \frac{{y – 1}}{2}\)
Substitute the above value in \(f(x) = 2x + 1.\)
\( \Rightarrow f(x) = \frac{{2(y – 1)}}{2} + 1\)
\( \Rightarrow f(x) = (y – 1) + 1\)
\( \Rightarrow f(x) = y\)
Hence, the given function \(f(x) = 2x + 1\) is onto function.

Q.2. If \(f:R \to R,\) defined By \(f(x) = 3x – 2.\) Then check whether the function is one-one or not.
Ans: The function \(f:A \to B,\) is called one to one function if \(f\left( {{x_1}} \right) = f\left( {{x_2}} \right),\) that means \({x_1} = {x_2}.\) Every element of set \(A\) is mapped to every distinct element of set \(B.\)
Consider \(f\left( {{x_1}} \right) = f\left( {{x_2}} \right)\)
\( \Rightarrow 3\left( {{x_1}} \right) – 2 = 3\left( {{x_2}} \right) – 2\)
\( \Rightarrow 3\left( {{x_1}} \right) = 3\left( {{x_2}} \right)\)
\( \Rightarrow \left( {{x_1}} \right) = \left( {{x_2}} \right)\)
Thus, elements of the domain are mapped with distinct elements of the co-domain.
So, the given function \(f(x) = 3x – 2\) is a one-one function.

Q.3. \(P = \{ x,y,z\} \) and \(Q = \{ a,b,c\} \) and check the function \(f:P \to Q\) such that \(f = \{ (x,a),(y,b),(z,c)\} \) is Bijective.

Function

Ans: Given function is \(f = \{ (x,a),(y,b),(z,c)\} .\)
We know that a function \(f:A \to B\) is a bijective function if it is both one to one (injective) function and an onto (surjective) function.
In the function \(f = \{ (x,a),(y,b),(z,c)\} \) every element of the domain \(\{ x,y,z\} \) are mapped to distinct elements of co-domain \(\{ a,b,c\} .\)
And, all the elements of the co-domain \(\{ a,b,c\} \) are the images of the elements of the domain \(\{ x,y,z\} .\)
Here, the function is both one to one and onto function. Therefore, the given function is bijective.

Q.4. Check whether a given function is onto or not.

Function

Ans: In the onto function, the range and co-domain are equal. Every element of the co-domain mapped with elements of the domain.
Here, the co-domain of the function is \(\left\{ {k,1} \right\}\) and the range of the function is \(\left\{ {k,1} \right\}\) both are equal.
Hence the given function is onto.

Q.5. If \(f:N \to N,\) defined By \(f(x) = \frac{1}{x}.\) Then check whether the function is Bijective or not.
Ans: Given function is \(f(x) = \frac{1}{x}.\)
The function \(f:A \to B,\) is called one to one function if \(f\left( {{x_1}} \right) = f\left( {{x_2}} \right),\) that means \({x_1} = {x_2}.\) Every element of set \(A\) is mapped to every distinct element of set \(B.\)
\( \Rightarrow \frac{1}{{{x_1}}} = \frac{1}{{{x_2}}}\)
\( \Rightarrow {x_1} = {x_2}\)
So, the given function is one to one function.
Let \(\frac{1}{x} = y \Rightarrow x = \frac{1}{y}\)
Substituting in \(f(x) = \frac{1}{{\frac{1}{y}}} = y.\) So, the given function is onto function.
Therefore, \(f(x) = \frac{1}{x}.\) is a bijective function.

Summary

In this article, we studied the definitions of functions and the difference between relations and functions. We discussed the domain, co-domain and range of the function. We have discussed the types of functions and the definitions, conditions, properties, and examples.

We have discussed briefly the types of functions such as one to one or injective function, many to one, onto or surjective function, into function, one to one onto or bijective function, one to one onto function, many to one and many to one into function.

FAQs

Q.1. What are the three types of functions?
Ans: The main three types of functions are
1. Injective function
2. Surjective function
3. Bijective function

Q.2. What is a function?
Ans: The function is the special relation, in which elements of one set are mapped to only one element of another set.

Q.3. What is a bijective function?
Ans: We know that a function is a bijective function if it is both one to one (injective) function and an onto (surjective) function.

Q.4. What is the relation between range and co-domain of the onto function?
Ans: In the onto function, the range and co-domain are equal. Every element of the co-domain mapped with elements of the domain.

Q.5. How many types of functions are there?
Ans: There are mainly six types of functions are there based on the relation from one to another set.
1. One to One (Injective) Function
2. Many to One Function
3. Onto (Surjective) Function
4. Into Function
5. One to One Onto (Bijective) Function
6. May to One Into Function

We hope this detailed article on types of functions has helped you in your studies. If you have any doubts or queries, feel to ask us in the comment section. Happy learning!

Practice Types of Functions Questions with Hints & Solutions