Domain and Range

Learning goals

  • Express domains and ranges using intervals and set notation
  • Combine algebraic restrictions without losing excluded inputs
  • Read domains and ranges from graphs and piecewise rules
  • Justify a range using the formula and its specified domain
  • Distinguish a formula's natural domain from the feasible inputs of a model

Writing the inputs and outputs

The domain is the set of allowed inputs. The range is the set of outputs the function actually produces from that domain. A formula alone may not tell you which inputs were intended.

For example, a function pairs the inputs −2-2, 11, and 44 with the outputs 44, 11, and 1616. Its domain is {−2,1,4}\{-2,1,4\} and its range is {1,4,16}\{1,4,16\}. Braces list the members of a set. There are no inputs between the listed ones unless the definition includes them.

An interval includes every real number between its bounds. The interval (−3,5](-3,5] includes 00 and 4.94.9, excludes −3-3, and includes 55. A parenthesis excludes a finite endpoint; a square bracket includes it. An open dot on a number line excludes an endpoint, and a filled dot includes it.

Worked example 1 Three ways to describe the same set

Problem. A function allows every real input greater than −3-3 and no greater than 55.

Part A: Write its domain as an inequality.

Part B: Write it in interval notation.

Part C: Write it in set-builder notation.

Solution. Part A: The two conditions must hold together:

−3<x≤5.-3<x\le5.

Part B: The domain is (−3,5](-3,5] in interval notation.

Part C: In set-builder notation, we describe the members by a condition:

{x∈R:−3<x≤5}.\{x\in\mathbb R:-3<x\le5\}.

Read this as “the real numbers xx such that −3<x≤5-3<x\le5.” The symbol R\mathbb R means the real numbers.

The interval from -3 excluded to 5 included, drawn with an open left endpoint and a filled right endpoint.The interval from -3 excluded to 5 included, drawn with an open left endpoint and a filled right endpoint.-35x
The open dot excludes -3; the filled dot includes 5. Every input between them belongs.

The symbol ∪\cup means union: include the numbers in either set. For example, (−∞,−1)∪[2,∞)(-\infty,-1)\cup[2,\infty) describes inputs below −1-1 or at least 22. Infinity is not an endpoint you can include, so use parentheses beside ∞\infty and −∞-\infty. All real numbers form (−∞,∞)(-\infty,\infty).

A single value is written with braces, such as {6}\{6\}. An empty set, with no values, is written ∅\varnothing. Use a finite list for a finite set, intervals for continuous stretches, and unions when there are gaps. The word “and” in restrictions means take their overlap, called their intersection.

Check your understanding

Which notation represents all real numbers at least −5-5 and less than 22?

Answer choices

Every restriction must hold

Unless a domain is specified, a formula’s natural real domain consists of all real inputs for which its calculation gives a real output. Here all functions are real-valued.

A denominator cannot be zero. For r(x)=1/(x+6)r(x)=1/(x+6), the input −6-6 would require division by zero, while every other real input is allowed. Thus its domain is (−∞,−6)∪(−6,∞)(-\infty,-6)\cup(-6,\infty).

The expression inside an even root, called its radicand, must be nonnegative. For s(x)=x−7s(x)=\sqrt{x-7}, the input 1111 works because 4=2\sqrt{4}=2, while 33 would require a real square root of −4-4. Therefore x−7≥0x-7\ge0, giving the domain [7,∞)[7,\infty). Zero is allowed: 0=0\sqrt0=0. Odd roots do not have this sign restriction; for example, −83=−2\sqrt[3]{-8}=-2.

When an even root is in a denominator, it must also be nonzero. The domain of 1/x−71/\sqrt{x-7} is consequently (7,∞)(7,\infty).

Worked example 2 Combine a root condition with an exclusion

Problem. Consider the function

f(x)=11−xx−4.f(x)=\frac{\sqrt{11-x}}{x-4}.

Part A: Find its natural real domain.

Part B: Decide whether 44 is an allowed input.

Part C: Decide whether 1111 is an allowed input.

