Algebra 1 · Grades 8, 9

Domain and Range: The Inputs and Outputs of a Function

Quick answer

The domain is every input a function accepts, and the range is every output it produces. For f(x) = 2x + 1 the domain is all real numbers and so is the range. Inputs get excluded when they would divide by zero or take the square root of a negative, and real situations exclude inputs that make no sense, like a negative number of people.

What you'll learn

  • Identify the domain and range of a function from a graph, table or equation
  • Explain why some inputs must be excluded from a domain
  • Restrict a domain sensibly in a real-world situation

The two words

A function is a rule turning inputs into outputs. Those two collections have names:

TermMeansOn a graph
Domainevery input the function acceptshow far the graph spreads left to right
Rangeevery output it produceshow far it spreads up and down

For f(x)=2x+1f(x) = 2x + 1 you can put in any real number, and by choosing the input you can get any real number out. So both the domain and the range are all real numbers.

Definition

Domain = allowed xx-values. Range = resulting yy-values. Domain comes first alphabetically, and xx comes before yy — the two orders match.

Why anything gets excluded

A domain is not a decoration. It exists because some inputs would break the rule.

Division by zero. In f(x)=1x3f(x) = \tfrac{1}{x - 3}, putting in 33 gives 10\tfrac{1}{0}, which is undefined. There is no output, so 33 cannot be an input. The domain is every real number except 33.

Square roots of negatives. In f(x)=x4f(x) = \sqrt{x - 4}, an input of 22 asks for 2\sqrt{-2}, which is not a real number. So the domain is x4x \ge 4.

In both cases the exclusion is forced. You are not choosing to leave numbers out; the arithmetic refuses them.

Linear functions have neither problem — no denominators, no roots — which is why every line in this course has a domain of all real numbers unless a situation restricts it.

Reading them off a graph

Scan the graph twice.

  • Domain: sweep left to right and note which xx-values the graph occupies.
  • Range: sweep bottom to top and note which yy-values it reaches.

For a line drawn with arrows on both ends, the answer to both is “all real numbers”, because the arrows say it keeps going.

For a line segment from (1,2)(1, 2) to (5,10)(5, 10), the domain is 1x51 \le x \le 5 and the range is 2y102 \le y \le 10. The endpoints stop it.

Worked examples

Common mistakes

Practice problems

  1. Find the domain and range of f(x)=x+6f(x) = x + 6.

    Hint

    Look for denominators or square roots. If there are none, nothing is excluded.

    Answer

    Domain: all real numbers. Range: all real numbers.

    Full solution

    No denominator and no root, so every input works and the domain is all real numbers.

    Any output yy is reached by the input x=y6x = y - 6, so the range is all real numbers too.

  2. Find the domain and range of f(x)=2f(x) = -2.

    Answer

    Domain: all real numbers. Range: {2}\{-2\}.

    Full solution

    Every input is allowed, but the output never changes, so the range is the single value 2-2.

  3. Find the domain of f(x)=4x+2f(x) = \tfrac{4}{x + 2}.

    Hint

    Which input makes the denominator zero?

    Answer

    All real numbers except 2-2.

    Full solution

    Set x+2=0x + 2 = 0, giving x=2x = -2. That input would produce 40\tfrac{4}{0}, which is undefined, so it is excluded.

  4. Find the domain of f(x)=x+1f(x) = \sqrt{x + 1}.

    Answer

    x1x \ge -1

    Full solution

    The expression under the root must be at or above zero: x+10x + 1 \ge 0, so x1x \ge -1.

  5. Find the domain and range of the table below.

    xx224466
    yy555599
    Answer

    Domain: {2,4,6}\{2, 4, 6\}. Range: {5,9}\{5, 9\}.

    Full solution

    The inputs are 22, 44 and 66. The outputs are 55, 55 and 99, and since a range is a set, the repeated 55 is written once.

  6. A line segment runs from (0,3)(0, 3) to (4,11)(4, 11). Find its domain and range.

    Hint

    A segment stops at its endpoints.

    Answer

    Domain: 0x40 \le x \le 4. Range: 3y113 \le y \le 11.

    Full solution

    The segment spreads from x=0x = 0 to x=4x = 4, and from y=3y = 3 to y=11y = 11. Both endpoints are included, so both use \le.

  7. Find the domain of f(x)=x+1x29f(x) = \tfrac{x + 1}{x^2 - 9}.

    Hint

    Factor the denominator before setting it to zero.

    Answer

    All real numbers except 33 and 3-3.

    Full solution

    Set x29=0x^2 - 9 = 0. Factoring as a difference of squares gives (x3)(x+3)=0(x - 3)(x + 3) = 0, so x=3x = 3 or x=3x = -3.

    Both inputs make the denominator zero, so both are excluded.

  8. A school orders pizzas for a party. Each pizza feeds 66 students, so the number of pizzas needed for xx students is P(x)=x6P(x) = \tfrac{x}{6}. Discuss the sensible domain and range.

    Hint

    Think about what the inputs and outputs count, and whether fractions make sense for each.

    Answer

    Domain: whole numbers 0,1,2,0, 1, 2, \ldots. Range in practice: whole numbers, after rounding up.

    Full solution

    The input counts students, so it must be a whole number and cannot be negative: the domain is {0,1,2,}\{0, 1, 2, \ldots\}.

    The formula’s outputs are often fractional — 2020 students gives 2063.33\tfrac{20}{6} \approx 3.33 pizzas — but you cannot order a third of a pizza. In practice you round up to 44, so the useful range is also whole numbers.

    This is a case where the mathematics and the situation disagree, and the situation wins.

Frequently asked questions

Which one is which?

Domain is the inputs, the x-values you are allowed to put in. Range is the outputs, the y-values that come out. Alphabetical order helps: domain before range, x before y.

When is the domain not all real numbers?

Two situations in algebra. A fraction cannot have zero on the bottom, so any input making the denominator zero is excluded. A square root of a negative is not a real number, so inputs under a root must keep it at or above zero.

Why would a real problem have a smaller domain than the equation?

Because the equation does not know what it is describing. A cost formula happily accepts minus three items; the situation does not. Restricting the domain is how you say which inputs actually mean something.

What to learn next

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSF.IF.A.1Interpreting FunctionsUnderstand 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).
  • CCSS.MATH.CONTENT.HSF.IF.A.2Interpreting FunctionsUse function notation, evaluate functions for inputs in their domains, and interpret statements that use function notation in terms of a context.