Functions as Special Relations: Explained with Examples
A function is a special relation with one strict rule: every element of the domain must appear as the first entry of exactly one ordered pair. In f = {(1, 4), (2, 4), (3, 9)}, each input 1, 2, 3 gets exactly one output, so f is a function.
It matters because functions are the workhorses of mathematics: every formula, graph and computation is a function turning inputs into outputs. Recognising a function inside a relation tells you the relationship is predictable — same input, same output, every time.
Key Concepts
- Function f from A to B: a relation where each a in A is paired with exactly one b in B, written f: A to B and the pair as (a, f(a)).
- Well-defined: one input, one output. Many inputs may share an output, but no input may have two different outputs.
- Vertical line test: on a graph, a curve represents a function exactly when every vertical line meets it at most once.
- Notation f(a): the unique output paired with input a, called the image of a or the value of f at a.
How It Works
- List the relation as ordered pairs and collect all first entries.
- Check that every element of the domain A appears as a first entry at least once; a missing input breaks the function.
- Check that no first entry appears with two different second entries; a repeated input with different outputs breaks the function.
- If both checks pass, the relation is a function, and you can write it as y = f(x).
Worked Example
On A = {1, 2, 3}, is R = {(1, 5), (2, 5), (3, 8)} a function? What about S = {(1, 5), (1, 6), (2, 7)}?
- R: first entries are 1, 2, 3 — every domain element appears exactly once. R is a function, with f(1) = 5, f(2) = 5, f(3) = 8.
- Note the repeated output 5 is perfectly fine; only repeated inputs with different outputs are forbidden.
- S: the input 1 appears twice, with outputs 5 and 6. One input, two outputs — S is not a function.
- Also 3 never appears as a first entry in S, a second reason S fails.
Common Misconceptions
- "Different inputs cannot share an output." They can: f(x) = x squared sends both 2 and minus 2 to 4 and is a perfectly good function.
- "Every relation is a function." Functions are the strict subset of relations where each input is used exactly once with a single output.
- "A circle is a function." A circle fails the vertical line test: most vertical lines cut it twice, so one x gives two y values.
Real-World Applications
- Physics formulas: distance = speed times time is a function turning each time value into one distance.
- Programming: a well-written function returns exactly one result for each input, mirroring the mathematical rule.
- Pricing: a price list pairing each product code with one price is a function from codes to prices.
A function is a relation where every input gets exactly one output — no missing inputs, no double outputs. Apply the two checks to any set of pairs and you will instantly separate genuine functions from ordinary relations.
Related blogs
- Representation of Sets: Roster, Builder & Venn Guide
- Types of Sets: Finite, Infinite, Empty & Singleton Sets
- Subsets and Supersets: Definitions, Symbols, Power Sets
- Power Sets: All Subsets Explained Simply with Examples
- Universal Set in Set Theory: Definition with Examples
- Venn Diagrams: How to Read and Draw Them Like a Pro