Britannica Sources used in this answer

How does a relation differ from a function in set theory?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In set theory, a relation is defined as a set of ordered pairs (or n-tuples) that establishes an association between objects. While a function is a type of relation, it is distinguished by a specific, restrictive property.12

The difference lies in the mapping of elements:

  • Relation: A general association where an element x from a domain may be related to any number of elements y in a set.12
  • Function: A special type of relation where each element x in the domain is related to one and only one element y in the codomain.2

In formal terms, if a function f contains two ordered pairs (x, y) and (x, z), it must be the case that y = z. While relations may possess properties such as reflexivity, symmetry, or transitivity, a function is defined primarily by this unique mapping requirement.21