COLLEGE ALGEBRA • FUNCTIONS & GRAPHS

Relations and Functions — Identify Whether a Relation Is a Function

Master the fundamental distinction that underpins every branch of modern mathematics and its applications.

Historical Context & Motivation

The concept of a function is so deeply embedded in modern mathematics that it is easy to forget how long it took to crystallize. For centuries, mathematicians worked with implicit dependencies between quantities—areas depending on side lengths, planetary positions depending on time—without ever formalizing the idea that each input should produce exactly one output. The journey from vague notions of dependence to the rigorous definition taught today spanned roughly three hundred years and involved some of the most influential minds in mathematical history.

Ancient Greek and Islamic mathematicians described geometric relationships in words and diagrams, but they lacked a symbolic framework that could distinguish a well-behaved correspondence from an arbitrary pairing of values. It was not until the rise of analytic geometry and calculus in the seventeenth century that the need for precision became urgent. As mathematicians began manipulating algebraic expressions and plotting curves on coordinate planes, they confronted cases where a single x-value seemed to correspond to multiple y-values—think of a circle, for example. Distinguishing curves that assign a unique y to each x from those that do not became essential for the logical foundations of calculus.

1637
Descartes & Analytic Geometry
René Descartes published La Géométrie, merging algebra and geometry. His coordinate system made it possible to represent curves as equations, paving the way for discussing input-output relationships algebraically.
1694
Leibniz Coins 'Function'
Gottfried Wilhelm Leibniz first used the Latin word functio to describe quantities that depend on a variable, marking the earliest formal use of the term in mathematical literature.
1748
Euler Formalizes Notation
Leonhard Euler introduced the notation f(x) in his Introductio in analysin infinitorum, establishing the symbolic convention that remains standard today.
1837
Dirichlet's Modern Definition
Peter Gustav Lejeune Dirichlet proposed that a function need not be given by a single formula: any rule assigning exactly one output to each input qualifies. This broadened the concept beyond algebraic expressions.
1930s
Set-Theoretic Foundation
The Bourbaki group and others recast the function concept in purely set-theoretic terms—a function as a special subset of a Cartesian product—providing the definition used in contemporary algebra and analysis.

This historical arc reveals a recurring theme: as mathematics grew more powerful, it demanded sharper definitions. The central question driving this lesson is deceptively simple—given a relation between two sets, how do we determine whether that relation qualifies as a function? Answering it precisely is the gateway to every subsequent topic in algebra, calculus, and beyond.

Core Principles & Definitions

Before we can identify whether a relation is a function, we need to establish precise definitions for the terms involved. A relation from a set A to a set B is any subset of the Cartesian product A × B—that is, any collection of ordered pairs (a, b) where a ∈ A and b ∈ B. A relation imposes no restrictions on how many elements of B can be paired with a single element of A. A function is a relation with one critical additional constraint: every element in the domain (set A) must be paired with exactly one element in the codomain (set B). This uniqueness requirement is what separates functions from general relations.

1

Relation

Any set of ordered pairs (a, b) drawn from A × B. No restrictions on how inputs map to outputs. Example: {(1, 2), (1, 5), (3, 4)} is a valid relation even though input 1 maps to two different outputs.
2

Function

A relation in which every element of the domain is associated with exactly one element of the codomain. If (a, b₁) and (a, b₂) both belong to the relation, then b₁ must equal b₂.
3

Domain & Range

The domain is the set of all first coordinates (inputs). The range is the set of all second coordinates (outputs) that actually appear. The codomain may be larger than the range.
4

Vertical Line Test

A graphical criterion: if every vertical line x = c intersects the graph in at most one point, the relation is a function. Two or more intersections at any vertical line means it is not.
5

Mapping Diagram Check

Draw arrows from each domain element to its paired range element. If any domain element has two or more arrows leaving it, the relation fails the function criterion.
KEY TAKEAWAY
Think of a function like a reliable vending machine: you press one button (input), and you always get exactly one product (output). If pressing the same button could dispense either a soda or a candy bar on different occasions, the machine would be unpredictable—a mere relation, not a function. The uniqueness of the output for each input is what makes a function deterministic and therefore useful for modeling real-world phenomena.

Visual Explanation — Mapping Diagrams

One of the most intuitive ways to determine whether a relation qualifies as a function is through a mapping diagram. In this representation, elements of the domain are listed on the left, elements of the range on the right, and arrows indicate which pairs belong to the relation. The diagram below contrasts a relation that is a function with one that is not, making the uniqueness criterion visually apparent.

Left: a valid function where every domain element maps to exactly one range element—even though multiple inputs (1 and 3) share the same output (a). Right: not a function because input 1 maps to both a and c, violating the uniqueness requirement.

Notice that in the left diagram, the fact that inputs 1 and 3 both map to the output a does not disqualify the relation from being a function. Multiple inputs sharing the same output is perfectly acceptable. The critical condition operates in only one direction: no single input may produce more than one output. This asymmetry is worth internalizing, as it is the source of many common errors. A function is allowed to be many-to-one but never one-to-many.

Mathematical Framework

