Differences between relation and functionIf R is a relation from A to B, then domain of R may be a subset of A. But if f is a function from A to B, then domain f is equal to A.In a relation from A to B, an element of A may be related to more than one element in B. But in a function from A to B, each element of A must be associated to one and only one element of B.Thus, every function is a relation, but every relation is not necessarily a function.