Math Core

Lesson 4.3 · Introduction to Functions

Domain and range

Every function has limits on what you can put in and what can come out. You can't rent a bike for −2-2 hours, and you can't take the square root of −9-9 in the real numbers. The domain and range describe these limits exactly.

Domain and range

Definition

Domain and range

The domain of a function is the set of all allowed inputs (xx-values). The range is the set of all outputs (yy-values) the function actually produces.

For a function given as a list of ordered pairs or a table, you simply collect the numbers. For {(2,7),(−1,3),(4,7),(0,−5)}\{(2, 7), (-1, 3), (4, 7), (0, -5)\}:

  • Domain: {−1,0,2,4}\{-1, 0, 2, 4\}
  • Range: {−5,3,7}\{-5, 3, 7\}

When a function has infinitely many inputs, like one given by a graph or an equation, you can't list them. Instead you describe them with an inequality, such as −3≤x≤4-3 \le x \le 4 or y≥0y \ge 0, or with the words all real numbers.

Reading domain and range from a graph

The domain is how far the graph reaches left to right. The range is how far it reaches bottom to top.

From a graph

  • Domain: squash the graph flat onto the xx-axis. The shadow it makes is the domain.
  • Range: squash the graph flat onto the yy-axis. The shadow it makes is the range.

A solid dot at an endpoint means that point is included, so the inequality uses ≤\le or ≥\ge. An arrow means the graph keeps going forever in that direction.

Worked example: A graph with endpoints

Find the domain and range of the function graphed below.

A line segment from (−3, −4) to (4, 3), with both endpoints included.Open in grapher →

The graph starts at x=−3x = -3 and ends at x=4x = 4, including both endpoints. Its lowest point has y=−4y = -4 and its highest has y=3y = 3.

  • Domain: −3≤x≤4-3 \le x \le 4
  • Range: −4≤y≤3-4 \le y \le 3

The range is not always found by plugging in the endpoints. Look for the highest and lowest points anywhere on the graph.

Worked example: The highest point is in the middle

Find the domain and range of the function graphed below.

A curve from (−1, −1) up to a peak at (1, 3) and down to (4, −6).Open in grapher →

The graph runs from x=−1x = -1 to x=4x = 4, so the domain is −1≤x≤4-1 \le x \le 4.

For the range, the lowest point is the right endpoint, y=−6y = -6. But the highest point is the peak at y=3y = 3, not either endpoint. So the range is −6≤y≤3-6 \le y \le 3.

Worked example: A graph that goes on forever

Find the domain and range of f(x)=x2−4f(x) = x^2 - 4.

The parabola y = x² − 4 extends forever to the left, to the right and upward.Open in grapher →

The arms of the parabola keep spreading left and right forever, so every xx is allowed: the domain is all real numbers. The graph never goes lower than its bottom point (0,−4)(0, -4) but rises forever, so the range is y≥−4y \ge -4.

Domain and range from an equation

For most equations in Algebra 1, you can substitute any real number, so the domain is all real numbers. There are two situations to watch for.

  1. Division by zero. A denominator can never equal 00. For g(x)=8x−6g(x) = \dfrac{8}{x - 6}, the input x=6x = 6 makes the denominator 00, so 66 is not in the domain. The domain is all real numbers except 66, written x≠6x \ne 6.
  2. Square roots of negatives. In the real numbers, the number under a square root can't be negative. For h(x)=x−2h(x) = \sqrt{x - 2}, you need x−2≥0x - 2 \ge 0, so the domain is x≥2x \ge 2.
y = √(x − 2) starts at (2, 0) and rises slowly to the right. Domain x ≥ 2, range y ≥ 0.Open in grapher →

A square root is never negative, so the range of hh is y≥0y \ge 0.

Common mistake

Don't mix up the two sets. The domain is always about xx (inputs) and the range is always about yy (outputs). For h(x)=x−2h(x) = \sqrt{x - 2}, the domain is x≥2x \ge 2 and the range is y≥0y \ge 0. Writing the range as "x≥0x \ge 0" uses the wrong variable and describes the wrong thing.

Domain in a real situation

When a function models something real, the situation limits the domain even if the equation doesn't. The domain that makes sense is called the reasonable domain.

A function is discrete if its inputs are separate values, like whole numbers of people. Its graph is a set of dots. A function is continuous if its inputs fill a whole interval, like time or distance. Its graph is an unbroken curve.

Worked example: Discrete or continuous?

  1. A theater has 200200 seats and sells tickets for $12 each. The revenue is R(n)=12nR(n) = 12n dollars for nn tickets sold. Find the reasonable domain and range.
  2. A 500500-gallon tank drains at 2525 gallons per minute. The amount left is V(t)=500−25tV(t) = 500 - 25t gallons after tt minutes. Find the reasonable domain and range.

Solutions.

  1. You can only sell whole tickets, from 00 up to 200200. The domain is the whole numbers 0≤n≤2000 \le n \le 200, so the function is discrete. The range is 0,12,24,…,24000, 12, 24, \ldots, 2400, since R(200)=2400R(200) = 2400.
  2. Time is continuous. The tank starts full at t=0t = 0 and is empty when 500−25t=0500 - 25t = 0, which is t=20t = 20. The domain is 0≤t≤200 \le t \le 20 and the range is 0≤V≤5000 \le V \le 500.

Tip

To find a reasonable domain, ask: where does the situation start, where does it stop, and can the input be a fraction? The answers give the endpoints and tell you whether the graph is dots or a solid curve.

Practice

Practice 1

List the domain of {(2,7),(−1,3),(4,7),(0,−5)}\{(2, 7), (-1, 3), (4, 7), (0, -5)\}.

Separate answers with commas, e.g. 2, -5

Practice 2

What is the domain of the function graphed below?

A line segment from (−2, −3) to (3, 7), both endpoints included.Open in grapher →
Practice 3

What is the range of the same function?

Practice 4

Find the range of f(x)=(x+2)2−5f(x) = (x + 2)^2 - 5, graphed below. Write your answer as an inequality in yy.

The parabola y = (x + 2)² − 5.Open in grapher →

Enter an inequality, e.g. x >= 4, -2 < x <= 3, or x < 1 or x > 5

Practice 5

Find the domain of f(x)=x+5f(x) = \sqrt{x + 5}. Write your answer as an inequality in xx.

Enter an inequality, e.g. x >= 4, -2 < x <= 3, or x < 1 or x > 5

Practice 6

Which real number is not in the domain of g(x)=8x−6g(x) = \dfrac{8}{x - 6}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

The graph below shows y=f(x)y = f(x) for −4≤x≤3-4 \le x \le 3. What is its range?

A tent-shaped graph from (−4, 1) up to (−1, 4) and down to (3, 0), endpoints included.Open in grapher →
Practice 8

A school bus has 4848 seats. The number of empty seats when ss students are on board is E(s)=48−sE(s) = 48 - s. Which is the reasonable domain?