A one-to-one function is a mapping where every distinct element in the domain pairs with a distinct element in the codomain. No two different inputs ever yield the same output. This single property determines whether a function can be reversed, making it a cornerstone of algebra, calculus, and advanced mathematics.
If you have a function $f$ mapping set $A$ to set $B$, it's one-to-one (or injective) if $f(a) = f(b)$ always implies that $a = b$. Put simply, if the outputs are equal, the inputs must have been equal too. If two different inputs produce the exact same output, the function fails the test and isn't one-to-one.
How to Prove a Function is One-to-One
Proving injectivity algebraically requires a direct approach. You start by assuming that two function outputs are equal, then show that their corresponding inputs must also be equal.
Take the linear function $f(x) = 3x - 5$. To test if it's one-to-one, set $f(a) = f(b)$: To read more about the background of this, Associated Press provides an excellent breakdown.
$3a - 5 = 3b - 5$
Add 5 to both sides:
$3a = 3b$
Divide by 3:
$a = b$
Since assuming $f(a) = f(b)$ forces $a = b$, the function is strictly one-to-one.
Now consider a quadratic function like $f(x) = x^2$ over the set of all real numbers. Set $f(a) = f(b)$:
$a^2 = b^2$
Taking the square root gives $a = b$ or $a = -b$. Because an output like $4$ comes from both $x = 2$ and $x = -2$, two distinct inputs share a single output. This function isn't one-to-one across the real numbers.
The Horizontal Line Test
Graphing a function provides a quick visual way to check its injectivity without heavy algebra. The horizontal line test states that a function is one-to-one if and only if no horizontal line intersects its graph more than once.
- Linear graphs: A straight line with a non-zero slope slants upward or downward continuously. Any horizontal line intersects it at exactly one point, so linear functions are always one-to-one.
- Parabolas: The standard graph of $y = x^2$ curves upward like a U-shape. A horizontal line drawn at $y = 4$ intersects the curve at $(-2, 4)$ and $(2, 4)$. Because the line touches the graph twice, it fails the test.
- Cubic graphs: The standard cubic function $y = x^3$ climbs steadily from left to right without turning back down. Every horizontal line intersects the S-curve only once, confirming it's one-to-one.
Why One-to-One Functions Matter
Injectivity unlocks the ability to reverse a mathematical operation. In mathematics, undoing a function requires finding its inverse, denoted as $f^{-1}(x)$.
For an inverse function to exist, the original mapping must be bijective—meaning it is both one-to-one and onto. If a function maps two different inputs to the same output, the reverse mapping would break because a single input would need to point to two different outputs. That violates the foundational definition of a function.
This principle governs trigonometric inverses. The standard sine wave oscillates up and down, meaning countless inputs share the same height. To define an inverse sine function, mathematicians restrict the domain to a specific interval where the curve passes the horizontal line test.
Common Mistakes to Avoid
Students often stumble on injectivity by confusing the domain and the codomain. A function's behavior depends heavily on the sets it operates across.
For example, $f(x) = x^2$ isn't one-to-one when the domain includes all real numbers. But if you restrict the domain to non-negative numbers ($x \geq 0$), the negative side of the parabola disappears. On that restricted domain, every output links to a unique input, and the function becomes one-to-one. Always check the specified domain before testing a function.
Another frequent error involves assuming monotonic functions cover every case. While strictly increasing or decreasing functions are always one-to-one, functions with mixed behavior require careful algebraic verification or graphing.
Frequently Asked Questions
Are all linear functions one-to-one?
All linear functions with a non-zero slope are one-to-one. If the slope is zero, the function becomes a horizontal line like $f(x) = 4$, where every input maps to the exact same output, failing the test entirely.
How do you find the inverse of a one-to-one function?
Swap the $x$ and $y$ variables in the equation, then solve for the new $y$. For instance, given $f(x) = 2x + 3$, write $x = 2y + 3$, subtract 3, and divide by 2 to get $y = (x - 3) / 2$.
Can a function be one-to-one if it's not continuous?
Yes. Injectivity only requires that distinct inputs produce distinct outputs. Piecewise functions or discrete sequences can satisfy this rule without being continuous.
What is the difference between one-to-one and onto?
A one-to-one (injective) function ensures no two inputs share an output. An onto (surjective) function ensures every element in the codomain gets hit by at least one output. When a function is both, it's called a bijection.