Domain and Range

The domain of a function f(x) is the set of all values for which the function is defined, and the range of the function is the set of all values that f takes.

(In grammar school, you probably called the domain the replacement set and the range the solution set. They may also have been called the input and output of the function.)

Example 1:

Consider the function shown in the diagram.

Here, the domain is the set {A, B, C, E}. D is not in the domain, since the function is not defined for D.

The range is the set {1, 3, 4}. 2 is not in the range, since there is no letter in the domain that gets mapped to 2.

You can also talk about the domain of a relation, where one element in the domain may get mapped to more than one element in the range.

Example 2:

Consider the relation {(0, 7), (0, 8), (1, 7), (1, 8), (1, 9), (2, 10)}.

Here, the relation is given as a set of ordered pairs. The domain is the set of x-coordinates, {0, 1, 2}, and the range is the set of y-coordinates, {7, 8, 9, 10}. Note that the domain elements 1 and 2 are associated with more than one range elements, so this is not a function.

But, more commonly, and especially when dealing with graphs on the coordinate plane, we are concerned with functions, where each element of the domain is associated with one element of the range. (See The Vertical Line Test.)

Example 3:

The domain of the function

f(x) = 1/x

is all real numbers except zero (since at x = 0, the function is undefined: division by zero is not allowed!).

The range is also all real numbers except zero. You can see that there is some point on the curve for every y-value except y = 0.

Domains can also be explicitly specified, if there are values for which the function could be defined, but which we don't want to consider for some reason.

Example 4:

The following notation shows that the domain of the function is restricted to the interval (–1, 1).

f(x) = x2,     –1 x 1

The graph of this function is as shown. Note the open circles, which show that the function is not defined at x = –1 and x = 1. The y-values range from 0 up to 1 (including 0, but not including 1). So the range of the function is

0 y < 1.