Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 38 ยท Functions and Transformations

Domain and Range

Find the domain and range of functions from equations and graphs, handle division by zero and even roots, and write answers in interval notation.

Every function has a set of allowed inputs and a set of outputs it actually produces. The first is the domain and the second is the range. Knowing them tells you where a formula makes sense and what values it can reach.

If f(x) = 1/x, you cannot put in x = 0, because division by zero is undefined. The domain is every real number except 0. And you can never get the output 0 from 1/x, because no fraction with numerator 1 equals zero. So the range is also every real number except 0.

Definitions

  • The domain is the set of all inputs for which the function is defined.
  • The range is the set of all outputs the function takes.

Unless a problem says otherwise, the domain of a formula is the largest set of real numbers for which it gives a real value.

Finding the domain from an equation

Look for the two classic trouble spots.

  1. Division by zero. Exclude any x that makes a denominator zero.
  2. Even roots of negatives. Square roots (and fourth roots, and so on) need a non-negative inside.

Polynomials such as 3xยฒ - 5 have no trouble spots: the domain is all real numbers, (-โˆž, โˆž).

Example 1. f(x) = 5/(x - 3). The denominator is zero when x = 3. Domain: all real numbers except 3, written (-โˆž, 3) โˆช (3, โˆž).

Example 2. g(x) = โˆš(2x - 6). Need 2x - 6 โ‰ฅ 0, so x โ‰ฅ 3. Domain: [3, โˆž).

Example 3. h(x) = โˆš(x + 4) / (x - 1). Need x + 4 โ‰ฅ 0 (so x โ‰ฅ -4) and x โ‰  1. Domain: [-4, 1) โˆช (1, โˆž).

Python Probe the domain numerically

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

This only tests sample points, so it can suggest a domain but not prove it. Use algebra for the final answer.

Finding the range

The range is harder; there is no single recipe. Useful strategies:

  • Use the graph. Read off the lowest and highest y values reached.
  • Use known shapes. xยฒ has range [0, โˆž). โˆšx has range [0, โˆž). A line with nonzero slope has range all reals.
  • Complete the square for quadratics (chapter 3).
  • Solve for x in terms of y and see which y values give a valid x.

Example 4. f(x) = xยฒ + 2. Since xยฒ โ‰ฅ 0, we have f(x) โ‰ฅ 2, and 2 is reached at x = 0. Range: [2, โˆž).

Example 5. g(x) = -|x| + 4. The absolute value is at least 0, so -|x| is at most 0 and g(x) โ‰ค 4. Range: (-โˆž, 4].

Example 6. h(x) = โˆšx - 1. Since โˆšx โ‰ฅ 0, h(x) โ‰ฅ -1. Range: [-1, โˆž).

Reading a graph

On a graph, the domain is the set of x values covered (left to right) and the range is the set of y values covered (bottom to top). An open circle at an endpoint means the value is excluded; a filled circle means it is included. An arrow means the graph continues forever.

flowchart TD
    G["Graph of a function"] --> D["Domain: sweep left to right<br/>which x values appear?"]
    G --> R["Range: sweep bottom to top<br/>which y values appear?"]

Domain is the horizontal extent; range is the vertical extent.

Restricted domains in context

Real situations often limit the domain. A model A(r) = ฯ€rยฒ for the area of a circle works for r โ‰ฅ 0 only, and a ball thrown up is above ground only for a certain time interval. When a function models something, restrict the domain to values that make sense, even if the formula would accept others.

Python Sample the range of a function

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The numerical minimum and maximum over a finite interval only show the pattern. For xยฒ + 2, the sampled maximum grows as you widen the interval, which matches the range [2, โˆž).

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the domain of f(x) = 1/(x + 2)?

    The denominator is zero when x = -2, so that input is excluded.
  2. 2. What is the domain of g(x) = โˆš(x - 5)?

    We need x - 5 โ‰ฅ 0, so x โ‰ฅ 5, and 5 itself is allowed.
  3. 3. What is the range of y = xยฒ - 3?

    xยฒ is at least 0, so y is at least -3, and -3 is reached at x = 0.
  4. 4. On a graph, the range is found by looking at

    The range is the set of outputs, which are the y values.

Summary

  • The domain is the set of allowed inputs; the range is the set of outputs produced.
  • Exclude values that cause division by zero or an even root of a negative.
  • Polynomials have domain (-โˆž, โˆž).
  • Find the range from the graph, known shapes or by completing the square.
  • Real-world models often restrict the domain further.

Next: Transformations of Graphs