Verifying a Function Using the Vertical Line Test
We can represent a function using a graph. Graphs display a great many input-output pairs in a small space. The visual information they provide often makes relationships easier to understand. By convention, graphs are typically constructed with the input values along the horizontal axis and the output values along the vertical axis.
The most common graphs name the input value [latex]x[/latex] and the output value [latex]y[/latex], and we say [latex]y[/latex] is a function of [latex]x[/latex], or [latex]y=f(x)[/latex] when the function is named [latex]f[/latex].
The graph of the function is the set of all points [latex](x,y)[/latex] in the plane that satisfies the equation [latex]y=f(x)[/latex]. If the function is defined for only a few input values, then the graph of the function is only a few points, where the [latex]x[/latex]-coordinate of each point is an input value and the [latex]y[/latex]-coordinate of each point is the corresponding output value.

For example, the black dots on the graph above tell us that [latex]f(0)=2[/latex] and [latex]f(6)=1[/latex]. However, the set of all points [latex](x,y)[/latex] satisfying [latex]y=f(x)[/latex] is a curve. The curve shown includes [latex](0,2)[/latex] and [latex](6,1)[/latex] because the curve passes through those points.
The vertical line test can be used to determine whether a graph represents a function. If we can draw any vertical line that intersects a graph more than once, then the graph does not define a function because a function has only one output value for each input value.
vertical line test
The vertical line test determines if a relation is a function by checking that no vertical line intersects the graph more than once.
- Inspect the graph to see if any vertical line drawn would intersect the curve more than once.
- If there is any such line, determine that the graph does not represent a function.
- If no vertical line can intersect the curve more than once, the graph does represent a function.


Determining Whether a Function is One-to-One
Some functions have a given output value that corresponds to two or more input values. For example, in the stock chart shown below, the stock price was [latex]$1000[/latex] on five different dates, meaning that there were five different input values that all resulted in the same output value of [latex]$1000[/latex].

However, some functions have only one input value for each output value, as well as having only one output for each input. We call these functions one-to-one functions. As an example, consider a school that uses only letter grades and decimal equivalents, as listed in the table below.
This grading system represents a one-to-one function, because each letter input yields one particular grade point average output and each grade point average corresponds to one input letter.
one-to-one function
A one-to-one function is a function in which each output value corresponds to exactly one input value.
- Is a balance a one-to-one function of the bank account number?
- Is a bank account number a one-to-one function of the balance?
- Is a balance a one-to-one function of the bank account number?
The Horizontal Line Test
Once we have determined that a graph defines a function, an easy way to determine if it is a one-to-one function is to use the horizontal line test. Draw horizontal lines through the graph. If we can draw any horizontal line that intersects a graph more than once, then the graph does not represent a one-to-one function because that [latex]y[/latex] value has more than one input.
horizontal line test
The horizontal line test checks if a function is one-to-one by ensuring that no horizontal line intersects the graph more than once.
- Inspect the graph to see if any horizontal line drawn would intersect the curve more than once.
- If there is any such line, the function is not one-to-one.
- If no horizontal line can intersect the curve more than once, the function is one-to-one.
