3.2 Domain and Range
Horror and thriller movies are both popular and, very often, extremely profitable. When big-budget actors, shooting locations, and special effects are included, however, studios count on even more viewership to be successful. Consider five major thriller/horror entries from the early 2000s—I am Legend, Hannibal, The Ring, The Grudge, and The Conjuring. Figure 1 shows the amount, in dollars, each of those movies grossed when they were released as well as the ticket sales for horror movies in general by year. Notice that we can use the data to create a function of the amount each movie earned or the total ticket sales for all horror movies by year. In creating various functions using the data, we can identify different independent and dependent variables, and we can analyze the data and the functions to determine the domain and range. In this section, we will investigate methods for determining the domain and range of functions such as these.

Figure 1 Based on data compiled by www.the-numbers.com.
3.2.1 Finding the Domain of a Function Defined by an Equation
In Functions and Function Notation, we were introduced to the concepts of domain and range. In this section, we will practice determining domains and ranges for specific functions. Keep in mind that, in determining domains and ranges, we need to consider what is physically possible or meaningful in real-world examples, such as tickets sales and year in the horror movie example above. We also need to consider what is mathematically permitted. For example, we cannot include any input value that leads us to take an even root of a negative number if the domain and range consist of real numbers. Or in a function expressed as a formula, we cannot include any input value in the domain that would lead us to divide by 0.
We can visualize the domain as a “holding area” that contains “raw materials” for a “function machine” and the range as another “holding area” for the machine’s products. See Figure 2.

