Britannica Sources used in this answer

How is a function different from a relation?

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

In mathematics, a relation is broadly defined as a set of ordered tuples (such as pairs, triples, or quadruples) that establishes a connection between objects.1

A function is a specific, more restrictive type of relation. While a relation can associate one input with multiple outputs, a function requires that for every value of an independent variable (x), there is exactly one unique value for the dependent variable (y).2

In terms of analytic geometry, this distinction is often visualized using the vertical line test: if you plot a relation on an x-y plane, it qualifies as a function only if a vertical line passes through no more than one point on the curve at any given x value. Essentially, while all functions are relations, not all relations are functions because they may lack the requirement of producing a unique output for every input.2