One-to-One Function

Functions & Advanced Algebra

A one-to-one function is a function in which every output value corresponds to exactly one input value.

Visualization

Definition

A one-to-one function is a special kind of function where no two different inputs give the same output, every output is unique. Formally, a function $f$ is one-to-one (injective) if $f(a) = f(b)$ implies $a = b$ for all $a, b$ in the domain, graphically passing the horizontal line test since every horizontal line crosses the graph at most once. More generally, for $f: A \to B$, injectivity means distinct elements of $A$ map to distinct elements of $B$, which implies $|A| \le |B|$ for finite sets.

Example

$f(x) = 2x$ is one-to-one since different inputs always give different outputs, but $f(x) = x^2$ is not, since $f(3) = 9$ and $f(-3) = 9$. For $f(x) = 3x - 5$: if $f(a) = f(b)$ then $3a - 5 = 3b - 5$, so $a = b$, confirming it is one-to-one; $f(x) = x^2$ becomes one-to-one if restricted to $x \ge 0$. The function $f: \mathbb{Z} \to \mathbb{Z}$ defined by $f(n) = 2n$ is injective but not surjective onto $\mathbb{Z}$ (only even integers form the image), and the composition of two injections is itself injective.

Key Insight

One-to-one functions are the only functions that can be undone perfectly with an inverse: if two inputs could produce the same output, the process could not be reversed uniquely, so restricting the domain of a non-one-to-one function (as is standard practice with $f(x) = x^2$) is often how an inverse is created. Injectivity, surjectivity, and bijectivity form the foundational classification of functions in set theory, and a bijection between two sets proves they have the same cardinality, even for infinite sets.