In mathematics, the horizontal line test is a test used to determine whether a function is injective (i.e., one-to-one).
In calculus
A horizontal line is a straight, flat line that goes from left to right. Given a function <math>f \colon \mathbb{R} \to \mathbb{R}</math> (i.e. from the real numbers to the real numbers), we can decide if it is injective by looking at horizontal lines that intersect the function's graph. If any horizontal line <math>y=c</math> intersects the graph in more than one point, the function is not injective. To see this, note that the points of intersection have the same y-value (because they lie on the line <math>y=c</math>) but different x values, which by definition means the function cannot be injective.
See also
- Vertical line test
- Inverse function
- Monotonic function
