Answer:
The domain of a function f(x)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 ff 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}{A,B,C,E} . DD is not in the domain, since the function is not defined for DD .
The range is the set {1,3,4}{1,3,4} . 22 is not in the range, since there is no letter in the domain that gets mapped to 22 .
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)}{(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 xx -coordinates, {0,1,2}{0,1,2} , and the range is the set of yy -coordinates, {7,8,9,10}{7,8,9,10} . Note that the domain elements 11 and 22 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)=1xf(x)=1x
is all real numbers except zero (since at x=0x=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 yy -value except y=0y=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)(−1,1) .
f(x)=x2, −1<x<1f(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=−1x=−1 and x=1x=1 . The yy -values range from 00 up to 11 (including 00 , but not including 11 ). So the range of the function is
0≤y<10≤y<1 .