One-To-One Or Not: Horizontal Line Test

A graph can also tell us if a given function has a one-to-one property or not. This rule is called the Horizontal Line Test: if any horizontal line that you draw on top of the graph intersects only once with the curve, then the function is injective; otherwise, if you can draw a horizontal line that intersects twice or more with the curve, then the function is NOT one-to-one.

Only one intersection with any horizontal line: injective
This is a one-to-one function: each horizontal line intersects only ONCE with the blue curve. Specifically, the displayed function is the 2x + 3 function.

This is a one-to-one function! Miriam Briskman, CC BY-NC 4.0


Two or more intersections with a horizontal line: NOT injective
This is NOT a one-to-one function. We added a red horizontal line at y = 2. This line intersects TWICE with the blue curve: once at a value of x between -2 and -1 (approx -1.414), and another time at a value of x between 1 and 2 (approx +1.414).

This is NOT a one-to-one function. Miriam Briskman, CC BY-NC 4.0