A relation is any set of ordered pairs. For example, {(1, 2), (6, 9), (8, 11)} or {(22, 2), (22, 9), (101, 11)}.
Not all relations are functions.
A function is a specific type of relation where no two pairs have the same first coordinate. To put that another way, the first element in the pair (the domain) is mapped to exactly one of the second elements (the range). For example:
- {(1, 2), (6, 9), (8, 11)} is a function,
- {(22, 2), (22, 9), (101, 11)} is not a function (22 maps to two elements, not one).
All functions are relations.
Example of Relation vs Function
The relation (son, father) is a function because the first element in the pair (son) maps to one father. The relation (father, son) isn’t a function because it’s possible for a father to have more than one son.
Relation vs Function: Notes from Set Theory
In set theory, the terms function and relation are defined a little differently. In the terms single-valued function or multiple-valued function, the word “function” means a relation. It doesn’t mean “function” in the calculus sense of the word. Set theory also has several different types of relation, such as (MacNeil, 2013):
- Transitive relation: Implies that a leads to b leads to c. For example, all Londoners are English and all English are British, which implies that all Londoners are British.
- Symmetric relation: Ato B implies B to A. For example, marriage between two people is symmetric.
- Reflexive relation: Applies to members of one set only. For example, a certain quantity might weigh 1 oz or 28.3495. They are the same weight in different units.
References
Grigorieva , E. (2015). Methods of Solving Nonstandard Problems. Springer International Publishing.
MacNeil, D. (2013). Fundamentals of Modern Mathematics: A Practical Review. Dover Publications.