topic badge

2.02 Domain and range

Introduction

The possible inputs and outputs of a function have a special name. We'll look at the set of all x-values as what we call the domain of a function and the set of all y-values as what we call the range of a function. Understanding the domain and range of a function is an important part of what comprises the study of functions.

Domain and range

Two defining parts of any function are its domain and range.

The set of all possible input values (x-values) for a function or relation is called the domain.

A curved function graphed on a coordinate plane with an unfilled endpoint at the left most part of the function and a filled endpoint at the right most part of the function. A segment across the top of the function marks the domain with an unfilled enpoint to the left and a filled endpoint to the right

In the example shown, the domain is the interval of values -3 < x \leq 1.

Notice that -3 is not included in the domain, which is indicated by the open circle at the point \left(-3,0\right). Since 1 is included in the domain based on the inequality, we can see the closed circle at the point \left(1,0\right) that indicates inclusion.

The set of all possible output values (y-values) for a function or relation is called the range.

A curved function graphed on a coordinate plane with an unfilled endpoint at the left most part of the function and a filled endpoint at the right most part of the function. A vertical segment to the right of the function marks the range with filled endpoints at the top and bottom

In the example shown, the range is the interval of values -4 \leq y \leq 0. Notice that both endpoints are included in the range since the function reaches a height of y = 0 at the origin.

Since the lowest point on the graph, y=-4, occurs at x=-2 and x=1 it is included in the range. Although the endpoint \left(-3,0\right) has an open circle when y=0, we can see that the graph does intersect y=0 when x=0, so 0 is also included in the range as shown in the inequality.

A domain that is made up of disconnected values is said to be a discrete domain.

A four quadrant coordinate plane with seven points plotted in different quadrants. The points are located at (negative 3, 0), ( negative 54, 3),(negative 2.5, negative 1), (0, negative 3), (1.5, negtaive 2.5), (3, 0) and (3.5, 2).

A function with a discrete domain. It is only defined for distinct x-values.

The domain and range of this function are written in set notation:

\text{Domain: } \left\{-3.8, -3, -2.5, 0, 1.5, 3, 3.5\right\}

\text{Range: } \left\{-3, -2.5, -1, 0, 2, 3\right\}

A domain made up of a single connected interval of values is said to be a continuous domain. The function shown has a continuous domain. It is defined for every x-value in an interval.

A four quadrant coordinate plane plotted with a parabola, a continuous curve that opens upward. The parabola has its vertex at (0, negative 3), and passes through (negative 3, 0) and (3, 0)

The domain and range of this function can be written in interval or set-builder notation. Shown below is the set-builder notation:

\text{Domain: } \left\{x\, \vert\, -\infty < x < \infty\right\}

\text{Range: } \left\{y\, \vert\, -3 \leq y< \infty\right\}

Inequality notation is similar to set builder notation but we only include the inequalities.

\text{Domain: }-\infty < x < \infty

\text{Range: }-3 \leq y< \infty

It is possible for the domain of a function to be neither discrete nor continuous. An example of this is a step function.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

A step function is made up of pieces that are horizontal line segments or points.

A function cannot have two different y-values for the same x-value, so we use filled and unfilled points to show which step the y-value is on.

The domain and range of this function can be written in set notation, interval notation, and set-builder notation. Shown below is set and interval notation:

\text{Domain: } \left[-4,2\right) \cup \left(2,4\right)

\text{Range: } \left\{-3, 2, 4\right\}

Examples

Example 1

Consider the function shown in the graph.

-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
a

State whether the function has a discrete or continuous domain.

Worked Solution
Apply the idea

The function is defined at every value of x across an interval, so it has a continuous domain.

b

Determine the domain of the function using set-builder notation.

Worked Solution
Apply the idea

We can see that the function is defined for every x-value between -6 and 8, including -6 but not including 8.

So the domain of the function can be written as \text{Domain: } \left\{x\, \vert\, -6 \leq x < 8\right\}

Reflect and check

The domain of the function written in interval notation is

\text{Domain: } \left[-6,8\right)

The domain of the function written in inequality notation is

\text{Domain: } -6 \leq x < 8

c

Determine the range of the function using set-builder notation.

Worked Solution
Apply the idea

We can see that the function reaches every y-value between -6 and 4, including 4 but not including -6.

So the range of the function can be written as \text{Range: } \left\{y\, \vert\, -6 < y \leq 4\right\}

Reflect and check

The range of the function written in interval notation is

\text{Range: } \left(-6,4\right]

The range of the function written in inequality notation is

\text{Range: } -6 < y \leq 4

Example 2

Consider the following step function.

-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
a

Determine the domain of the function using set-builder notation.

Worked Solution
Apply the idea

We can see that the function is made up of three pieces.

The piece furthest to the left is defined for every x-value between -8 and -5, including -8 but not including -5.

The piece in the middle is defined for every x-value between -4 and -2, not including -4 or -2.

