Relations vs. Functions
Understanding the crucial difference.
In mathematics, a relation is a rule that pairs elements from one set (the domain) with elements from another set (the codomain). It's any set of ordered pairs (x, y).
A function is a more specific, well-behaved type of relation. For a relation to be a function, there is one critical rule:
Every input (x-value) must be mapped to exactly one output (y-value).
A relation can pair one input with multiple outputs. A function cannot. This is the key distinction.
Types of Relations
One-One (Injective)
Each element of the domain maps to a unique element in the codomain. No two inputs share the same output.
Many-One
Two or more elements of the domain map to the same element in the codomain.
Reflexive
Every element in a set is related to itself. For every element 'a', the pair (a, a) must be in the relation.
Symmetric
If an element 'a' is related to 'b', then 'b' must also be related to 'a'. If (a, b) is in the relation, (b, a) must also be in it.
Transitive
If 'a' is related to 'b' and 'b' is related to 'c', then 'a' must be related to 'c'. If (a, b) and (b, c) are in the relation, (a, c) must be in it.
Equivalence
A relation is an equivalence relation if it is reflexive, symmetric, and transitive. It partitions elements into "equivalence classes".
Example Problems on Types of Relations
Advanced Problems
The Vertical Line Test
A simple visual way to check if a graph represents a function is the Vertical Line Test.
If you can draw a single vertical line anywhere on the graph that intersects the curve more than once, the graph represents a relation but not a function. This is because a single x-value (where you drew the line) corresponds to multiple y-values.
Is a Function
This parabola passes the vertical line test. Any vertical line you draw will only ever cross the graph once.
Not a Function
This circle fails the test. The vertical red line crosses the graph at two points, meaning one x-value has two y-values.