India Site

What is the fundamental difference between a relation and a function? Is every relation a function?

Consider ‘f’ as a function and R as a relation defined from set X to set Y. Domain of the relation R might be a subset of the set X, but the domain of the function f must be equal to X. This is because each element of the domain of a function must have an element associated with it, whereas this is not necessary for a relation. One element of X might be associated with one or more elements of Y, while it must be associated with only one element of Y in a function. Hence, not every relation is a function. But, every function is necessarily a relation.