Function
For any two non-empty sets X and Y, a function f is a rule or mapping which associates each element of set X to a unique element in set Y .
Types of functions
One-One Function : A function $$\mathrm{f}: \mathrm{X} \rightarrow \mathrm{Y}$$ is one-one (or injective) if the images of distinct elements of X under f are distinct, i.e.,
$$
\mathrm{f}\left(\mathrm{x}_1\right)=\mathrm{f}\left(\mathrm{x}_2\right) \Rightarrow \mathrm{x}_1=\mathrm{x}_2 \forall \mathrm{x}_1, \mathrm{x}_2 \in \mathrm{X}
$$
Otherwise, f is called many-one.
Onto Function : A function is onto (or surjective) if every element of Y is the image of some element of $$X$$ under f, i.e., for every $$y \in Y$$, there exists an element $$x$$ in $$X$$ such that $$f(x)=y$$
Into Function : A function $$\mathrm{f}: \mathrm{X} \rightarrow \mathrm{Y}$$ is into if there exists atleast one element in Y which has no pre-image in A .
One-One \& Onto Function : A function $$\mathrm{f}: \mathrm{X} \rightarrow \mathrm{Y}$$ is said to be one-one $$\&$$ onto (or bijective) if f is both one-one $$\&$$ onto.