Horizontal line test

From HandWiki
Short description: Test for the injectivity of a function

In mathematics, the horizontal line test is a test used to determine whether a function is injective (i.e., one-to-one).[1]

In calculus

A horizontal line is a straight, flat line that goes from left to right. Given a function [math]\displaystyle{ 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]\displaystyle{ 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]\displaystyle{ y=c }[/math]) but different x values, which by definition means the function cannot be injective.[1]

Horizontal-test-ok.png

Passes the test (injective)

Horizontal-test-fail.png

Fails the test (not injective)

Variations of the horizontal line test can be used to determine whether a function is surjective or bijective:

  • The function f is surjective (i.e., onto) 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.

In set theory

Consider a function [math]\displaystyle{ f \colon X \to Y }[/math] with its corresponding graph as a subset of the Cartesian product [math]\displaystyle{ X \times Y }[/math]. Consider the horizontal lines in [math]\displaystyle{ X \times Y }[/math] :[math]\displaystyle{ \{(x,y_0) \in X \times Y: y_0 \text{ is constant}\} = X \times \{y_0\} }[/math]. The function f is injective if and only if each horizontal line intersects the graph at most once. In this case the graph is said to pass the horizontal line test. If any horizontal line intersects the graph more than once, the function fails the horizontal line test and is not injective.[2]

See also

References

  1. 1.0 1.1 Stewart, James (2003). Single Variable Calculus: Early Transcendentals (5th. ed.). Toronto ON: Brook/Cole. pp. 64. ISBN 0-534-39330-6. https://archive.org/details/singlevariableca00stew/page/64. Retrieved 15 July 2012. "Therefore, we have the following geometric method for determining whether a function is one-to-one." 
  2. Zorn, Arnold Ostebee, Paul (2002). Calculus from graphical, numerical, and symbolic points of view (2nd ed.). Australia: Brooks/Cole/Thomson Learning. pp. 185. ISBN 0-03-025681-X. https://books.google.com/books?id=D48RplvmxVUC&q=horizontal+line+test. "No horizontal line crosses the f-graph more than once."