Lesson Explainer: Domain and Range from Function Graphs Mathematics

In this explainer, we will learn how to identify the domain and range of functions from their graphs.

The domain of a function is the set of acceptable input values of that function. The range of the function is the set of all of the output values of the function, given the domain. In the image below, if the machine represents some function, the domain is the set of all values entered into the machine and the range is the set of all values that exit the machine after the function has been performed on the entire domain.

Definition: Domain of a Function

The domain of a function is the set of all input values for that function.

Definition: Range of a Function

The range of a function is the set of all possible outputs for a function, given its domain.

If a function is plotted onto a coordinate grid, we can use this graph to deduce information about the function. Given the graph of 𝑦=𝑓(π‘₯), the domain is the set of all inputs for our function. If (π‘₯,𝑓(π‘₯)) is a coordinate on the curve, then π‘₯ is part of the domain of the function. Inputs can be identified graphically by drawing vertical lines to determine if those lines form an intersection with our curve.

For example, below is the graph of 𝑦=π‘₯ and π‘₯=1. The intersection of these two functions is at (1,1). Therefore, π‘₯=1 is part of the domain. Notice that there are no gaps or holes in the graph of this function; this indicates that this function has input values of all real numbers. Therefore, the domain of 𝑓 is ℝ.

For any vertical line π‘₯=𝑐 that intersects the graph of a given function, where 𝑐 is a real number, 𝑐 is part of the domain of that function.

Similarly, outputs of a given function can be identified graphically by sketching horizontal lines on the graph to determine if those lines form an intersection or intersections with the given function curve. Below is the graph of 𝑦=π‘₯ and 𝑦=2. The line 𝑦=2 intersects the curve twice. Therefore, 2 must be in the range of this function. Notice that the graph of this function does not fall in quadrant III or quadrant IV. There is no value in the range where 𝑦 is negative. The range of this function is the set of all nonnegative real numbers.

More generally, for the graph of any function, if the horizontal line 𝑦=𝑏 intersects the curve of that function, 𝑏 is included in the range of that function.

In our first example, we will consider the domain of a discrete function.

Example 1: Determining the Domain and Range of a Discrete Function

Fill in the blank: The domain of the function 𝑓(π‘₯) is .

Answer

We are given the graph of a function 𝑓(π‘₯) and asked to find the domain of this function. We see from the graph that the function contains only 5 coordinate pairs, so this is a discrete function. We want to find the domain of this function which is the set of input values for the function.

The graph contains five coordinate pairs, which are (βˆ’7,5), (βˆ’6,4), (βˆ’5,3), (βˆ’4,2), and (βˆ’3,1). The π‘₯-coordinate tells us the function’s input and the 𝑦-coordinate tells us the function’s output. Therefore, the domain of this function will be the set of π‘₯-values: {βˆ’7,βˆ’6,βˆ’5,βˆ’4,βˆ’3}.

We can also find the range of our function. Recall that the range of a function is the set of all output values for a function, given the domain. The outputs of our functions are the 𝑦-coordinates of these five points, so the range will be the set of these 𝑦-coordinates: {1,2,3,4,5}.

In the next example, we will see the graph of a constant function and consider how that impacts its domain and range.

Example 2: Determining the Domain and Range of a Constant Function

Determine the domain and the range of the function 𝑓(π‘₯)=βˆ’4.

Answer

We are given the graph of 𝑓(π‘₯)=βˆ’4 and asked to find the domain of this function. This function is constant; for every value we input into the function, the output value will be βˆ’4. Recall that the domain of a function is the set of all input values for that function and the range of a function is the set of all possible output values for a function, given its domain. Notice on the graph that the arrows on either end of the line indicate that the function will continue infinitely in both directions. This function can accept input values from negative to positive infinity. Another way to say this is thedomainofis𝑓(π‘₯)ℝ.

The outputs for this function are constant and always equal to βˆ’4. Therefore, 𝑓(π‘₯) only has a single output value of βˆ’4. In other words, therangeofis𝑓(π‘₯){βˆ’4}.

In the next example, we will use the graph of a cubic polynomial to find its domain and range.

Example 3: Determining the Domain and Range of a Continuous Function

Find the domain and the range of the function 𝑓(π‘₯)=(π‘₯βˆ’1) in ℝ.

Answer

We are given the graph of the function 𝑓(π‘₯)=(π‘₯βˆ’1) and asked to find its domain and range. Recall that the domain of a function is the set of all input values for that function and the range of a function is the set of all possible output values for a function, given its domain. Notice that on the graph above there are no holes or gaps in the function. This is because 𝑓(π‘₯) is a polynomial function, and all polynomial functions are continuous. The function can accept any π‘₯-values for inputs. Therefore, the domain of 𝑓(π‘₯) is ℝ.

