A function is one-to-one, or injective, if different input values always produce
different output values. In other words, no two distinct \(x\)-values are allowed to share the
same \(y\)-value.
1. Definition
Algebraically, \(f\) is one-to-one if the following implication is true:
\[
\begin{aligned}
x_1\ne x_2 &\Rightarrow f(x_1)\ne f(x_2).
\end{aligned}
\]
An equivalent test is:
\[
\begin{aligned}
f(x_1)=f(x_2)&\Rightarrow x_1=x_2.
\end{aligned}
\]
This second form is often easier for algebraic proofs because it starts by assuming equal
outputs and then tries to prove that the inputs must be equal.
2. Horizontal line test
The graphical test for a one-to-one function is the horizontal line test. A function is
one-to-one if every horizontal line intersects its graph at most once.
\[
\begin{aligned}
\text{one-to-one}
&\Longleftrightarrow
\text{each line }y=c\text{ meets the graph at most once.}
\end{aligned}
\]
If even one horizontal line crosses the graph two or more times, then the function is not
one-to-one. This is because two different inputs produce the same output.
3. Connection to inverse functions
One-to-one functions are important because they are exactly the functions that can have inverse
functions on their range. If \(f\) is not one-to-one, then the inverse relation would assign
more than one output to the same input, so it would not be a function.
\[
\begin{aligned}
f\text{ has an inverse function}
&\Longleftrightarrow
f\text{ is one-to-one on its domain.}
\end{aligned}
\]
Sometimes a function is not one-to-one on its full domain but becomes one-to-one after the domain
is restricted. For example, \(f(x)=x^2\) is not one-to-one on \(\mathbb R\), but it is one-to-one
on \([0,\infty)\).
4. Monotonicity shortcut
A very useful sufficient condition is strict monotonicity. If a function is strictly increasing
on an interval, then it is one-to-one on that interval.
\[
\begin{aligned}
x_1
Similarly, if a function is strictly decreasing on an interval, then it is also one-to-one.
\[
\begin{aligned}
x_1f(x_2).
\end{aligned}
\]
The derivative can help identify monotonicity. If \(f'(x)>0\) throughout an interval, then
\(f\) is increasing there. If \(f'(x)<0\) throughout an interval, then \(f\) is decreasing there.
5. Worked example: a one-to-one cubic
Consider
\[
\begin{aligned}
f(x)&=x^3+x.
\end{aligned}
\]
Its derivative is
\[
\begin{aligned}
f'(x)&=3x^2+1.
\end{aligned}
\]
Since \(3x^2+1>0\) for every real \(x\), the function is strictly increasing on all real numbers.
Therefore, it is one-to-one.
\[
\begin{aligned}
f'(x)>0\ \forall x\in\mathbb R
&\Rightarrow f\text{ is strictly increasing}\\
&\Rightarrow f\text{ is one-to-one.}
\end{aligned}
\]
6. Worked example: a cubic that is not one-to-one
Consider
\[
\begin{aligned}
f(x)&=x^3-2x.
\end{aligned}
\]
Its derivative is
\[
\begin{aligned}
f'(x)&=3x^2-2.
\end{aligned}
\]
This derivative is not always positive or always negative. It is negative between
\(-\sqrt{2/3}\) and \(\sqrt{2/3}\), and positive outside that interval. Therefore the function
rises, then falls, then rises again. That shape fails the horizontal line test.
\[
\begin{aligned}
3x^2-2&=0\\
x^2&=\frac{2}{3}\\
x&=\pm\sqrt{\frac{2}{3}}.
\end{aligned}
\]
Because the function has turning behavior, some horizontal lines intersect the graph more than
once. Therefore \(f(x)=x^3-2x\) is not one-to-one on all real numbers.
7. Worked example: restricted quadratic
The function
\[
\begin{aligned}
f(x)&=x^2
\end{aligned}
\]
is not one-to-one on \(\mathbb R\), because \(f(-2)=4\) and \(f(2)=4\). Two different inputs
produce the same output.
\[
\begin{aligned}
f(-2)&=(-2)^2=4,\\
f(2)&=2^2=4.
\end{aligned}
\]
However, on the restricted interval \([0,\infty)\), the function is strictly increasing and
therefore one-to-one. Its inverse on that restricted domain is \(f^{-1}(x)=\sqrt{x}\).
8. Summary table
9. Final checklist
- Choose the interval where the function is being tested.
- Draw or inspect the graph.
- Apply the horizontal line test.
- Check whether the function is strictly increasing or strictly decreasing.
- Use derivative signs when available.
- If the function is one-to-one, an inverse can exist on that interval.
- If it is not one-to-one, restrict the domain to a monotonic piece if an inverse is needed.