We can express the function criterion with full set-theoretic rigor. Let A and B be nonempty sets, and let R ⊆ A × B be a relation. The formal definition captures the uniqueness condition in a single logical statement.

FUNCTION DEFINITION
R is a function ⟺ ∀ a ∈ A, ∃! b ∈ B such that (a, b) ∈ R
The symbol ∃! means "there exists exactly one." Equivalently: for all a ∈ A, if (a, b₁) ∈ R and (a, b₂) ∈ R, then b₁ = b₂.

When R is a function, we typically write f : A → B and denote the unique output paired with a as f(a) = b. The domain of f is the set A, and the range (or image) of f is the set {f(a) : a ∈ A} ⊆ B. Note that the range is always a subset of the codomain B but need not equal it.

VERTICAL LINE TEST (ANALYTIC FORM)
For a relation defined by an equation y = ⋯ or F(x, y) = 0 in ℝ²: the relation is a function of x ⟺ for each x₀ in the domain, the equation F(x₀, y) = 0 has exactly one solution for y.
Graphically, this is equivalent to saying every vertical line x = x₀ intersects the curve in at most one point.
EXAMPLE: CIRCLE VS. PARABOLA
x² + y² = r² → y = ±√(r² − x²) (two outputs, NOT a function) y = x² → each x gives exactly one y (IS a function)
The circle equation yields two y-values for most x-values in (−r, r), so it fails the function criterion. The parabola equation always produces a single y for each x.
Common Misconception
Students sometimes believe that a function must be one-to-one (injective). This is not the case. A function merely requires that each input maps to one output. Multiple inputs may share the same output. Injectivity is an additional property some functions possess, but it is not required for a relation to qualify as a function.

The Vertical Line Test — A Graphical Deep Dive

The vertical line test is the most widely used graphical method for deciding whether a curve in the Cartesian plane represents a function of x. The test works because vertical lines consist of all points with a fixed x-coordinate; if such a line crosses the graph more than once, the same x-value is paired with multiple y-values, violating the uniqueness requirement. The diagram below demonstrates the test on two familiar curves.

Left: the parabola y = x² passes the vertical line test—the dashed amber line at x = x₀ intersects the curve exactly once. Right: the circle x² + y² = 9 fails the test—the same vertical line meets the circle at two distinct points P₁ and P₂.

It is important to recognize that the vertical line test applies only when we are testing whether y is a function of x. If the roles of the variables are reversed—say we want to know whether x is a function of y—then a horizontal line test would be the appropriate criterion. Additionally, a curve that fails the vertical line test can sometimes be split into two or more functions. The upper and lower semicircles of x² + y² = 9 can each be written as separate functions: y = √(9 − x²) and y = −√(9 − x²).

Quick-reference table of common curves and their function status
Equation / CurveVertical Line TestFunction?
y = 2x + 1 (line)Each vertical line intersects onceYes ✓
y = |x| (absolute value)Each vertical line intersects onceYes ✓
x = y² (sideways parabola)Vertical lines for x > 0 hit twiceNo ✗
y² = x³ (cuspidal cubic)Vertical lines for x > 0 hit twiceNo ✗
x = 3 (vertical line)The line x = 3 itself intersects infinitely many timesNo ✗

Worked Example — Multiple Representations

Let us work through a comprehensive example that tests whether a given relation is a function using three different representations: a set of ordered pairs, an equation, and a graph.

Determine Whether Each Relation Is a Function
1
Step 1 — Ordered Pairs: R₁ = {(−2, 5), (0, 3), (1, 7), (−2, 4)}List the domain elements (first coordinates): {−2, 0, 1}. Check whether any domain element appears more than once with different second coordinates. The element −2 appears in (−2, 5) and (−2, 4). Since 5 ≠ 4, the input −2 is mapped to two distinct outputs.
R₁ is NOT a function because −2 maps to both 5 and 4.
2
Step 2 — Ordered Pairs: R₂ = {(−1, 3), (0, 3), (2, 5), (4, 7)}Domain elements: {−1, 0, 2, 4}—each appears exactly once. Even though −1 and 0 share the same output 3, no domain element is paired with more than one range element.
R₂ IS a function. Repeated outputs are allowed; repeated inputs with different outputs are not.
3
Step 3 — Equation: y² = x + 4Solve for y: y = ±√(x + 4). For any x > −4, this produces two y-values (one positive, one negative). For example, at x = 0: y = ±√4 = ±2. The ± sign is a dead giveaway that the equation assigns two outputs to most inputs.
y² = x + 4 does NOT define y as a function of x.
4
Step 4 — Equation: y = x³ − 2x + 1This is a polynomial in x. For every real number input x, the expression x³ − 2x + 1 evaluates to exactly one real number y. Polynomial functions are guaranteed to pass the function test because they are single-valued by construction.
y = x³ − 2x + 1 IS a function of x.
5
Step 5 — Graph Check SummaryApply the vertical line test to the graph of each relation. R₁ and y² = x + 4 would show vertical lines intersecting their graphs at two points for at least one x-value. R₂ and y = x³ − 2x + 1 would show every vertical line touching the graph at most once. This confirms our algebraic findings.
Algebraic analysis and the vertical line test always agree—they encode the same uniqueness condition.

