Definition: If two variables x and y are so related that for each value of x, there is one and only one value of y, then y is called function of x.

Or, Suppose that to each element of a set A we assign a unique element of a set B, the collection of such assignment is called a function from A into B.

The set A is called the domain of the function, and the set B is called the target set or range of the function.

Functions are ordinarily denoted by symbols. For example, let f denote a function from A into B. Then we write

f:A→B

which is read : “ f is a function from A into B”

Onto function: A function from A to B is said to be an onto function if every element of B is the image of one or more elements of A.

Example:

Onto function also called surjection.

One to one function: A function from A to B is said to be a one to one function if no two elements of A have the same image.

One to one onto function: A function from A to B is said to be a one to one onto function if it is both an onto and a one to one function.

Example: