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.

Quick answer: Use the vertical line test. Imagine sliding a vertical line across the graph from left to right. If the line ever touches the graph at more than one point, the graph is not a function, because one x-value has two y-values. If it never touches more than once, the graph is a function. A parabola y = x² passes; a circle fails.

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.

Vertical Line Test in 3 Steps

  1. Place a ruler or pencil straight up and down (vertical) on the left side of the graph.
  2. Slide it slowly to the right across the whole graph. Watch every spot where it crosses the curve.
  3. If at any position it touches the graph two or more times, the graph is not a function. If it touches at most once everywhere, the graph is a function.

Pay close attention to open and filled dots. A vertical line through an open dot and a filled dot at the same x only counts the filled one. Arrows at the ends of a curve mean it keeps going, so picture the line crossing those parts too.

Identifying Common Functions from Their Graphs

Once you know a graph is a function, you can often name it by its shape. These are the families you will see most:

Shape of the graphFunction familyBasic equation
Straight, slanted lineLineary = x
Horizontal lineConstanty = c
U shapeQuadraticy = x²
S-shaped curve through the originCubicy = x³
V shapeAbsolute valuey = |x|
Half of a sideways U starting at a pointSquare rooty = √x
Two curved pieces with asymptotes on both axesReciprocaly = 1/x
Flat on one side, rising faster and faster on the otherExponentialy = 2ˣ

To check your guess, read two or three points off the graph and test them. If the graph is a U shape through (0, 0), (1, 1) and (2, 4), those points fit y = x². A vertical line, by contrast, is not a function at all.

Frequently Asked Questions

How do you tell if a graph is a function?

Use the vertical line test. Picture a vertical line sliding across the whole graph. If it ever touches the graph at two or more points at once, the graph is not a function, because one x-value would have two y-values. If every vertical line touches it at most once, it is a function. A parabola y = x² passes, while a circle fails.

What test is used to determine if a graph is a function?

The vertical line test determines whether a graph is a function of x. A vertical line keeps x fixed, so crossing the graph twice shows one input with two outputs. Remember to check endpoints and holes: an open circle is not part of the graph, so a vertical line through an open circle and a filled dot still counts as only one point.

How do you tell if a graph is a function with points?

List the points and look for repeated x-values. If the same x-value appears with two different y-values, the graph is not a function. For example, (1, 2), (3, 4) and (1, 5) is not a function because x = 1 gives both 2 and 5. But (1, 2), (3, 2) and (5, 6) is a function, since repeated y-values are allowed.

How do you determine if a graph is a function without the vertical line test?

Try solving the equation for y and see whether any x-value gives more than one y-value. For x² + y² = 25, solving gives y = ±√(25 − x²), so x = 3 gives both y = 4 and y = −4, and the circle is not a function. For y = 2x − 1, each x gives just one y, so it is a function.

How do you tell if a graph is a one-to-one function?

First confirm it is a function with the vertical line test, then use the horizontal line test. If every horizontal line crosses the graph at most once, the function is one-to-one, meaning no two inputs share an output. y = x³ passes both tests. y = x² fails the horizontal test because y = 4 comes from both x = 2 and x = −2.

How do you tell if a graph is a linear function?

A linear function graphs as a straight line that is not vertical, so its slope stays the same everywhere. Pick two points and find the slope, then check a third point. A line through (0, 1) and (2, 5) has slope (5 − 1) ÷ 2 = 2, so its equation is y = 2x + 1. A curved graph or a vertical line is not a linear function.

Related to This Article

What people say about "How to Tell If a Graph Is a Function: Vertical Line Test"?

No one replied yet.

Leave a Reply