Strengths & Limitations of Each Testing Method

We have encountered three methods for determining whether a relation is a function: inspecting ordered pairs, analyzing the equation algebraically, and applying the vertical line test to a graph. Each method has advantages and drawbacks, and a fluent mathematician selects the approach that suits the representation at hand.

Comparison of methods for identifying functions
MethodStrengthsLimitations
Ordered Pair InspectionDefinitive for finite relations; easy to implement by sorting or scanning first coordinates; no graph needed.Impractical for infinite sets or continuous domains; requires the entire relation to be listed explicitly.
Algebraic AnalysisWorks for equations on continuous domains; reveals the structure (e.g., ± sign) that causes multi-valuedness; rigorous and generalizable.Requires the ability to solve or manipulate the equation; implicit equations can be difficult to analyze.
Vertical Line TestVisually immediate; requires no algebraic manipulation; effective for complicated implicit curves or data plots.Requires an accurate graph; limited by drawing precision; not a formal proof—only as reliable as the graph itself.
KEY TAKEAWAY
In practice, mathematicians and scientists rarely rely on a single method. An engineer might use a graphing tool to apply the vertical line test for quick visual confirmation, then follow up with an algebraic argument for formal documentation. Think of the three methods as complementary lenses on the same underlying criterion—uniqueness of the output—each offering insight that the others may miss.

Connection to Advanced Theory — Injections, Surjections & Beyond

Once you have established that a relation is a function, a natural next question is: what kind of function is it? Advanced algebra and analysis classify functions by additional structural properties—injectivity, surjectivity, and bijectivity—which refine the basic function concept into more powerful categories. Understanding these classifications is essential for topics ranging from linear transformations in linear algebra to cardinality arguments in set theory.

Taxonomy of function properties beyond the basic definition
PropertyDefinitionRelation to Basic Function
Function (basic)Each input maps to exactly one output.Baseline requirement. This lesson's focus.
Injective (one-to-one)Distinct inputs always produce distinct outputs: f(a₁) = f(a₂) ⟹ a₁ = a₂.A function plus no two domain elements share the same range element. Passes the horizontal line test.
Surjective (onto)Every element of the codomain is an output for at least one input: range = codomain.A function plus the entire codomain is "covered." Depends on the specified codomain.
Bijective (one-to-one and onto)Both injective and surjective. Establishes a perfect one-to-one correspondence.Guarantees the existence of an inverse function f⁻¹. Central to solving equations and defining logarithms, arcsine, etc.

In subsequent coursework, you will encounter these classifications frequently. For example, determining whether a linear transformation T : ℝⁿ → ℝᵐ is injective reduces to checking whether its null space is trivial, while surjectivity corresponds to the column space spanning ℝᵐ. The concept of a bijection is the key to defining invertible functions—a topic you will explore in depth when studying inverse functions, logarithms, and inverse trigonometric functions later in this course.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why the relation {(2, 3), (4, 3), (6, 3)} is a function, even though the output 3 appears three times. Then explain why {(2, 3), (2, 5)} is not a function.
PROBLEM 2BASIC CALCULATION
Determine whether the relation R = {(−3, 9), (−1, 1), (0, 0), (1, 1), (3, 9)} is a function. If so, can you identify a formula that generates it?
PROBLEM 3INTERMEDIATE
Consider the equation x² + 4y² = 16. Does this equation define y as a function of x? Justify your answer algebraically and describe what the vertical line test would show.
PROBLEM 4APPLIED
A sensor records the temperature T (in °C) at various times t (in hours) during a 24-hour period and stores the data as ordered pairs (t, T). Under what conditions would this data represent a function? A technician notices two data points: (14.0, 28.3) and (14.0, 28.7). Should she conclude the relation is not a function, or might there be another explanation?
PROBLEM 5CRITICAL THINKING
Let f be a function from ℝ to ℝ. Prove that if the graph of f is symmetric about the y-axis (i.e., f is even: f(−x) = f(x) for all x) and f is injective (one-to-one), then f must be constant on its domain restricted to the nonnegative reals—specifically, the only even injective function from ℝ to ℝ is a function whose domain is {0}. What does this tell us about the relationship between symmetry and injectivity?

Lesson Summary

A relation is any set of ordered pairs drawn from a Cartesian product A × B, while a function is a relation satisfying the uniqueness condition: every element of the domain maps to exactly one element of the codomain. This can be tested three ways: by scanning ordered pairs for repeated first coordinates with different second coordinates, by algebraic analysis (checking whether solving for y yields a unique expression), or by applying the vertical line test on a graph.

Functions may be many-to-one (multiple inputs mapping to the same output) but never one-to-many. Building on the basic function concept, more advanced properties—injectivity, surjectivity, and bijectivity—further classify functions and underpin topics like inverse functions, transformations, and mathematical modeling throughout algebra and analysis.

Varsity Tutors • College Algebra • Relations and Functions — Identify Whether a Relation Is a Function