topic badge

2.02 Domain and range

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 \lt x \leq 1. Domain could also be represented using interval notation as \left(-3,1\right].

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. Range could also be represented using interval notation as \left[-4,0\right].

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 notation. Shown below is the set notation:

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

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

Written in interval notation, we have:

\text{Domain: } \left(-\infty, \infty\right)

\text{Range: } \left[-3 , \infty\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 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 \lt 8\right\}

Reflect and check

The domain of the function written in inequality notation is

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

c

Determine the range of the function using set 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 \lt y \leq 4\right\}

Reflect and check

The range of the function written in inequality notation is

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

Example 2

Consider the function shown in the graph.

-1
1
2
3
x
-3
-2
-1
1
2
3
4
5
y
a

Determine the domain of the function using interval notation.

Worked Solution
Apply the idea

We can see that the function is defined for every x-value between negative infinity and positive infinity.

So the domain of the function can be written as\text{Domain: }\left(-\infty, \infty\right)

Reflect and check

The domain could have been written in inequality notation as: \text{Domain: }-\infty \lt x \lt \infty

This domain is also referred to as the set of all real numbers.

b

Determine the range of the function using interval notation.

Worked Solution
Apply the idea

We can see that the function is defined for every y-value between, and including, -2, to positive infinity.

\text{Range: }\left[-2, \infty\right)

Reflect and check

The range could have also been written using inequality notation: \text{Range: }y \geq -2

Idea summary

Different notations help us represent discrete and continuous functions:

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

Set notation (continous): \left\{x\, \vert\, -4 \leq x \lt 10\right\}

Inequality notation: -4 \leq x \lt 10

Interval notation: \left(-5, 6\right]

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 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 lasts 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

Determine if this graph represents a function.

Worked Solution
Create a strategy

The graph of a relation represents a function if it passes the vertical line test.

Apply the idea

While the graph appears almost vertical close to the y-axis, it still passes the vertical line test.

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

Since it passes the vertical line test, the graph is a function.

b

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.

c

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 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

A.F.1

The student will investigate, analyze, and compare linear functions algebraically and graphically, and model linear relationships.

A.F.1a

Determine and identify the domain, range, zeros, slope, and intercepts of a linear function, presented algebraically or graphically, including the interpretation of these characteristics in contextual situations.

A.F.2

The student will investigate, analyze, and compare characteristics of functions, including quadratic and exponential functions, and model quadratic and exponential relationships.

A.F.2a

Determine whether a relation, represented by a set of ordered pairs, a table, a mapping, or a graph is a function; for relations that are functions, determine the domain and range.

A.F.2b

Given an equation or graph, determine key characteristics of a quadratic function including x-intercepts (zeros), y-intercept, vertex (maximum or minimum), and domain and range (including when restricted by context); interpret key characteristics as related to contextual situations, where applicable.

What is Mathspace

About Mathspace