How is a function different from a relation?
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 (), there is exactly one unique value for the dependent variable ().2
In terms of analytic geometry, this distinction is often visualized using the vertical line test: if you plot a relation on an - plane, it qualifies as a function only if a vertical line passes through no more than one point on the curve at any given 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