In order to understand the vertical line test, it's important that you understand what a function is. Make sure to check out the intro to functions lesson if you're new to the idea. You can think of a function like a vending machine. A function takes an input (like the code you enter on the vending machine) and gives you an output (like the candy or pop you get out of the vending machine).
An important rule that all functions must follow is that they can only assign ONE output to an input. For example, if you enter the code D4 in the vending machine and it drops a bag of pretzels, it must drop a bag of pretzels every time you enter the code D4. It can't give you a bag of pretzels sometimes and other times a bag of chips. Every input must be matched with exactly one output. It's ok if there's another input that gives the same output. For example, there might be two slots in the vending machine that both hold pretzels. So you may be able to enter the code D4 or D5 to get pretzels. It's ok if two different inputs give the same output. It's not ok if you enter the same input and get a different result.
There are several different ways to represent a function. You can use a mapping to show how the input values are assigned to output values. You can also display this as a table, set of ordered pairs, or graph.
A function doesn't have to be just a set of points on a graph. A function might also be a continuous line or curve. Let's say your function takes input values and multiplies them by 2. This function could be represented by the equation y = 2x. The graph of y = 2x is a straight line.
If your function took input values and squared them, it could be represented by the curve below.
The Vertical Line Test
The graphs of functions can be straight lines or segments, curves, or even just a set of points. But not all graphs represent functions. The Vertical Line Test is a visual test that you can use to quickly check and see if a graph represents a function.
In order to be a function, each x value can only be paired with exactly one y value. Let's say your function has the ordered pair (4,5). This means that when x is 4, the y must be 5. The 5 is the only y value that can be paired with it. If you also had the point (4,6), the graph would not be a function because that would mean the 4 had been paired with two different y values. If you graph the points (4,5) and (4,6), they are on the same vertical line. One is directly above the other. If a graph ever has two points on the same vertical line, this means that it can't be a function because an x value has been paired with more than one y value.
In order to be a function, a graph cannot have two points that are on the same vertical line. If you're able to draw a vertical line on the graph and it crosses the graph more than once, it is NOT a function.
Practice
Ready to answer some questions on your own? Click the START button to try a practice quiz.