The horizontal line test is a graphical method for determining whether a real-valued function of a real variable is one-to-one. A function passes the horizontal line test iff every horizontal line intersects its function graph in at most one point.
Indeed, a horizontal line with height
intersects the function graph at every point
for which
. Therefore, such a line
intersects the function graph more than once precisely
when there are distinct values
and
such that
. In particular, a function
has an inverse function on its range iff it passes the horizontal line test.