How to Tell When Something Is a Function or Not a Function

A relation is a function when every input value (x) maps to exactly one output value (y); if any single input produces two or more different outputs, it is not a function. That single rule settles most questions about como saber cuando es una function o not function. You check it in three ways: look at the mapping or table directly, scan ordered pairs for a repeated x with different y values, or apply the vertical line test to a graph.
Definition and Key Test
A function is a rule that assigns each input exactly one output. Mathematicians call the set of inputs the domain and the set of outputs the range. The condition is often phrased as “one input, one output” — but note that the reverse is allowed: two different inputs may share the same output. What is forbidden is one input with two outputs.
Think of a vending machine. Pressing B4 should always give you the same item. If pressing B4 sometimes dropped a soda and sometimes a bag of chips, the machine would not be a function — it would be unreliable in exactly the way functions cannot be.
A quick mapping table makes the rule concrete:
| Input (x) | Output (y) | Function? |
|---|---|---|
| 1 | 5 | yes |
| 2 | 7 | yes |
| 3 | 5 | yes — different inputs may share an output |
| 4 | 9 and 2 | no — one input gave two outputs |
The third row is fine: inputs 1 and 3 both point to 5, and that is permitted. The fourth row breaks the rule, and one broken input is enough to disqualify the whole relation. This is the test you apply first, because tables and mapping diagrams state the x-values outright — no graphing required.
When a relation is written as a list of ordered pairs, scan the x-coordinates. If the same x appears twice with different y-values, it fails. If every x appears only once, or repeats only alongside the same y, it passes. Spotting a repeated input is usually faster than plotting anything, so train your eye to look at the first coordinate first.
Vertical Line Test
On a graph, a function must pass the vertical line test: if any vertical line crosses the graph in more than one place, the graph is not a function. The reason is direct — a vertical line fixes one x-value, and two intersections mean that single x has two different y-values.
A straight line that is not vertical always passes, because any vertical line meets it once. The parabola y = x² passes, since every vertical line touches it at a single point (and the two “arms” of the parabola are at different x-values, not the same one). A sideways parabola opens left and right, so some vertical lines hit it twice — it fails.
Practically, slide an imaginary vertical ruler from left to right across the graph. If it ever cuts the curve twice at once, stop — that is a non-function. This is the graph-based version of the same one-input-one-output rule, which Khan Academy demonstrates with interactive examples.
The vertical line represents a fixed input. Two crossings mean two outputs for that input, which is precisely the failure condition. Nothing deeper is happening; the test is just the definition drawn on paper.
Common Non-Function Cases
Most mistakes come from a short list of familiar shapes and equations. Implicit relations are the biggest source: an equation like x² + y² = 25 describes a circle centered at the origin. At x = 0, solving gives y = 5 or y = −5 — two outputs for one input — so the circle is not a function.
The sideways parabola x = y² fails for the same reason: at x = 4, y = 2 or y = −2. Note that y² = x and y = √x are different relations; the square-root version uses only the non-negative branch and is a function, which is a distinction worth remembering. Wolfram MathWorld defines these relations formally if you want the notation.
Ellipses and any graph where a vertical line hits two points also fail, including many loops and sideways-opening curves.
Equations that pass tend to isolate y with a single power. Horizontal lines such as y = 3 pass easily — one output for every input. Slanted lines like y = 2x + 1 pass. Polynomials in x, such as y = x³ − 4x, all pass the vertical line test, because a single x-value determines one y-value when y is isolated and raised only to the first power. The trouble starts when y is squared, appears inside an absolute value with a plus-or-minus split, or when the equation mixes x and y so that y cannot be isolated uniquely.
Checking and Practice Examples
Here are three quick checks you can apply to any format.
Ordered pairs: (2, 3), (4, 5), (2, 8) is not a function — x = 2 gives both 3 and 8. Change it to (2, 3), (4, 5), (6, 8) and it becomes a function.
A table: if a row like x = 1 lists outputs 4 and −4, it fails. If each x-value appears once, it passes.
A graph: apply the vertical line test before doing any algebra. A single double-crossing is enough.
One worked example ties it together. Consider y = x² − 1. Pick x = 3: y = 9 − 1 = 8. No other y is possible for x = 3, so every input has exactly one output — it is a function. Now consider x = y² − 1 and pick x = 3: solving gives y² = 4, so y = 2 or y = −2. Two outputs, so it is not a function. The two relations differ only in which variable is squared, which is exactly the kind of trap the vertical line test catches instantly. Purplemath walks through more of these comparisons.
A routine you can run in seconds: first, ask whether any input repeats with a different output. Second, if you have a graph, run a vertical line across it. Third, if you have an equation, try to isolate y and see whether a single x forces a single y. If any step fails, the relation is not a function. If you are studying this for a course or exam, a teacher or tutor can confirm the conventions your class uses.
Key Takeaways
- A relation is a function only if every input maps to exactly one output; different inputs sharing an output is fine.
- The vertical line test is the graph version of the rule: any vertical line touching the graph twice means it is not a function.
- Circles (x² + y² = 25) and sideways parabolas (x = y²) are classic non-functions because one x gives two y-values.
- Ordered pairs fail when the same x appears with different y-values; scan the first coordinates first.
- Isolating y is a fast algebraic check — if one x produces a single y, you likely have a function.