How to Tell If a Graph Is a Function: Vertical Line Test

To tell whether a graph represents y as a function of x, use the vertical line test: imagine sliding a vertical line across the entire graph. If it hits two or more included points anywhere, the graph is not a function. If every vertical line hits at most one included point, it is a function. You do not need to find an equation first.

How to Tell If a Graph Is a Function: Vertical Line Test

How the vertical line test works

A function gives each input in its domain exactly one output. On an ordinary coordinate graph, x is the input and y is the output. A vertical line holds x fixed, so two intersections reveal two outputs for the same input.

  1. Look for points directly above or below one another.
  2. Check the whole graph, including endpoints and separate pieces.
  3. If you find one x-value with two different included y-values, stop: it is not a function. Otherwise, explain why no vertical line could meet it twice.

At most once matters: a vertical line can miss the graph. That x-value is outside the graph’s domain. Passing one sample line is not enough to prove the whole graph is a function.

Graph examples: what passes and what fails?

A sloping line passes

The blue line below represents a function. For example, the dashed vertical line at x = 2 meets it at (2, 1). More generally, every vertical line meets this nonvertical straight line only once.

A descending blue straight line with exactly one y-value for each x-value
A nonvertical line passes.
Dashed vertical line x equals 2 meets the descending blue line once, at the red point 2 comma 1
The test line x = 2 meets one included point.

A parabola passes; a circle fails

y = x2 is a function. At x = −2, y = 4; at x = 2, y = 4 as well. Different inputs may share an output. The important question is whether a single input gives more than one output, which does not happen here.

The full circle x2 + y2 = 9 is not y as a function of x. At x = 0, it contains both (0, 3) and (0, −3). The vertical line x = 0 meets it twice. Restricting the graph to its upper semicircle gives y = √(9 − x2), for −3 ≤ x ≤ 3, which does pass.

Horizontal line y = −2: a function, since every x gives −2. Vertical line x = 4: not y as a function of x, since the same input 4 has many outputs.

Holes, separate pieces and asymptotes

Open circles are excluded points. Suppose a graph has an open circle at (1, 2) and a filled point at (1, 5). Only the filled point counts at x = 1. If both points were filled, the graph would fail.

Test separate pieces together. Each piece can pass on its own while their combined graph fails. For example, two horizontal segments y = 1 and y = 3, both drawn for 0 ≤ x ≤ 2, give two outputs for every x in that interval.

A gap does not automatically mean failure. The graph y = 1/x has no point at x = 0 and has a vertical asymptote there. It is still a function on its domain, x ≠ 0. Asymptote crossings are not the decision rule; count actual graph points with the same x-value.

Vertical vs. horizontal line test

The vertical test answers “Is this y as a function of x?” Once that answer is yes, the horizontal test asks “Is this function one-to-one?” A one-to-one function never gives the same output for two different inputs.

For y = x2, the vertical test passes, but the horizontal line y = 4 meets the graph at (−2, 4) and (2, 4). It is a function, but it is not one-to-one on all real numbers. Do not reject it as a function because it fails the horizontal test.

For the next step, see how to read domain and range. Finding a formula from a graph is a different task: first identify its shape and labeled points, then check a proposed rule against those points.

Try it yourself

Decide whether each set of plotted points represents y as a function of x. Open each explanation after you have checked the inputs.

1. (−3, 2), (0, 2), (4, 2)

Yes. Each x-value occurs once. Repeating the output 2 is allowed.

2. (−1, 4), (2, 6), (2, −3)

No. The input 2 has outputs 6 and −3. The vertical line x = 2 meets two points.

3. An open point at (3, 1) and a filled point at (3, 7), with no other points sharing an x-value

Yes. The open point is excluded. At x = 3, only y = 7 is included.

Continue with free Algebra 1 worksheet PDFs or choose another lesson in the Algebra 1 Online Center. For a paid study-guide option, preview Algebra I for Beginners before deciding whether it suits your review.

Further reading: OpenStax, Functions and Function Notation, explains the vertical and horizontal line tests. The worked examples and quick checks above are original to this lesson.

Related to This Article

What people say about "Identify a Function from Its Graph"?

No one replied yet.

Leave a Reply