Relations and Functions
Method

Vertical Line Test

The vertical line test is a graphical method to determine whether a given relation is a function. For example, consider the following relations.
Relation I Relation II Relation III
To determine whether the relations are functions, follow these two steps.
1
Draw the Relation on the Coordinate Plane
expand_more

Draw the relation on the coordinate plane. The first two relations can be drawn using a graphing calculator or other mathematical software.

Graph of the three relations: (y-2)(y+1)=x; y=x(x+1)(x-2), and x (-2.25,-2),(-1.75,0),(-1,2),(-1,-1),(0,1),(1,-0.75), and (2,0.5)
2
Draw a Vertical Line and Look at the Intersection Points
expand_more

Draw vertical lines at different places through the coordinate plane. If one of the lines intersects the graph more than once, the relation is not a function. Conversely, if no vertical line cuts the graph more than once, the relation is a function.

Different vertical lines drawn along each relation

Notice that cuts the first graph at two different points. The line also passes through two different points. This means that neither Relation I nor Relation III is a function. However, all of the vertical lines drawn over Relation II only intersect the graph one time at most. Because of this, Relation II is a function.

  • Relation I is not a function.
  • Relation II is a function.
  • Relation III is not a function.

Keep in mind that before stating whether a relation is a function, the vertical lines drawn have to cover the entire domain to ensure that no vertical line cuts the graph more than once.

Why

Intuition Behind the Method

If a relation is not a function, it is because there are multiple values corresponding to the same value. Therefore, the graph of such relation would show at least two points directly above the other.

Points with the same value belong to the same vertical line.

This is why drawing a vertical line and moving it across the graph reveals if the graph is a function or not.
Moving a vertical line across two different graphs
Note that when determining whether a relation is or is not a function, it must be assumed that the graph of a relation continues without any significant change beyond the boundaries of the coordinate plane. If this were not the case, it could never be determined from a graph whether a relation is a function.
Exercises
Loading content