Mathwords logoReference LibraryMathwords

Relation

Relation

A set of ordered pairs.

For example, {(1, 2), (3, 4), (1, a), (5, r)} is a relation. So is the set {(x, y): y = x2}; this is the set of all ordered pairs (x, y) for which y = x2.

 

Ellipse centered at (2,1) with equation (x-2)²/9 + (y-1)²/4 = 1, with labeled points (-1,1), (2,3), (5,1), (2,-1).

 

See also

Function, graph

Key Formula

R={(x,y)xA and yB and the pairing rule holds}R = \{(x, y) \mid x \in A \text{ and } y \in B \text{ and the pairing rule holds}\}
Where:
  • RR = The relation — a set of ordered pairs
  • xx = An element from set A (the first component of each pair)
  • yy = An element from set B (the second component of each pair)
  • AA = The set from which first components are drawn (the domain)
  • BB = The set from which second components are drawn (the range lives inside B)

Worked Example

Problem: Given the relation R = {(1, 3), (2, 6), (3, 9), (4, 12)}, find the domain, range, and determine whether R is a function.
Step 1: List all first components (x-values) of the ordered pairs to find the domain.
Domain={1,2,3,4}\text{Domain} = \{1, 2, 3, 4\}
Step 2: List all second components (y-values) to find the range.
Range={3,6,9,12}\text{Range} = \{3, 6, 9, 12\}
Step 3: Check whether any x-value appears more than once with different y-values. Each x-value (1, 2, 3, 4) appears exactly once.
Step 4: Because every x-value is paired with exactly one y-value, this relation is also a function. The rule connecting them is y=3xy = 3x.
y=3xy = 3x
Answer: Domain = {1, 2, 3, 4}, Range = {3, 6, 9, 12}. The relation is a function described by y = 3x.

Another Example

This example shows a relation that is NOT a function, highlighting the key distinction: a relation can pair one x-value with multiple y-values, but a function cannot.

Problem: Given the relation S = {(2, 5), (3, 7), (2, 9), (4, 7)}, find the domain and range, and determine whether S is a function.
Step 1: Identify the domain by collecting all first components.
Domain={2,3,4}\text{Domain} = \{2, 3, 4\}
Step 2: Identify the range by collecting all second components.
Range={5,7,9}\text{Range} = \{5, 7, 9\}
Step 3: Check for repeated x-values. The value x = 2 appears twice: in (2, 5) and (2, 9). It maps to two different y-values.
Step 4: Because x = 2 is paired with both 5 and 9, this relation is NOT a function. A function requires each input to have exactly one output.
Answer: Domain = {2, 3, 4}, Range = {5, 7, 9}. The relation S is not a function because the input 2 maps to two different outputs.

Frequently Asked Questions

What is the difference between a relation and a function?
Every function is a relation, but not every relation is a function. A function is a special type of relation where each input (x-value) is paired with exactly one output (y-value). If any x-value maps to two or more different y-values, the relation is not a function.
How do you tell if a relation is a function from a graph?
Use the vertical line test. Draw (or imagine) vertical lines across the graph. If every vertical line crosses the graph at most once, the relation is a function. If any vertical line crosses the graph at two or more points, the relation is not a function because that x-value has multiple y-values.
Can a relation have repeated y-values?
Yes. A relation (and even a function) can have the same y-value appear with different x-values. For example, {(1, 4), (3, 4)} is a perfectly valid function. What matters for the function test is whether any single x-value maps to more than one y-value — repeated y-values are completely fine.

Relation vs. Function

RelationFunction
DefinitionAny set of ordered pairsA relation where each x-value maps to exactly one y-value
Repeated x-values with different y-valuesAllowedNot allowed
Vertical line testMay failAlways passes
Example{(1, 2), (1, 5), (3, 4)}{(1, 2), (3, 4), (5, 6)}
RelationshipBroader categorySpecial case of a relation

Why It Matters

Relations are one of the first topics in algebra and precalculus that bridge the gap between sets and functions. Understanding relations is essential before you can grasp what makes a function special, which is foundational for graphing, calculus, and modeling real-world data. You will also encounter relations in coordinate geometry every time you plot points or analyze whether a graph represents a function.

Common Mistakes

Mistake: Thinking that every relation must be a function.
Correction: A relation is any set of ordered pairs — it has no restriction on how x-values pair with y-values. Only when each x maps to exactly one y does the relation qualify as a function.
Mistake: Confusing the domain and range by mixing up which component is which.
Correction: The domain is always the set of first components (x-values), and the range is always the set of second components (y-values). Remember: in an ordered pair (x, y), the input comes first.

Related Terms

  • FunctionA relation where each input has one output
  • SetA relation is defined as a set of ordered pairs
  • CoordinatesOrdered pairs that locate points on a plane
  • Graph of an Equation or InequalityVisual representation of a relation on a coordinate plane
  • DomainThe set of all first components in a relation
  • RangeThe set of all second components in a relation
  • Ordered PairThe building block of every relation