Vertical Line Test

Not every curve in the plane is the graph of a function. The vertical line test provides a quick, visual way to check: if any vertical line crosses a curve more than once, the curve cannot represent a function.

Quick Reference

Test Rule
Vertical line test A curve is the graph of a function if and only if no vertical line intersects it more than once
Passes Every vertical line meets the curve at most once → it is a function
Fails Some vertical line meets the curve twice or more → it is not a function

Why the Test Works

A function assigns exactly one output to each input. In graphical terms, for each -value there can be at most one -value on the graph. A vertical line selects all points with first coordinate . If it hits the curve at two distinct points and with , then the relation would require and simultaneously, which is impossible since .

A C-shaped curve intersected twice by a vertical line, illustrating the vertical line test failure.
This curve fails the vertical line test: the vertical line hits it at two points and . Therefore this curve is not the graph of a function.

A curve in the coordinate plane is the graph of a function if and only if no vertical line intersects it more than once.

Decide which of the following curves represents a function.

  • The circle : a vertical line hits it at and . Fails the vertical line test; not a function.
  • The parabola : every vertical line meets it exactly once at . Passes; it is a function.
  • The upper semicircle : for each , there is exactly one . Passes; it is a function.

The vertical line test is a quick graphical check, but the ultimate definition of a function is the formal one: each element of the domain is assigned exactly one element of the codomain. The vertical line test and the formal definition are equivalent for curves in the plane.

Frequently Asked Questions

Can part of a curve pass the test while another part fails? The test applies to the entire curve. If any single vertical line intersects the curve more than once, the curve does not represent a function. You cannot declare it a function on the portion that passes.

Does the vertical line test work for curves in 3D? The vertical line test, as stated, applies only to curves in the 2D coordinate plane relating one -variable to one -variable. In higher dimensions, different tests are used to determine whether a surface or curve defines one variable as a function of others.

What if the vertical line is tangent to the curve at exactly one point? Tangency counts as a single intersection: the line meets the curve at one point, so the test is passed at that -value.

Is the circle a function? No, as a whole. But the upper half () and the lower half () are each functions on .