##### Basics of Functions | Function | Types of function

Function:  A relation 'f' from a set 'A' to a set 'B' is called a function if to each element a∈A, we can assign an unique element of 'B'.
It is denoted as f: A→B. A is called domain and B is called co domain.

Range: Range of the function f: A→B is {y | y∈B and (x,y)∈ f}
Types of function:
Injective function (One to One mapping): A function f: A→B is said to be one to one if no two elements in  'A' are mapped to same element of 'B'.
Surjective function (Onto function): A function f: A→B is said to be onto if each element of B is mapped by atleast one element of A, i.e, range of f=B.
Bijective function:
A function f: A→B is said to be bijective if it is one to one as well as onto.
Note: Let a function f: A→B having cadinality of A and B as m and n respectively.
Total number of functions =  nm
Total number of Injective functions = nPm
Total number of Surjective functions = nm - nC1(n-1)mnC2(n-2)m - nC3(n-3)m +............... + (-1)n-1 nCn-1(1)m
Total number of Bijective functions (when m =n) = n!