In an informal sense, functions surround us in our everyday lives. For example, each person has exactly one height, and if you park for a certain period of time in a parking ramp, there is exactly one amount that you will pay. The general concept of function is this: a function is a relation between to sets, called the domain and range, such that each element of the domain, thought of as an input value, corresponds to exactly one element of the range, though of as an output value. For example, if Johnny is six feet tall, he can’t also be five feet, ten inches tall. His height is unique. If Morgan parks for one hour in a parking ramp that charges 75 cents per hour, then she will pay exactly 75 cents for parking, not more and not less.
In mathematics, functions are often in the form of equations, though not all equations represent functions. Each of these three examples represents a function. If you choose any x-value and plug it into the equation, a unique value of y will result.
In contrast, an equation like, , does not define a function. Suppose we let x = 0. Then y could have the value 1 or = -1. Thus for each input value x, there is not a unique output value of y.
Vertical line test
One way to determine if a relation defines a function or not is to look at its graph.
If it is possible to draw a vertical line which intersects the graph at more than one place, then the graph is not that of a function.
This is called the vertical line test. For instance, , generates a parabola. Since a parabola of this particular orientation cannot be intersected more than once by any vertical line, then must be a function. On the other hand, , generates a circle of radius 1 and centered at the origin when graphed. It is possible to intersect a circle more than once with a vertical line, so is not a function. (see also the tutorial entitled Vertical and Horizontal Line Test for more review on this topic)
While we often use the notation shown at the top of this page to refer to functions when graphing in the xy-plane, it is not easy to distinguish between two different functions without having to ask the question “To which ‘y’ does this refer?” Mathematicians use what is called function notation to make this distinction. Using function notation, the above functions would look like this:
Written this way, we can talk about how the values of f, g and h vary as functions of the variable x. In the first example, we would say that f is a function of x and we would read the first equation as follows: “f of x equals 3x plus 2.”
This handy notation also helps remind us of the values being related. For instance, in the case of the area formula for circles, the area of a circle is dependent upon the measure of its radius. So using function notation, we might say: A(r) = r2. Written this way it is clear that a circle’s area A is a function of its radius r.