Figure 2
We can write the domain and range in interval notation, which uses values within brackets to describe a set of numbers. In interval notation, we use a square bracket [ when the set includes the endpoint and a parenthesis ( to indicate that the endpoint is either not included or the interval is unbounded. For example, if a person has $100 to spend, they would need to express the interval that is more than 0 and less than or equal to 100 and write \(\left( {0,\mspace{9mu} 100} \right\rbrack.\) We will discuss interval notation in greater detail later.
Let’s turn our attention to finding the domain of a function whose equation is provided. Oftentimes, finding the domain of such functions involves remembering three different forms. First, if the function has no denominator or an odd root, consider whether the domain could be all real numbers. Second, if there is a denominator in the function’s equation, exclude values in the domain that force the denominator to be zero. Third, if there is an even root, consider excluding values that would make the radicand negative.
Before we begin, let us review the conventions of interval notation:
- The smallest number from the interval is written first.
- The largest number in the interval is written second, following a comma.
- Parentheses, ( or ), are used to signify that an endpoint value is not included, called exclusive.
- Brackets, [ or ], are used to indicate that an endpoint value is included, called inclusive.
See Figure 3 for a summary of interval notation.
![A reference table with four columns: Inequality, Interval Notation, Graph on Number Line, and Description. Eight rows cover every combination of open and closed endpoints: x > a as (a, infinity), x < a as (-infinity, a), x >= a as [a, infinity), x <= a as (-infinity, a], a < x < b as (a, b), a <= x < b as [a, b), a < x <= b as (a, b], and a <= x <= b as [a, b]. Each row includes a number-line diagram showing an open parenthesis or closed bracket at each endpoint with an arrow or segment between them.](../images/CNX_Precalc_Figure_01_02_029n.jpg)
Figure 3
3.2.2 Using Notations to Specify Domain and Range
In the previous examples, we used inequalities and lists to describe the domain of functions. We can also use inequalities, or other statements that might define sets of values or data, to describe the behavior of the variable in set-builder notation. For example, \(\left\{ x \middle| 10 \leq x < 30 \right\}\) describes the behavior of \(x\) in set-builder notation. The braces \(\{\}\) are read as “the set of,” and the vertical bar | is read as “such that,” so we would read \(\left\{ x \middle| 10 \leq x < 30 \right\}\) as “the set of \(x\)-values such that 10 is less than or equal to \(x,\) and \(x\) is less than 30.”
Figure 5 compares inequality notation, set-builder notation, and interval notation.

Figure 5
To combine two intervals using inequality notation or set-builder notation, we use the word “or.” As we saw in earlier examples, we use the union symbol, \(\cup ,\) to combine two unconnected intervals. For example, the union of the sets \(\left\{ 2,3,5 \right\}\) and \(\left\{ 4,6 \right\}\) is the set \(\left\{ 2,3,4,5,6 \right\}.\) It is the set of all elements that belong to one or the other (or both) of the original two sets. For sets with a finite number of elements like these, the elements do not have to be listed in ascending order of numerical value. If the original two sets have some elements in common, those elements should be listed only once in the union set. For sets of real numbers on intervals, another example of a union is
\[\left\{ {\left. x \right|\mspace{9mu}\ |x| \geq 3} \right\} = \left( {- \infty, - 3} \right\rbrack \cup \left\lbrack {3,\infty} \right)\]
3.2.3 Finding Domain and Range from Graphs
Another way to identify the domain and range of functions is by using graphs. Because the domain refers to the set of possible input values, the domain of a graph consists of all the input values shown on the \(x\)-axis. The range is the set of possible output values, which are shown on the \(y\)-axis. Keep in mind that if the graph continues beyond the portion of the graph we can see, the domain and range may be greater than the visible values. See Figure 8.

Figure 8
We can observe that the graph extends horizontally from \(-5\) to the right without bound, so the domain is \(\left\lbrack {-5,\infty} \right).\) The vertical extent of the graph is all range values \(5\) and below, so the range is \(\left( {{-\infty},5} \right\rbrack.\) Note that the domain and range are always written from smaller to larger values, or from left to right for domain, and from the bottom of the graph to the top of the graph for range.
3.2.4 Finding Domains and Ranges of the Toolkit Functions
We will now return to our set of toolkit functions to determine the domain and range of each.
![Graph of the constant function f(x) = c, shown as a horizontal line above the x-axis with arrows extending in both directions. Text below states Domain: (negative infinity, infinity) and Range: [c, c].](../images/CNX_Precalc_Figure_01_02_011-e84a.jpg)
Figure 13 For the constant function \(f(x) = c,\) the domain consists of all real numbers; there are no restrictions on the input. The only output value is the constant \(c,\) so the range is the set \(\left\{ c \right\}\) that contains this single element. In interval notation, this is written as \(\lbrack c,c\rbrack,\) the interval that both begins and ends with \(c.\)

Figure 14 For the identity function \(f(x) = x,\) there is no restriction on \(x.\) Both the domain and range are the set of all real numbers.

Figure 15 For the absolute value function \(f(x) = |x|,\) there is no restriction on \(x.\) However, because absolute value is defined as a distance from 0, the output can only be greater than or equal to 0.

Figure 16 For the quadratic function \(f(x) = x^{2},\) the domain is all real numbers since the horizontal extent of the graph is the whole real number line. Because the graph does not include any negative values for the range, the range is only nonnegative real numbers.

Figure 17 For the cubic function \(f(x) = x^{3},\) the domain is all real numbers because the horizontal extent of the graph is the whole real number line. The same applies to the vertical extent of the graph, so the domain and range include all real numbers.

Figure 18 For the reciprocal function \(f(x) = \frac{1}{x},\) we cannot divide by 0, so we must exclude 0 from the domain. Further, 1 divided by any value can never be 0, so the range also will not include 0. In set-builder notation, we could also write \(\left\{ x \middle| \mspace{9mu} x \neq 0 \right\},\) the set of all real numbers that are not zero.

Figure 19 For the reciprocal squared function \(f(x) = \frac{1}{x^{2}},\) we cannot divide by \(0,\) so we must exclude \(0\) from the domain. There is also no \(x\) that can give an output of 0, so 0 is excluded from the range as well. Note that the output of this function is always positive due to the square in the denominator, so the range includes only positive numbers.

Figure 20 For the square root function \(f(x) = \sqrt[{}]{x},\) we cannot take the square root of a negative real number, so the domain must be 0 or greater. The range also excludes negative numbers because the square root of a positive number \(x\) is defined to be positive, even though the square of the negative number \(- \sqrt{x}\) also gives us \(x.\)

Figure 21 For the cube root function \(f(x) = \sqrt[3]{x},\) the domain and range include all real numbers. Note that there is no problem taking a cube root, or any odd-integer root, of a negative number, and the resulting output is negative (it is an odd function).
3.2.5 Graphing Piecewise-Defined Functions
Sometimes, we come across a function that requires more than one formula in order to obtain the given output. For example, in the toolkit functions, we introduced the absolute value function \(f(x) = |x|.\) With a domain of all real numbers and a range of values greater than or equal to 0, absolute value can be defined as the magnitude, or modulus, of a real number value regardless of sign. It is the distance from 0 on the number line. All of these definitions require the output to be greater than or equal to 0.
If we input 0, or a positive value, the output is the same as the input.
\[f(x) = x\mspace{9mu}\text{if}\mspace{9mu} x \geq 0\]
If we input a negative value, the output is the opposite of the input.
\[f(x) = - x\mspace{9mu}\text{if}\mspace{9mu} x < 0\]
Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain.
We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain “boundaries.” For example, we often encounter situations in business for which the cost per piece of a certain item is discounted once the number ordered exceeds a certain value. Tax brackets are another real-world example of piecewise functions. For example, consider a simple tax system in which incomes up to $10{,}000 are taxed at 10%, and any additional income is taxed at 20%. The tax on a total income \(S\) would be \(0.1S\) if \(S \leq \text{\$}10\text{,}000\) and \(\text{\$}1000 + 0.2(S - \text{\$}10\text{,}000)\) if \(S > \text{\$}10\text{,}000.\)
Section Exercises
Verbal
1. Why does the domain differ for different functions?
Solution (click to reveal)
The domain of a function depends upon what values of the independent variable make the function undefined or imaginary.
2. How do we determine the domain of a function defined by an equation?
3. Explain why the domain of \(f(x) = \sqrt[3]{x}\) is different from the domain of \(f(x) = \sqrt[{}]{x}.\)
Solution (click to reveal)
There is no restriction on \(x\) for \(f(x) = \sqrt[3]{x}\) because you can take the cube root of any real number. So the domain is all real numbers, \(( - \infty,\infty).\) When dealing with the set of real numbers, you cannot take the square root of negative numbers. So \(x\) -values are restricted for \(f(x) = \sqrt[{}]{x}\) to nonnegative numbers and the domain is \(\lbrack 0,\infty).\)
4. When describing sets of numbers using interval notation, when do you use a parenthesis and when do you use a bracket?
5. How do you graph a piecewise function?
Solution (click to reveal)
Graph each formula of the piecewise function over its corresponding domain. Use the same scale for the \(x\) -axis and \(y\) -axis for each graph. Indicate inclusive endpoints with a solid circle and exclusive endpoints with an open circle. Use an arrow to indicate \(- \infty\) or \(\infty.\) Combine the graphs to find the graph of the piecewise function.
Algebraic
For the following exercises, find the domain of each function using interval notation.
6. \(f(x) = - 2x(x - 1)(x - 2)\)
7. \(f(x) = 5 - 2x^{2}\)
Solution (click to reveal)
\(( - \infty,\infty)\)
8. \(f(x) = 3\sqrt{x - 2}\)
9. \(f(x) = 3 - \sqrt{6 - 2x}\)
Solution (click to reveal)
\(( - \infty,3\rbrack\)
10. \(f(x) = \sqrt{4 - 3x}\)
11. \(f(x) = \sqrt[{}]{x^{2} + 4}\)
Solution (click to reveal)
\(( - \infty,\infty)\)
12. \(f(x) = \sqrt[3]{1 - 2x}\)
13. \(f(x) = \sqrt[3]{x - 1}\)
Solution (click to reveal)
\(( - \infty,\infty)\)
14. \(f(x) = \frac{9}{x - 6}\)
15. \(f(x) = \frac{3x + 1}{4x + 2}\)
Solution (click to reveal)
\(( - \infty, - \frac{1}{2}) \cup ( - \frac{1}{2},\infty)\)
16. \(f(x) = \frac{\sqrt{x + 4}}{x - 4}\)
17. \(f(x) = \frac{x - 3}{x^{2} + 9x - 22}\)
Solution (click to reveal)
\(( - \infty, - 11) \cup ( - 11,2) \cup (2,\infty)\)
18. \(f(x) = \frac{1}{x^{2} - x - 6}\)
19. \(f(x) = \frac{2x^{3} - 250}{x^{2} - 2x - 15}\)
Solution (click to reveal)
\(( - \infty, - 3) \cup ( - 3,5) \cup (5,\infty)\)
20. \({f(x) =}\frac{5}{\sqrt{x - 3}}\)
21. \({f(x) =}\frac{2x + 1}{\sqrt{5 - x}}\)
Solution (click to reveal)
\(( - \infty,5)\)
22. \(f(x) = \frac{\sqrt{x - 4}}{\sqrt{x - 6}}\)
23. \(f(x) = \frac{\sqrt{x - 6}}{\sqrt{x - 4}}\)
Solution (click to reveal)
\(\lbrack 6,\infty)\)
24. \(f(x) = \frac{x}{x}\)
25. \(f(x) = \frac{x^{2} - 9x}{x^{2} - 81}\)
Solution (click to reveal)
\(\left( {- \infty, - 9} \right) \cup \left( {- 9,9} \right) \cup \left( {9,\infty} \right)\)
26. Find the domain of the function \(f(x) = \sqrt{2x^{3} - 50x}\) by:
ⓐ using algebra.
ⓑ graphing the function in the radicand and determining intervals on the \(x\)-axis for which the radicand is nonnegative.
Graphical
For the following exercises, write the domain and range of each function using interval notation.
27.

Solution (click to reveal)
domain: \((2,8\rbrack,\) range \(\lbrack 6,8)\)
28.

29.

Solution (click to reveal)
domain: \(\lbrack - 4,\mspace{9mu}\text{4],}\) range: \(\lbrack 0,\mspace{9mu}\text{2]}\)
30.