Solution. Part A: The square root requires 11−x≥011-x\ge0, so x≤11x\le11. The denominator requires x−4≠0x-4\ne0, so x≠4x\ne4.

An allowed input must pass both tests. Keep the numbers at most 1111, then remove 44:

(−∞,4)∪(4,11].(-\infty,4)\cup(4,11].

Part B: At x=4x=4, the denominator is zero, so the function is undefined.

Part C: At x=11x=11, the numerator is zero and the denominator is 77, so f(11)=0f(11)=0 is valid.

All inputs to the left of or equal to 11, except 4. The highlighted set continues to the left.All inputs to the left of or equal to 11, except 4. The highlighted set continues to the left.411x
The root sets the right boundary at 11; the denominator removes the interior input 4. The domain continues leftward.

Keep restrictions from the original formula when you simplify. For example,

x2−25x−5=x+5(x≠5).\frac{x^2-25}{x-5}=x+5\qquad(x\ne5).

Cancellation used division by x−5x-5, which requires x≠5x\ne5. The original function still excludes 55, even though the simpler expression could be evaluated there.

Check your understanding

What is the natural real domain of h(x)=1/9−3xh(x)=1/\sqrt{9-3x}?

Answer choices

Reading a graph or a piecewise rule

On a graph, a domain value is an xx-coordinate used by at least one point. A range value is a yy-coordinate used by at least one point. Look across for inputs and up and down for outputs, including any gaps. A drawing’s window edge is not automatically the end of the function: use the stated domain, endpoints, and continuation arrows.

For a piecewise rule, use each formula only on the inputs assigned to it. Collect those inputs to get the domain. Work out each piece’s outputs, then combine them to get the range.

Worked example 3 A graph with a jump

Problem. The function below has exactly the two pieces shown.

Part A: Find its domain.

Part B: Find its range.

Part C: Decide whether 33 is in its range.

Part D: Decide whether 55 is in its range.

