Functions & Transformations

one-to-one function

An ordinary function promises that each input gives one output. A one-to-one function promises something stronger going the other way: no two different inputs ever land on the same output. Every output that appears comes from exactly one input — there are no collisions.

Formally, f is one-to-one (injective) if whenever f(a) = f(b), it must be that a = b. Equivalently, distinct inputs always produce distinct outputs. The function f(x) = 2x is one-to-one, because doubling different numbers gives different results. But f(x) = x^2 is not, because 3 and -3 both map to 9.

This property matters because exactly the one-to-one functions can be undone. If two inputs shared an output, there would be no way to reverse the map — you would not know which input to go back to. So being one-to-one is the precise condition under which an inverse function exists.

f(x) = x^3 is one-to-one (each output has one input); f(x) = x^2 is not, since (-2)^2 = 2^2.

No two inputs share an output.

Graphically, one-to-one functions pass the horizontal line test: no horizontal line meets the graph more than once.

Also called
injective function单射嵌射