31.

Solution (click to reveal)
domain: \(\lbrack - 5,\mspace{9mu} 3),\) range: \(\left\lbrack {0,2} \right\rbrack\)
32.

33.
![Graph of a function from (-infinity, 2].](../images/CNX_Precalc_Figure_01_02_208-4559.jpg)
Solution (click to reveal)
domain: \(( - \infty,1\rbrack,\) range: \(\lbrack 0,\infty)\)
34.

35.
![Graph of a function from [-6, -1/6]U[1/6, 6]/.](../images/CNX_Precalc_Figure_01_02_210-3ca2.jpg)
Solution (click to reveal)
domain: \(\left\lbrack {- 6, - \frac{1}{6}} \right\rbrack \cup \left\lbrack {\frac{1}{6},6} \right\rbrack;\) range: \(\left\lbrack {- 6, - \frac{1}{6}} \right\rbrack \cup \left\lbrack {\frac{1}{6},6} \right\rbrack\)
36.

37.

Solution (click to reveal)
domain: \(\lbrack - 3,\mspace{9mu}\infty);\) range: \(\lbrack 0,\infty)\)
For the following exercises, sketch a graph of the piecewise function. Write the domain in interval notation.
38. \(f(x) = \left\{ \begin{array}{lll} {x + 1} & \text{if} & {x < - 2} \\ {- 2x - 3} & \text{if} & {x \geq - 2} \end{array} \right.\)
39. \(f(x) = \left\{ \begin{array}{lll} {2x - 1} & \text{if} & {x < 1} \\ {1 + x} & \text{if} & {x \geq 1} \end{array} \right.\)
Solution (click to reveal)
domain: \(( - \infty,\infty)\)

40. \(f(x) = \left\{ \begin{matrix} {x + 1\mspace{9mu}\mspace{9mu}\text{if}\mspace{9mu}\mspace{9mu} x < 0} \\ {x - 1\mspace{9mu}\mspace{9mu}\text{if}\mspace{9mu}\mspace{9mu}\mspace{9mu} x > 0} \end{matrix} \right.\)
41. \(f(x) = \left\{ \begin{matrix} 3 & \text{if} & {x < 0} \\ \sqrt{x} & \text{if} & {x \geq 0} \end{matrix} \right.\)
Solution (click to reveal)
domain: \(( - \infty,\infty)\)

42. \(f(x) = \left\{ \begin{matrix} {x^{2}\mspace{9mu}\text{~~~~~if~}x < 0} \\ {1 - x\mspace{9mu}\text{~if~}x > 0} \end{matrix} \right.\)
43. \(f(x) = \left\{ \begin{array}{r} \begin{array}{r} x^{2} \\ {x + 2} \end{array} \end{array} \right.\mspace{9mu}\mspace{9mu}\begin{array}{l} {\text{if}\mspace{9mu}\mspace{9mu}\mspace{9mu}\mspace{9mu}\mspace{9mu} x < 0} \\ {\text{if}\mspace{9mu}\mspace{9mu}\mspace{9mu}\mspace{9mu}\mspace{9mu} x \geq 0} \end{array}\)
Solution (click to reveal)
domain: \(( - \infty,\infty)\)

44. \(f(x) = \left\{ \begin{matrix} {x + 1} & \text{if} & {x < 1} \\ x^{3} & \text{if} & {x \geq 1} \end{matrix} \right.\)
45. \(f(x) = \left\{ \begin{matrix} |x| \\ 1 \end{matrix} \right.\begin{array}{l} {\mspace{9mu}\mspace{9mu}\mspace{9mu}\text{if}\mspace{9mu}\mspace{9mu}\mspace{9mu} x < 2} \\ {\mspace{9mu}\mspace{9mu}\mspace{9mu}\text{if}\mspace{9mu}\mspace{9mu}\mspace{9mu} x \geq 2} \end{array}\)
Solution (click to reveal)
domain: \(( - \infty,\infty)\)

Numeric
For the following exercises, given each function \(f,\) evaluate \(f(-3),\mspace{9mu} f(-2),\mspace{9mu} f(-1),\) and \(f(0).\)
46. \(f(x) = \left\{ \begin{array}{lll} {x + 1} & \text{if} & {x < - 2} \\ {- 2x - 3} & \text{if} & {x \geq - 2} \end{array} \right.\)
47. \(f(x) = \left\{ \begin{matrix} 1 & {\text{if~}x \leq - 3} \\ 0 & {\text{if~}x > - 3} \end{matrix} \right.\)
Solution (click to reveal)
\(\begin{matrix} {f( - 3) = 1;} & {f( - 2) = 0;} & {f( - 1) = 0;} & {f(0) = 0} \end{matrix}\)
48. \(f(x) = \left\{ \begin{matrix} {- 2x^{2} + 3} & {\text{if~}x \leq - 1} \\ {5x - 7} & {\text{if~}x > - 1} \end{matrix} \right.\)
For the following exercises, given each function \(f,\) evaluate \(f(-1),\mspace{9mu} f(0),\mspace{9mu} f(2),\) and \(f(4).\)
49. \(f(x) = \left\{ \begin{array}{lll} {7x + 3} & \text{if} & {x < 0} \\ {7x + 6} & \text{if} & {x \geq 0} \end{array} \right.\)
Solution (click to reveal)
\(\begin{matrix} {f( - 1) = - 4;} & {f(0) = 6;} & {f(2) = 20;} & {f(4) = 34} \end{matrix}\)
50. \(f(x) = \left\{ \begin{matrix} {x^{2} - 2} & \text{if} & {x < 2} \\ {4 + \left| {x - 5} \right|} & \text{if} & {x \geq 2} \end{matrix} \right.\)
51. \(f(x) = \left\{ \begin{matrix} {5x} & \text{if} & {x < 0} \\ 3 & \text{if} & {0 \leq x \leq 3} \\ x^{2} & \text{if} & {x > 3} \end{matrix} \right.\)
Solution (click to reveal)
\(\begin{matrix} {f( - 1) = - 5;} & {f(0) = 3;} & {f(2) = 3;} & {f(4) = 16} \end{matrix}\)
For the following exercises, write the domain for the piecewise function in interval notation.
52. \(f(x) = \left\{ \begin{matrix} {x + 1\mspace{9mu}\text{if}\mspace{9mu} x < - 2} \\ {- 2x - 3\mspace{9mu}\text{if}\mspace{9mu} x \geq - 2} \end{matrix} \right.\)
53. \(f(x) = \left\{ \begin{matrix} {x^{2} - 2\mspace{9mu}\text{if}\mspace{9mu} x < 1} \\ {- x^{2} + 2\mspace{9mu}\text{if}\mspace{9mu} x > 1} \end{matrix} \right.\)
Solution (click to reveal)
domain: \(( - \infty,1) \cup (1,\infty)\)
54. \(f(x) = \left\{ \begin{matrix} {2x - 3} \\ {- 3x^{2}} \end{matrix} \right.\mspace{9mu}\begin{matrix} {\text{if}\mspace{9mu} x < 0} \\ {\text{if}\mspace{9mu} x \geq 2} \end{matrix}\)
Technology
55. Graph \(y = \frac{1}{x^{2}}\) on the viewing window \(\lbrack-0.5,-0.1\rbrack\) and \(\lbrack 0.1,0.5\rbrack.\) Determine the corresponding range for the viewing window. Show the graphs.
Solution (click to reveal)
![Graph of the equation from [-0.5, -0.1].](../images/CNX_Precalc_Figure_01_02_221.png)
window: \(\lbrack - 0.5, - 0.1\rbrack;\) range: \(\lbrack 4,\mspace{9mu} 100\rbrack\)
![Graph of y = 1/x squared on the viewing window [0.1, 0.5]. The curve decreases steeply from approximately (0.1, 100) and levels off toward (0.5, 4), remaining entirely in quadrant one.](../images/CNX_Precalc_Figure_01_02_222-a7f2.jpg)
window: \(\lbrack 0.1,\mspace{9mu} 0.5\rbrack;\) range: \(\lbrack 4,\mspace{9mu} 100\rbrack\)
56. Graph \(y = \frac{1}{x}\) on the viewing window \(\lbrack-0.5,-0.1\rbrack\) and \(\lbrack 0.1,\mspace{9mu} 0.5\rbrack.\) Determine the corresponding range for the viewing window. Show the graphs.
Extension
57. Suppose the range of a function \(f\) is \(\lbrack-5,\mspace{9mu} 8\rbrack.\) What is the range of \(\left| f(x) \middle| ? \right.\)
Solution (click to reveal)
\(\lbrack 0,\mspace{9mu} 8\rbrack\)
58. Create a function in which the range is all nonnegative real numbers.
59. Create a function in which the domain is \(x > 2.\)
Solution (click to reveal)
Many answers. One function is \(f(x) = \frac{1}{\sqrt{x - 2}}.\)
Real-World Applications
60. The height \(h\) of a projectile is a function of the time \(t\) it is in the air. The height in feet for \(t\) seconds is given by the function \(h(t) = -16t^{2} + 96t.\) What is the domain of the function? What does the domain mean in the context of the problem?
61. The cost in dollars of making \(x\) items is given by the function \(C(x) = 10x + 500.\)
ⓐ The fixed cost is determined when zero items are produced. Find the fixed cost for this item.
ⓑ What is the cost of making 25 items?
ⓒ Suppose the maximum cost allowed is $1500. What are the domain and range of the cost function, \(C(x)?\)
Solution (click to reveal)
ⓐ The fixed cost is $500.
ⓑ The cost of making 25 items is $750.
ⓒ The domain is [0, 100] and the range is [500, 1500].












