Horizontal line test
First taught in Algebra 2
Definition
The horizontal line test checks whether a function is one-to-one: if any horizontal line crosses the graph more than once, the function is not one-to-one.
Advertisement
Why it works: a horizontal line crosses the graph at every input whose output is . Two crossings means two different inputs give the same output.
Examples:
- passes the test. Every horizontal line hits it once.
- passes the test.
- fails. The line hits it at and .
- fails. Horizontal lines between and hit it infinitely many times.
Why it matters: a function has an inverse function exactly when it is one-to-one. So passing the horizontal line test means the inverse exists.
To make a failing function one-to-one, restrict its domain. with passes, and its inverse is .
Compare with the vertical line test, which checks whether a graph is a function at all.