Horizontal line test
In mathematics, the horizontal line test is a test used to determine whether a function is injective.
In calculus
A horizontal line is a straight, flat line that goes from left to right. Given a function, we can decide if it is injective by looking at horizontal lines that intersect the function's graph. If any horizontal line 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 but different x values, which by definition means the function cannot be injective.Variations of the horizontal line test can be used to determine whether a function is surjective or bijective:
- The function f is surjective if and only if its graph intersects any horizontal line at least once.
- f is bijective if and only if any horizontal line will intersect the graph exactly once.