 # Onto Function

## Onto Function Definition:

Function is a process that relates elements of one set called domain with the unique elements of another set called the codomain. Functions are thus explained in simple terms as ‘for every set of inputs, there is a unique set of outputs’. For a function to exist, the input and output sets should have some elements which means that they should not be empty sets. Functions are generally represented as f (x) = y. Various types of functions include one to one function, many to one function, onto function, into the function, linear, quadratic and cubic functions, identical functions, algebraic functions, rational functions, even and odd functions, periodic functions and many more. In any function, every element in the domain has one and only one element in the codomain. No element in the domain can relate to two elements in the codomain. However, two elements in the domain may relate to the same element in the codomain.

### What is Onto Function?

Any function is said to be onto function if, in the function, every element of codomain has one or more relative elements in the domain. Onto function is also popularly known as a surjective function.

One of the onto function examples is a function which checks whether a given number of inputs is an onto function because for every number in the domain there is a unique element in the output function which is either zero or one. When the codomain element is one, the number in the domain is odd and when the codomain element is zero, the number in the domain is odd. In this example, a no of onto functions elements in the domain will have an output as zero. However, none of the elements in the domain can have both zero and one as an output.

### Properties of Onto Mapping:

• In any onto function definition, the codomain is limited to the range of the function.

• All the onto functions can be expressed as the right inverse functions.

• All the right inverse functions are onto or surjective functions.

• Any function composed using an onto function is also an onto function.

### No of Onto Functions:

The no of onto functions possible between two non-empty sets is given by the formula:

 m0 mn - m1 (m - 1)n + m2 (m - 2)n - m3 (m - 3)n + ……………..

In the above equation, n is the number of elements in set A and m  is the number of elements in Set B. The first, second, third ……. elements of set B or codomain are represented as m0, m1, m2,.. When the number of elements in set A is less than the number of elements in set B, i.e. if n<m, the number of possible onto functions is zero. If the number of elements in set A and set B are equal i.e. n = m, the number of possible onto mappings is given by m!. No of onto functions for a given domain and range is given as

 mn – m + m ((m – 1)n – (m – 1))

Where ‘m’ is the range and ‘n’ is the domain

### Onto Function Examples:

1. Consider a function in which 10 students of a class representing the domain and their roll numbers representing the codomain. State whether these two sets explain ‘what is onto function’ or not. Justify your answer.

Solution:

In the above example, Set  A = 10 students of a class and Set B = Roll numbers of the 10 students. Here every element in set  A will have a unique relative element in Set B. This function does not come under onto function examples because no two students can have the same roll numbers. i.e. no two elements can have the same relative codomain element. This contradicts the onto function definition. The example stated above is depicted in the figure below.

### Fun facts about Onto mapping:

• Every onto function definition is an inverse function and every inverse function is an onto function.

• In any kind of function, several inputs may have the same output whereas one input cannot have two outputs. The output function for each onto the mapping function is unique.

• If a function is both injective and surjective, then it is called a bijective function.