Onto Or Not: Horizontal Line Test

The Horizontal Line Test can also be used to tell if a function is or isn't onto: if any horizontal line that you draw on top of the graph intersects at least once with the curve, then the function is surjective; otherwise, if you can draw a horizontal line that doesn't intersect at all with the curve, then the function is NOT onto.

Only one intersection with any horizontal line: surjective
This is an onto function: each horizontal line intersects only ONCE with the blue curve. Specifically, the displayed function is the 2x + 3 function.

This is an onto function! Miriam Briskman, CC BY-NC 4.0


No intersections with a horizontal line at all: NOT surjective
This is NOT a onto function. We added a red horizontal line at y = -1. This line doesn't intersect with the blue curve at all.

This is NOT an onto function. Miriam Briskman, CC BY-NC 4.0