Give an example of a function

Which is neither one – one nor onto.

TIP: One – One Function: – A function is said to be a one – one functions or an injection if different elements of A have different images in B.


So, is One – One function


a≠b


f(a)≠f(b) for all


f(a) = f(b)


a = b for all


Onto Function: – A function is said to be a onto function or surjection if every element of A i.e, if f(A) = B or range of f is the co – domain of f.


So, is Surjection iff for each , there exists such that f(a) = b


Now, Let, given by f(x) = 5


As we know


A constant function is neither one – one nor onto.


So, here f(x) = 5 is constant function


Therefore


given by f(x) = 5 is neither one – one nor onto function.


1