A function gives exactly one output for every allowed input. A one-to-one function is a type of function that requires all inputs (x-values) to produce different outputs (y-values).
Key idea
A function is one-to-one when every output it actually produces comes from exactly one input.
If different inputs share an output, the function is many-to-one.
What do "one-to-one" and "many-to-one" mean?Optional refresher
The names describe how inputs connect to outputs.
One-to-one
Is a functionMapping diagram
Graph
Many-to-one
Is a functionMapping diagram
Graph
One-to-many
Not a functionMapping diagram
Graph
Many-to-many
Not a functionMapping diagram
Graph
Once we already know a relation is a function, the possibilities we need here are one-to-one and many-to-one.
The horizontal line test
The vertical line test checks whether a graph is a function. We use the horizontal line test to check whether a function is one-to-one.
| Test | Question it answers |
|---|---|
| Vertical line test | Is it a function? |
| Horizontal line test | Is it one-to-one? |
Drag the horizontal line up and down each graph below, or use the slider, and watch how many times it meets the curve.
One-to-one
One intersection.
Many-to-one
Two intersections.
The number of intersections is the whole point of the test:
Reading the result
- If every horizontal line meets the graph at most once, the function is one-to-one — no output is ever repeated.
- If even one horizontal line meets the graph twice, the function is many-to-one — those two crossing points are two different inputs that share the same output.
A line that misses the graph (zero intersections) simply means that height is not an output, so it does not affect the verdict.
That is exactly what the graphs above show: the straight line is met once wherever you drag it, so it is one-to-one, while the parabola always has some height that is crossed twice, so is many-to-one.
Why one-to-one matters
Knowing that a function is one-to-one is important for later studies, it means that the function has an inverse function.
Now lets look at how to prove a function is not one-to-one, algebraically.
Proving a function is not one-to-one
Show that on is not one-to-one.
Evaluate the function at one input.
Find a different input that produces the same output.
Now we can see that two different x-values produce the same y-value, making the function many-to-one.
One counter-example is enough to prove the function is not one-to-one.
Many-to-one is still a function
A parabola passes the vertical line test, so is a function. It fails the horizontal line test, so it is many-to-one.
If a graph fails the vertical line test, it was not a function in the first place.
Lesson summary
- A one-to-one function never gives the same output for two different inputs.
- The horizontal line test checks whether a function is one-to-one.
- A many-to-one relation can still be a function; it simply has a shared output.
- One pair of different inputs with the same output is enough to prove that a function is not one-to-one.