p(x)={2x+1,−2≤x<1,5,1≤x≤3.p(x)= \begin{cases} 2x+1,&-2\le x<1,\\ 5,&1\le x\le3. \end{cases}
Complete graph: a segment from filled (-2,-3) to open (1,3), and a horizontal segment from filled (1,5) to filled (3,5).Complete graph: a segment from filled (-2,-3) to open (1,3), and a horizontal segment from filled (1,5) to filled (3,5).-213-335xy
Read each piece on its assigned inputs. The isolated height 5 does not fill the gap above the sloping piece.

Solution. Part A: The first piece uses [−2,1)[-2,1), and the second uses [1,3][1,3]. Together they cover every input from −2-2 through 33, including both ends. The domain is [−2,3][-2,3].

Part B: For the first piece, p(−2)=−3p(-2)=-3. As xx increases toward 11, the outputs increase toward 33, but do not reach it: the condition excludes x=1x=1 from this piece. Its outputs are [−3,3)[-3,3).

The second piece always produces 55. It adds just {5}\{5\}, not an interval of heights. Therefore the range is

[−3,3)∪{5}.[-3,3)\cup\{5\}.

Part C: The value 33 is not an output of either piece.

Part D: The value 55 is an output of the second. The range does not fill the gap between them.

An open circle removes one point, not necessarily a whole output value. If another point has the same height, that height still belongs to the range. Likewise, a different filled point with the same xx-coordinate can keep that input in the domain.

Check your understanding

A graph consists of the segment y=xy=x for 0<x<20<x<2 and the single point (3,2)(3,2). Which domain and range are correct?

Answer choices

Justifying a range from a formula

The domain tells you which substitutions to consider. For example, x2x^2 produces every nonnegative real number when xx runs through all real numbers. If you restrict xx to [2,4][2,4], its outputs instead run from 44 to 1616. Changing the allowed inputs can change the range.

To justify a proposed range, check both parts: no allowed input produces anything outside it, and every value inside it is actually produced. A few table entries alone cannot establish the whole range.

Worked example 4 The lowest output occurs inside the domain

Problem. Let q(x)=(x−2)2+3q(x)=(x-2)^2+3 have domain [−1,4][-1,4].

Part A: Find its range.

Part B: Give inputs producing its smallest and largest outputs.

Solution. Part A: On this domain, x−2x-2 runs from −3-3 to 22. Its square can be 00, at x=2x=2, and cannot exceed 99, reached at x=−1x=-1. Adding 33 gives the bounds 33 and 1212.

The graph of (x minus 2) squared plus 3, restricted to inputs from -1 to 4, includes its minimum (2,3) and endpoints (-1,12) and (4,7).The graph of (x minus 2) squared plus 3, restricted to inputs from -1 to 4, includes its minimum (2,3) and endpoints (-1,12) and (4,7).-1243712xy
Both endpoint values and the interior low point matter. The entire stated domain is shown.

Every height between those bounds is attained. For any yy between 33 and 1212, the number y−3\sqrt{y-3} lies between 00 and 33. Choose

x=2−y−3.x=2-\sqrt{y-3}.

This input lies in [−1,2][-1,2], within the stated domain, and substitution gives q(x)=yq(x)=y. Thus the range is [3,12][3,12].

Part B: Its smallest output is q(2)=3q(2)=3; its largest is q(−1)=12q(-1)=12.

Checking only the endpoints would give q(−1)=12q(-1)=12 and q(4)=7q(4)=7, missing the minimum at the interior input 22.

Check your understanding

The function r(x)=x2+2r(x)=x^2+2 has domain (−2,1](-2,1]. What is its range?

Answer choices

A formula can outlive its model

A contextual domain must respect the meaning of the quantities as well as the algebra. Counts may allow only whole numbers. A physical length may need to be positive. A stated operating interval may exclude otherwise valid inputs.

Worked example 5 Cutting a box from a sheet

Problem. A rectangular sheet measures 2424 centimeters by 1616 centimeters. Cut out a square of side ss centimeters from each corner and fold up the sides to make an open box with positive height, length, and width.

Part A: Write the volume formula and find its natural real domain.

Part B: Find the feasible domain for this box and compare it with the natural domain.

Box net on a 24 cm by 16 cm sheet. Four dashed corner squares each have side s. Fold lines enclose a base of length 24 minus 2s and width 16 minus 2s.Box net on a 24 cm by 16 cm sheet. Four dashed corner squares each have side s. Fold lines enclose a base of length 24 minus 2s and width 16 minus 2s.24 cm16 cmsbase length 24 - 2sbase width 16 - 2sFold each strip of width s upward.
The dashed corner squares are removed. Dashed interior lines show where the remaining strips fold upward.

Solution. Part A: The height is ss, the base length is 24−2s24-2s, and the base width is 16−2s16-2s. Its volume formula is

V(s)=s(24−2s)(16−2s).V(s)=s(24-2s)(16-2s).

This polynomial can be evaluated for every real ss, so its natural real domain is R\mathbb R.

Part B: For a physical box, all three dimensions must be positive:

s>0,24−2s>0,16−2s>0.\begin{aligned} s&>0,\\ 24-2s&>0,\\ 16-2s&>0. \end{aligned}

Together these give 0<s<80<s<8, so the feasible domain is (0,8)(0,8), with ss measured in centimeters. At 00 there is no height; at 88 there is no base width.

Even a positive calculated volume is not enough. At s=13s=13, the formula gives 260260 cubic centimeters, but both base dimensions are negative. That number does not describe a box made from this sheet.

Check your understanding

A 2626 cm by 1818 cm sheet is cut and folded in the same way, with all box dimensions positive. What is the feasible domain of the corner-cut side length ss, in centimeters?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

Could the same function belong to two supposedly different kinds? Earlier mathematicians sometimes classified functions by whether they used one formula or several. In 1844, Augustin-Louis Cauchy pointed to a simple problem with that distinction.

Take the rule that gives xx for nonnegative inputs and −x-x for negative inputs. It has two written cases. Yet the single expression x2\sqrt{x^2} gives exactly the same outputs for every real input. What looked like two different classes depended on how someone chose to write the rule.

This was one episode in a longer debate about functions and their representations. The MacTutor history of the function concept describes Cauchy’s example and the changing definitions around it.

Your progress

See all your progress →