Vertical Line Test for a Function:
Not every curve in the coordinate plane can be the graph of a function. Using vertical line test, we can figure out whether a given curve is the graph of a function or not.
A function f can have only one value f(x) for each x in its domain. So, no vertical line can intersect the graph of a function more than once.
If a is in the domain of the function f, then the vertical line x=a will intersect the graph of f at the single point (a,f(a)).
Example 1: Consider the curve in the coordinate plane as shown below:
A vertical line intersects the above curve twice. So, the above curve is not the graph of a function.
Example 2: Similarly, the circle is not the graph of a function, since a vertical line can intersect the circle twice.
However, the upper semicircle and the lower semicircle both are the graphs of functions.