One-to-One Functions

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 f ( x 1 ) = f ( x 2 ) x 1 = x 2
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:

  • f ( x ) = x 2 assigns 4 to both x = 2 and x = 2 .
  • f ( x ) = | x | assigns the same value to x = a and x = a .
  • f ( x ) = c (a constant) assigns c to every x .

Some functions, however, assign distinct outputs to distinct inputs. For example, f ( x ) = 2 x + 3 takes a different value at each value of x . Such functions are called one-to-one.

A function f : A B is one-to-one (or an injection) if for all x 1 , x 2 in A :

f ( x 1 ) = f ( x 2 ) implies x 1 = x 2 .

Equivalently, a one-to-one function takes on each value in its range exactly once.

The Horizontal Line Test

If the graph of y = f ( x ) is cut by a horizontal line y = c at more than one point, then the value c corresponds to more than one x -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 y = c intersects the graph of y = f ( x ) at most once.

A linear function passes the horizontal line test (one-to-one), while a parabola fails it
  • A linear function f ( x ) = m x + b (with m 0 ) is one-to-one because every horizontal line meets it exactly once.
  • The function f ( x ) = x 2 + 1 is not one-to-one on because a horizontal line y = c (for c > 1 ) meets its graph at two points.

Frequently Asked Questions

Can a function that is not one-to-one on all of be made one-to-one by restricting its domain? Yes. For example, f ( x ) = x 2 is not one-to-one on , but it is one-to-one on [ 0 , + ) . Restricting the domain to [ 0 , + ) makes it one-to-one and therefore invertible (the inverse is f 1 ( x ) = x ). This strategy is exactly how inverse trigonometric functions are defined: we restrict the domain of the trig function to make it one-to-one.

Are all increasing functions one-to-one? Yes. If f is increasing on an interval I , then x 1 < x 2 implies f ( x 1 ) < f ( x 2 ) , which means f ( x 1 ) f ( x 2 ) whenever x 1 x 2 . The same argument works for decreasing functions. So every strictly monotone function is one-to-one.

What is the connection between one-to-one functions and having an inverse? A function has an inverse if and only if it is one-to-one. The reason: to define f 1 ( y ) = x , we need to know that there is a unique x satisfying f ( x ) = y . If f is not one-to-one, there could be two different x -values mapping to the same y , and f 1 ( y ) would be ambiguous.