Nearly all of algebra past this point assumes you can ask “what does this give for
The Definition
A function is a relation in which every input is paired with exactly one output.
Everything else follows from that. A relation is free to send an input to two places; a function is not. That is the entire difference between the two words.
The machine picture is worth keeping. A function is a rule that processes an input and returns an output — and a machine that returned two different answers for the same input would be broken.
Note “exactly one” rules out two possibilities. An input cannot have several outputs, and it cannot have none. If a value is in the domain, it must produce something.
Repeated Outputs Are Fine
The most common misunderstanding here. Look at which side is repeating.
The rule is about inputs, not outputs:
| Situation | Function? |
|---|---|
| One input, one output | Yes |
| Two inputs, same output | Yes |
| One input, two outputs | No |
| An input with no output | No |
Three Ways to Test
From a list of pairs — check for a repeated first coordinate with different second coordinates.
From a mapping diagram — count the arrows leaving each input. Two arrows from one element and it fails.
From a graph — use the vertical line test.
The Vertical Line Test
Sweep an imaginary vertical line across the graph from left to right. If it ever touches the curve in two or more places at the same time, the graph is not a function.
The reason is direct: a vertical line is the set of all points with one particular
A parabola passes, even though it doubles back, because the doubling is left-to-right — for any single
A circle fails. So does a sideways parabola, and so does any relation where the curve loops back over itself vertically.
One counterexample is enough. You do not need to check every position; find a single vertical line hitting twice and the answer is no.
Familiar Shapes, Tested
| Graph | Function? | Why |
|---|---|---|
| Line | Yes | one height per |
| Vertical line | No | one |
| Horizontal line | Yes | every input gives the same output |
| Parabola | Yes | passes the vertical line test |
| Sideways parabola | No | two |
| Circle | No | top and bottom halves |
| Yes | the radical sign means the positive root only |
That last row is worth pausing on. The equation
One-to-One and Many-to-One
Among functions there is a further split.
- One-to-one: every output comes from exactly one input.
is one-to-one. - Many-to-one: several inputs share an output.
is many-to-one.
One-to-One Functions covers the horizontal line test and the algebraic proof in full. Both are functions. The distinction matters for inverses: only a one-to-one function has an inverse that is itself a function. Reversing
There is a graphical test for this too — the horizontal line test. If no horizontal line crosses the graph more than once, the function is one-to-one.
Functions in Ordinary Language
The idea shows up constantly outside mathematics, usually where a lookup has to be unambiguous.
- A vending machine: press B4, get one specific item.
- A person’s date of birth: everyone has exactly one.
- A postcode lookup: one postcode returns one address record.
And the failures are just as recognisable. “Children of a parent” is not a function — one parent may have several. “Parent of a child” is closer, but a child has two biological parents, so that fails too. “Biological mother of a person” works: exactly one.
Worked Example A: From a List
Is
Inputs:
Worked Example B: From a List Again
Is
The input
Worked Example C: From an Equation
Is
Solve for
Worked Example D: A Piecewise Rule
Is this a function?
Yes. The two rules cover different, non-overlapping stretches of
Worked Example E: One-to-One?
Is
No.
Common Mistakes to Avoid
- Thinking repeated outputs break the rule. They do not. Only repeated inputs with different outputs do.
- Applying the horizontal line test for functionhood. The vertical test decides whether it is a function; the horizontal test decides whether it is one-to-one.
- Checking only one vertical line. Passing at one position proves nothing; failing at one position proves everything.
- Calling a vertical line a function. It is the clearest failure there is.
- Forgetting that “exactly one” excludes zero. An input with no output also breaks the rule.
- Assuming
and are the same. The radical returns only the non-negative root.
Where Functions Lead Next
- Function notation, which only makes sense because the output is unique.
- Domain and range — the input and output sets.
- Graphing functions and recognising standard shapes.
- Inverse functions, which exist only for one-to-one functions.
- Calculus, which is built almost entirely on functions of one variable.
- Programming, where a “pure function” means exactly this: same input, same output, every time.
Practice Problems
Work each one before opening the answer.
Problem 1. Is
Show answer
Yes — all inputs are different.
Problem 2. Is
Show answer
No — the input
Problem 3. Is
Show answer
Yes. A shared output is fine.
Problem 4. Does
Show answer
Yes. It is a non-vertical line, so it passes the vertical line test.
Problem 5. Does
Show answer
No — it is a circle, and a vertical line through, say,
Problem 6. Is
Show answer
No. It is a vertical line: one input, infinitely many outputs.
Problem 7. Is
Show answer
Yes. Every input returns 5, which satisfies “exactly one output”.
Problem 8. Is
Show answer
Yes. Each output comes from exactly one input, and no horizontal line crosses the graph twice.
Problem 9. A relation has the pairs
Show answer
Yes. The same pair repeated is still one pairing — the input 2 has only the output 7.
Problem 10. Explain why “the square root of a number” is a function but “a number whose square is
Show answer
The radical symbol is defined to return the non-negative root, so it returns one value. “A number whose square is
Quick Reference
| Question | Answer |
|---|---|
| Definition | Each input has exactly one output |
| From pairs | No repeated input with different outputs |
| From a mapping | One arrow leaving each input |
| From a graph | Passes the vertical line test |
| Repeated outputs | Allowed |
| Vertical line | Not a function |
| Horizontal line | A function |
| One-to-one | Passes the horizontal line test too |
| Has a function inverse | Only if one-to-one |
A function is a relation with the one-output rule; once you have one, function notation gives you a way to talk about it, and domain and range describe what goes in and comes out. See Graphing Functions for drawing them. More Algebra lessons are available.