The vertical line test is another simple, visual math tool. By carefully scanning a **graph**, you can determine if what you’re seeing is really a function or just any old relation in disguise.

If **every vertical line** intersects with a graph at *only one point*, the graph represents a function.

If you can find a vertical line intersecting the graph at *more than one point*, it doesn’t represent a function.

What is the Vertical Line Test

Is it a Function?

Using the Vertical Line Test

Examples

Challenge

Practice Questions

Vertical Line Test **Worksheet**

To Sum Up (Pun Intended!)

### So, Is This a Function?

Have you heard the expression “never judge a book by its cover”? Well, it’s not true for graphs! You can immediately classify them by their shape.

The vertical line test works because to be a function, each x-value must lead to a single y-value.

A vertical line is constant in x but varies in y, so if it only intersects once with the graph then the x-value leads to a unique y-value.

If different x-values are associated to the same y-value, this is called a **many-to-one** function.

If all the x- and y-values are neatly paired off, you have a **one-to-one** function.

If a relation passes the vertical line test, it is a function. The reverse is true too: if a relation fails the test, it isn’t a function!

This makes the test super useful, particularly when combined with the horizontal line test.

## Using the Vertical Line Test

The test is very quick to use. That’s why it’s so useful!

- Draw your graph if you’re given an equation, or identify any interesting features if you’ve already been given it. Make sure you know where to scan with your line!
- By holding a ruler vertically against the page or screen, or with your imagination, slide a vertical line left to right across the graph.
- If the line intersects with the graph at more than one point, it fails the test. Grab your favorite coloring pen and draw this line in!
- If the line only intersects with the graph at one point, it passes the test. Draw a few evenly spaced vertical lines to show your work!

Work through the examples in the next section with this interactive version of the graphs in the examples.

Press the play button on the left to make a red vertical line sweep across to help you perform the tests! Turn each graph on or off with the colored circle next to each one on the left.

### Examples

It passes the test and is a function because the repeating waves go “up and down” rather than “left to right.”

There is no region where the graph crosses back on itself, so every vertical line intersects the graph at one point.

It passes the test and is a function because as x increases, y always increases. Again, there are no regions where the graph crosses back on itself.

It fails the test and is not a function because it’s a “sideways parabola“, a shape that crosses back on itself. Any vertical line with x>0 will intersect with the graph at two points.

### Challenge

You saw **y=sin(x)** pass the vertical line test, showing it is a function.

What happens if you replace x with 2x or ^{x}⁄_{2}? Does it still pass the test under these transformations?

Hint: try replacing x with a few numbers to help you plot the graph, or use *Desmos’* graphing calculator.

Replacing x with 2x or ^{x}⁄_{2} doesn’t change the overall repeating wave shape of the graph, so these transformations still pass the line test and are functions.

The effect changes how “long” the waves are. Imagining sin(x) as a spring, sin(2x) has been squished in and sin(^{x}⁄_{2}) has been stretched out!

This is true for all transformations to x in both sinusoidal functions sin(x) and cos(x) – the details are changed, but the characteristic wave shape you know and love is kept.

## Vertical Line Test Practice Questions

Now that you’ve seen how the test is applied, it’s time to let loose and try for yourself! Determine which of the following relations are functions by using the vertical line test.

Sketch the graphs yourself where possible, but don’t be afraid to check your work. *Desmos* has an intuitive tool for plotting and is a good website to be familiar with!

### Question 1

Is **y=9-x** a function?

The vertical line intersects with the graph only once as it slides across the page, so it passes the test and is a function.

Remember, you don’t have to draw it perfectly or “zoom it out” much. You just need to get an idea of its shape!

### Question 2

Is ** y=x ^{4}** a function?

This graph looks like y=x^{2} but with a flatter bottom. It doesn’t cross over itself at all, so it passes the line test and is a function.

### Question 3

Is **y=tan(x)** a function?

This one takes some careful thinking: what happens at the places where the graph goes up or down to infinity?

You don’t need to apply the test at these points because tan is not defined. If you’re interested in why, check out Khan Academy’s visual explanation using a circle.

Sliding the vertical line across, “jumping” it off the page at these undefined points, you see there is always one intersection with the graph. This means y=tan(x) is a function!

### Question 4

Is ** y=cos(3x)** a function?

This graph passes the line test and is a function. The waves go “up and down” rather than “side to side” so the line only intersects one point on the graph at a time.

### Question 5

Is **y ^{4}+x^{3}=0** a function?

This graph is one big dip, turned on its side! The vertical line intersects with it twice when x<0 and once when x=0 so it fails the test. That means it’s not a function, just a relationship.

### Question 6

Is **(x+1) ^{2}+(y-1)^{2}=1** a function?

Did you recognize the graph’s equation? It gives a circle radius 1, centered at (-1,1). Every circle fails the line test so none are functions, including your friend here!

### Question 7

Is **sin(y)=x** a function?

This graph fails the line test because its waves are “side to side” rather than “up and down.”

Vertical lines with -1≤x≤1 intersect the graph an infinite number of times. It’s definitely not a function!

### Question 8

Is **y=|x|** a function?

This graph looks like a big “V” so does not cross back on itself. No repeating waves here! It passes the line test and is a function.

### Question 9

Is **y=2 ^{x}** a function?

This graph can be difficult to plot if you’re not familiar with its shape, but hopefully, you found that it passes the test so is a function.

Functions of the form y=a^{x} are **exponential** and are used in all sorts of places, from modelling the growth of bacteria to calculating the age of historical objects.

### Question 10

Is **y= ^{1}⁄_{sin(x)}** a function?

This one is a challenge to plot and takes some careful thinking, just like the y=tan(x) graph!

Within the “U” shapes, the line test is passed. But what about the point between these shapes?

These values, where the function is not defined, are called asymptotes. Don’t apply the line test to these points.

All you need to worry about is the “U” shapes, and these pass so the graph is a function!

## Vertical Line Test Worksheets Free Printable Downloads

## To Sum Up (Pun Intended!)

A vertical line test is a visual tool that determines whether a relationship is a function.

A graph is a function *only* if it passes the test – if every vertical line intersects the graph only at one point.

Any graph that fails the test isn’t really a function, it’s a general relation in disguise! Functions must be either one-to-one or many-to-one.

As you worked through the problem sheet and worked examples, you probably noticed that the more familiar functions *really are* functions.

Simple transformations of functions are still functions, as you saw with y=sin(x). This is because the overall shape is not changed, only the position and how “squished” the waves are.

If an equation looks strange or is unfamiliar, get investigating by sliding a vertical line across its graph!

Hopefully, you enjoyed this lesson. Got a question or itching to share your favorite function? You can email Jesse, or leave comment to reach us.