MathLabs
TheoremProved

The vertical line test

Statement

A curve CC in the coordinate plane is the graph of some function of xx if and only if every vertical line x=x0x=x_0 meets CC in at most one point.

Why is it true?

A function assigns exactly one output to each input, so a graph that hits a given vertical line twice would be assigning two different yy values to the same xx, breaking the "exactly one output" rule.

Proof sketch

(⇒\Rightarrow) Suppose CC is the graph of a function ff, so every point of CC has the form (x0,f(x0))(x_0,f(x_0)) for some input x0x_0. Fix any vertical line x=x0x=x_0; the only points of CC that can lie on it are those with first coordinate x0x_0, and there is only one such point, (x0,f(x0))(x_0,f(x_0)), because ff assigns a single value to x0x_0. So the line meets CC in at most one point.

(⇐\Leftarrow) Conversely, suppose every vertical line meets CC in at most one point. Define ff by: for each x0x_0 that has a point of CC above it, let f(x0)f(x_0) be the yy-coordinate of that (unique, by hypothesis) point. This assigns at most one output to each input, so ff is a well-defined function, and by construction its graph is exactly CC.

The two directions together show the equivalence: being a function's graph and passing the vertical line test are the same property viewed from two angles.

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.