The piece furthest to the right is defined for every x-value between -2 and 6, including both points.

Because the pieces in the middle and furthest to the right have an overlap, at x=-2, we can have a single domain for the two pieces.

So the domain of the function can be written as\text{Domain: } \left\{x\,\vert\, -8\leq x < -5 \text{ or }-4\lt x \leq 6 \right\}

Reflect and check

The domain of the function written in interval notation is

\text{Domain: } \left[-8,-5\right) \cup \left(-4,6\right]

b

Determine the range of the function using set-builder notation.

Worked Solution
Apply the idea

The piece furthest to the left is defined for every x-value between -8 and -5 at y=6.

The piece in the middle is defined for every x-value between -4 and -2 at y=2.

The piece furthest to the right is defined for every x-value between -2 and 6 at y=-4.

So the range of the function can be written as\text{Range: } \{y\,\vert\, y= 6, 2, -4\}

Or rearranging the values from least to greatest \text{Range: } \{y\,\vert\, y= -4, 2, 6\}

Idea summary

Different notations help us represent discrete and continuous functions:

Set notation: \left\{1, 2, 3, 4, 5\right\}

Interval notation: \left[5, \infty\right)

Set-builder notation: \left\{x\, \vert\, -4 \leq x < 10\right\}

Inequality notation: -4 \leq x < 10

Domain and range in context

Understanding the limitations on the domain and range of a function in context are important for interpreting situations. Depending on the context, a discrete function may be appropriate for a situation or a continuous function could be better suited to the scenario. The choice of whether rational numbers or specifically integers or whole numbers should also be considered when given a real-world situation for interpretation.

Domain constraint

A limitation or restriction of the possible x-values, usually written as an equation, inequality, or in set-builder notation

Independent variable

The input of a function whose value determines the value of other variables

Dependent variable

The output of a function whose value depends on the independent variable

Examples

Example 3

Consider the relationship between the cost of a hotel stay and the length of the stay. Suppose the hotel charges \$75 per night and the stay last 7 nights.

a

State the independent and dependent variables.

Worked Solution
Apply the idea

Since the total cost of the hotel room depends on the number of nights at the hotel, the number of nights is the independent variable and the cost is the dependent variable.

b

Determine an appropriate domain and range and explain your reasoning.

Worked Solution
Create a strategy

The domain and range may be discrete or continuous, and the types of real numbers in the domain and range also need to be considered.

Apply the idea

An appropriate domain for the function would be based on the number of nights a person plans to stay at the hotel, and it makes sense for the domain to be discrete whole numbers in set notation because payment is counted in full days.

\text{Domain: } \left\{1, 2, 3, 4, 5, 6, 7 \right\}

Based on the choice for the domain, the range will also have discrete whole number values.

\text{Range: } \left\{75, 150, 225, 300, 375, 450, 525 \right\}

Reflect and check

It doesn't make sense to determine the cost of staying at the hotel for 1.5 nights for instance, because the hotel would need to be booked for 2 nights in order to stay longer than a night.

Example 4

Consider the graph of the function of a dog's weight over time:

Dog Weight
5
10
15
\text{Time (months)}
20
40
60
80
\text{Weight (pounds)}
a

Explain why the domain of this function is continuous.

Worked Solution
Create a strategy

The domain of a function is either continuous or discrete and the context of the problem gives us information about which type of domain makes the most sense.

Apply the idea

Since a dog's weight can be measured at any time, such as 4.5 months as opposed to only at each month mark based on the graph, the function is continuous.

b

State an appropriate domain and range of the function based on the information in the graph. Justify your solution.

Worked Solution
Create a strategy

Since the graph is continuous, the domain and range may be given in interval or set-builder notation.

Apply the idea

An appropriate domain for the relationship would be from 0 to around the age when the dog stops growing because the graph will eventually flatten.

\text{Domain: } \left\{x\, \vert\, 0 \leq x \leq 24\right\}

An appropriate range for the function would also begin at 0 up to the maximum weight when it stops growing. It doesn't make sense for a puppy to be born weighing 0 pounds exactly so we will exclude 0 from our interval, however, a puppy could weigh between 0 and 1 pound (think of puppies whose weight is measured in ounces). Based on the graph, the dog may grow up to 80 pounds.

\text{Range: } \left\{y\, \vert\, 0 \lt y \leq 80\right\}

Idea summary

Discrete domains apply to problems where the independent variable only includes certain values in an interval, whereas continuous domains apply to problems where the independent variable includes all values in an interval.

Outcomes

F.IF.A.1

Understand that a function from one set (called the domain) to another set (called the range) assigns to each element of the domain exactly one element of the range. If f is a function and x is an element of its domain, then f(x) denotes the output of f corresponding to the input x. The graph of f is the graph of the equation y = f(x).

F.IF.B.5

Relate the domain of a function to its graph and, where applicable, to the quantitative relationship it describes.

What is Mathspace

About Mathspace