A relation between a set of inputs and a set of allowable outputs is called a function, and it has the property that every input is associated to exactly one output.
When every element in set A has one end and only one image in set B, then the mapping from set A to set B is a function. Let A & B be any two non-empty sets.
Four main categories can be used to classify the many sorts of functions.
One to one function, many to one function, onto function, one to one and into function—all based on the element.