Horizontal line test
Encyclopedia
In mathematics
, the horizontal line test is a test used to determine if a function
is injective and/or surjective.
The lines used for the test are parallel to the x axis.
Consider a function f : X → Y with its corresponding graph as a subset of the Cartesian product
X x Y. Consider the horizontal lines in X x Y : .
This test is also used to determine whether or not the inverse relation of a function is itself a function.
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...
, the horizontal line test is a test used to determine if a function
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...
is injective and/or surjective.
The lines used for the test are parallel to the x axis.
Consider a function f : X → Y with its corresponding graph as a subset of the Cartesian product
Cartesian product
In mathematics, a Cartesian product is a construction to build a new set out of a number of given sets. Each member of the Cartesian product corresponds to the selection of one element each in every one of those sets...
X x Y. Consider the horizontal lines in X x Y : .
- The function f is injective (i.e., one-to-one) if and only ifIf and only ifIn logic and related fields such as mathematics and philosophy, if and only if is a biconditional logical connective between statements....
it can be visualized as one whose graphGraph of a functionIn mathematics, the graph of a function f is the collection of all ordered pairs . In particular, if x is a real number, graph means the graphical representation of this collection, in the form of a curve on a Cartesian plane, together with Cartesian axes, etc. Graphing on a Cartesian plane is...
intersects any horizontal line at MOST once. - The function f is surjective (i.e., onto) if and only ifIf and only ifIn logic and related fields such as mathematics and philosophy, if and only if is a biconditional logical connective between statements....
its graph intersects any horizontal line at LEAST once. - f is bijective if and only ifIf and only ifIn logic and related fields such as mathematics and philosophy, if and only if is a biconditional logical connective between statements....
any horizontal line will intersect the graph EXACTLY once.
Passes the test (injective) |
Fail the test (not injective) |
This test is also used to determine whether or not the inverse relation of a function is itself a function.