Relation vs Function


Calculus Problem Solving >

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.

vertical line test
If a graph passes the vertical line test (top) it’s a function. If not (bottom), then it isn’t a function.
Graphically, you can spot a function by using the vertical line test. The basic idea is to draw a few vertical lines spread out on the graph. If each line crosses the graph only once, it is a function. If not, then it’s not a function. Note that the vertical line test can’t tell you if you have a relation or a function though, because by definition 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.

Both of these sets are functions as they map one element in the domain X to one element in the range Y.


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.


CITE THIS AS:
Stephanie Glen. "Relation vs Function" From StatisticsHowTo.com: Elementary Statistics for the rest of us! https://www.statisticshowto.com/relation-vs-function/

Comments? Need to post a correction? Please Contact Us.

Leave a Comment