In the given graph, the 𝑦-values range from βˆ’10 to 10. By considering the limits of the function as π‘₯ approaches ±∞, we can find the range of 𝑓(π‘₯).

As the value of π‘₯ approaches infinity, the value of the expression (π‘₯βˆ’1) also approaches infinity.

Similarly, as the value of π‘₯ approaches negative infinity, the value of the expression (π‘₯βˆ’1) approaches negative infinity.

Therefore, the range of 𝑓(π‘₯) is ℝ.

In our next example, we are given the graph of a rational function. Unlike the previous example, this graph will have vertical and horizontal asymptotes. We will see how asymptotes affect the domain and range of a function.

Example 4: Determining the Domain and the Range of a Rational Function given Its Graph

Find the domain and range of the function 𝑓(π‘₯)=βˆ’1π‘₯βˆ’5.

Answer

We are given the graph of the function 𝑓(π‘₯)=βˆ’1π‘₯βˆ’5 and asked to find its domain and range. Recall that the domain of a function is the set of all input values for that function and the range of a function is the set of all possible output values for a function, given its domain. One way to see the domain of a function is to sketch vertical lines and look for the intersection between the vertical line and our function. If a vertical line does not intersect the curve, that π‘₯-value must be excluded from the domain. This function has a vertical asymptote at π‘₯=5. The curve does not cross the line π‘₯=5, so the function cannot take π‘₯=5 as an input.

We can also see this if we try to directly evaluate 𝑓(5). Substituting π‘₯=5 into our function gives 𝑓(5)=βˆ’15βˆ’5𝑓(5)=βˆ’10.

Since π‘₯=5 produces a zero in the denominator of this rational function, π‘₯=5 is not part of the domain. Therefore, π‘₯ can be equal to all values except 5 and thedomainofis𝑓(π‘₯)β„βˆ’{5}.

We can also use horizontal lines to help identify the range of a given function. If a horizontal line does not intersect the curve, then this value is not in the range of the function. This function has a horizontal asymptote at 𝑦=0. The curve approaches the line 𝑦=0 but never intersects it, so 0 cannot be in the range of 𝑓.

By examining the graph, we can see that any other horizontal line not at 𝑦=0 would intersect the curve of our function. Therefore, therangeofis𝑓(π‘₯)β„βˆ’{0}.

In our final example, we will see the graph of a piecewise function and identify its domain and range from information in the graph.

Example 5: Determining the Domain and Range of a Piecewise Function

Determine the domain of the following function.

Answer

We have been given the graph of a piecewise function and asked to find its domain. Recall that the domain of a function is the set of all input values for that function which will yield a real output. A piecewise function is made up of two or more subfunctions over subdomains.

Since the first subfunction has an arrow on the left and a filled-in dot on the right as its endpoint, this subfunction has input values for the interval ]βˆ’βˆž,0]. The second subfunction begins with an empty dot on the left and continues indefinitely towards positive infinity. Therefore, this subfunction will have input values on the open interval ]0,∞[. Since this subfunction has an empty dot at π‘₯=0, it is undefined at π‘₯=0.

The domain of a piecewise function will be the union of its subdomains. Therefore, the domain of this function is ]βˆ’βˆž,0]βˆͺ]0,∞[, which is ℝ.

We could also approach this graphically. If the vertical line π‘₯=𝑐 intersects the graph of a given function, 𝑐 is part of the domain of that function. This means we can find the domain of our function by considering vertical lines. Let’s sketch a vertical line for π‘₯=0.

At first it appears that there are two intersections between π‘₯=0 and the given piecewise function. One is located at (0,4).

The other is located at (0,βˆ’4).

Only one of these coordinates creates an intersection. The coordinate (0,4) is included in this piecewise function since its dot is filled in. The point (0,βˆ’4) is excluded from this function as it is hollow. Since there is a valid intersection between the line π‘₯=0 and the graphed piecewise function, 0 is part of the domain. Furthermore, by examining the graph, we can say that any vertical line will intersect this piecewise function. Therefore, thedomainofis𝑓(π‘₯)ℝ.

From the graph, we see that there are only two output values for this function, that is, when π‘₯>0, 𝑦=βˆ’4 and when π‘₯≀0, 𝑦=4. Therefore, therangeofis𝑓(π‘₯){βˆ’4,4}.

Let’s finish by recapping some basic points.

Key Points

  • The domain of a function is the set of all input values for that function.
  • The range of a function is the set of all possible outputs for a function, given its domain.
  • The vertical line test can help us identify the domain of a function from its graph. If the vertical line π‘₯=𝑐 intersects the graph of a given function, 𝑐 is part of the domain of that function.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.