Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Algebra 1

4.5.2 Using the Vertical Line Test

Algebra 14.5.2 Using the Vertical Line Test

Search for key terms or text.

Activity

A table for the relation ff is below.

xx 1 2 3 1 4 5
f(x)f(x) -1 5 -2 1 3 -2

1. Is this relation a function? Explain your answer.

2. Use the Desmos graphing tool or technology outside the course. Graph the points in the relation.

Interact with the graph. Graph the points in the relation on a coordinate grid.

3. What do you notice about the points (1,1)(1,1) and (1,1)(1,1)?

VERTICAL LINE TEST

A set of points in a rectangular coordinate system is the graph of a function if every vertical line intersects the graph in at most one point.

If any vertical line intersects the graph in more than one point, the graph does not represent a function.

If the graph does represent a function, we say it “passes the vertical line test.”

4. For the function graphed below, determine if the graph passes the vertical line test and then explain how this identifies the graph as a function or not.

A line with a negative slope crosses the y-axis at 2 and the x-axis at 3 on a coordinate grid ranging from negative 6 to 6 on both axes. The arrow on the left indicates the line continues beyond the grid.

5. For the function graphed below, determine if the graph passes the vertical line test and then explain how this identifies the graph as a function or not.

A sideways parabola that opens to the right and passes through the points (negative 1, 0), (3, 2), and (3, negative 2), a black vertical line passing through (1, 0).

Notice that the graph of a non-vertical line will always be a function. This is called a linear function.

Video: Interpreting Function Notation

Watch the following video to learn more about function notation.

Self Check

Which of the following graphs is the graph of a function?
  1. The figure has a sideways absolute value function graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 6 to 6. The line bends at the point (0, 2) and goes to the right. The line goes through the points (1, 3), (2, 4), (1, 1), and (2, 0).
  2. The figure has a parabola opening up graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 4 to 8. The parabola goes through the points (negative 2, 6), (1, 3), (0, 2), (1, 3), and (2, 6).
  3. The figure has a parabola opening right graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 6 to 6. The parabola goes through the points (negative 2, 0), (negative 1, 1), (negative 1, negative 1), (negative 2, 2), and (2, 2).
  4. The figure has a circle graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 6 to 6. The circle goes through the points (negative 3, 0), (3, 0), (0, negative 3), and (0, 3).

Additional Resources

Determine If a Graph Is a Function

This figure has a graph next to a table. The graph has a straight line on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The line goes through the points (0, negative 3), (1, negative 1), and (2, 1). The line is labeled f of x equals 2 x minus 3. There are several vertical arrows that relate values on the x-axis to points on the line. The first arrow relates x equals negative 2 on the x-axis to the point (negative 2, negative 7) on the line. The second arrow relates x equals negative 1 on the x-axis to the point (negative 1, negative 5) on the line. The next arrow relates x equals 0 on the x-axis to the point (0, negative 3) on the line. The next arrow relates x equals 3 on the x-axis to the point (3, 3) on the line. The last arrow relates x equals 4 on the x-axis to the point (4, 5) on the line. The table has 7 rows and 3 columns. The first row is a title row with the label f of x equals 2 x minus 3. The second row is a header row with the headers x, f of x, and (x, f of x). The third row has the coordinates negative 2, negative 7, and (negative 2, negative 7). The fourth row has the coordinates negative 1, negative 5, and (negative 1, negative 5). The fifth row has the coordinates 0, negative 3, and (0, negative 3). The sixth row has the coordinates 3, 3, and (3, 3). The seventh row has the coordinates 4, 5, and (4, 5).

A relation is a function if every input has exactly one output value. So the relation defined by the equation y = 2 x 3 y = 2 x 3 is a function. Notice that a line will always be a function, so it is called a linear function.

If we look at the graph, each vertical dashed line intersects the line at only one point. This makes sense because in a function, for every xx-value there is only one yy-value.

If the vertical line hit the graph twice, the xx-value would be mapped to two yy-values, so the graph would not represent a function.

This leads us to the vertical line test. A set of points in a rectangular coordinate system is the graph of a function if every vertical line intersects the graph in at most one point. If any vertical line intersects the graph in more than one point, the graph does not represent a function.

Look at the graphs below:

The figure has two graphs. In graph a there is a parabola opening up graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 2 to 10. The parabola goes through the points (0, negative 1), (negative 1, 0), (1, 0), (negative 2, 3), and (2, 3). In graph b there is a circle graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 6 to 6. The circle goes through the points (negative 2, 0), (2, 0), (0, negative 2), and (0, 2).

Graph a passes the vertical line test because if an imaginary vertical line were drawn anywhere on the graph, it would only touch one time.

Graph a is a function.

Graph b does not pass the vertical line test because when a vertical line is drawn down the graph, there is at least one place where the vertical line touches twice.

Graph b is not a function.

Try it

Try It: Determine if a Graph Is a Function

Determine if each graph is a function. Use the vertical line test to explain.

The figure has two graphs. In graph a there is an ellipse graphed on the x y-coordinate plane. The x-axis runs from negative 6 to 6. The y-axis runs from negative 6 to 6. The ellipse goes through the points (0, negative 3), (negative 2, 0), (2, 0), and (0, 3). In graph b there is a straight line graphed on the x y-coordinate plane. The x-axis runs from negative 12 to 12. The y-axis runs from negative 12 to 12. The line goes through the points (0, negative 2), (2, 0), and (4, 2).

Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:

    Access for free at https://openstax.org/books/algebra-1/pages/about-this-course

  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:

    Access for free at https://openstax.org/books/algebra-1/pages/about-this-course

Citation information

© May 21, 2025 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.