Function: A relation from a set A to a set B is called a function if each element of A is related to exactly one element in B.
Relation: The relation between the two sets A and B is defined as the collection of the ordered pair, in which the ordered pair is formed by the elements from each set.
Every function is a relation but not every relation can be a function.