A function can assign the same output value to different inputs. One-to-one functions are the special case where every output value comes from exactly one input. This property is necessary and sufficient for a function to have an inverse, making it a prerequisite for the next section.
| Test | Description |
|---|---|
| Algebraic | |
| Graphical | Every horizontal line meets the graph at most once |
Definition
We learned that a function assigns one and only one output value to each element of its domain. However, a function may assign the same output to two or more different inputs. For example:
- assigns 4 to both and .
- assigns the same value to and .
- (a constant) assigns to every .
Some functions, however, assign distinct outputs to distinct inputs. For example, takes a different value at each value of . Such functions are called one-to-one.
A function is one-to-one (or an injection) if for all in :
Equivalently, a one-to-one function takes on each value in its range exactly once.
The Horizontal Line Test
If the graph of is cut by a horizontal line at more than one point, then the value corresponds to more than one -value, and the function is not one-to-one. This gives us the visual test:
A function is one-to-one if and only if each horizontal line intersects the graph of at most once.

- A linear function (with ) is one-to-one because every horizontal line meets it exactly once.
- The function is not one-to-one on because a horizontal line (for ) meets its graph at two points.