Skip to content
Domain and Range

Domain and Range

By the end of this section, you will be able to: find the domain of a function defined by an equation, and graph piecewise-defined functions.

Horror and thriller movies are both popular and, very often, extremely profitable. When big-budget actors, shooting locations, and special effects are included, however, studios count on even more viewership to be successful. Consider five major thriller/horror entries from the early 2000s—I am Legend, Hannibal, The Ring, The Grudge, and The Conjuring. The two graphs below show the amount, in dollars, each of those movies grossed when they were released as well as the ticket sales for horror movies in general by year. Notice that we can use the data to create a function of the amount each movie earned or the total ticket sales for all horror movies by year. In creating various functions using the data, we can identify different independent and dependent variables, and we can analyze the data and the functions to determine the domain and range. In this section, we will investigate methods for determining the domain and range of functions such as these.

Top-Five Grossing Horror Moviesfor years 2000–2013050100150200250300350I amLegend(2007)Hannibal(2001)TheRing(2002)TheGrudge(2004)TheConjuring(2013)Inflation-adjusted Gross,in Millions of Dollars
Market Share of Horror Movies,by Year0%1%2%3%4%5%6%7%8%20002001200220032004200520062007200820092010201120122013

Based on data compiled by www.the-numbers.com.

Finding the domain of a function defined by an equation

In Functions and Function Notation, we were introduced to the concepts of domain and range. In this section, we will practice determining domains and ranges for specific functions. Keep in mind that, in determining domains and ranges, we need to consider what is physically possible or meaningful in real-world examples, such as tickets sales and year in the horror movie example above. We also need to consider what is mathematically permitted. For example, we cannot include any input value that leads us to take an even root of a negative number if the domain and range consist of real numbers. Or in a function expressed as a formula, we cannot include any input value in the domain that would lead us to divide by 0.

We can visualize the domain as a “holding area” that contains “raw materials” for a “function machine” and the range as another “holding area” for the machine’s products.

DomainRangeFunctionmachineabcxyz

We can write the domain and range in interval notation, which uses values within brackets to describe a set of numbers. In interval notation, we use a square bracket [ when the set includes the endpoint and a parenthesis ( to indicate that the endpoint is either not included or the interval is unbounded. For example, if a person has $100 to spend, they would need to express the interval that is more than 0 and less than or equal to 100 and write (0,100](0,100]. We will discuss interval notation in greater detail later.

Let’s turn our attention to finding the domain of a function whose equation is provided. Oftentimes, finding the domain of such functions involves remembering three different forms. First, if the function has no denominator or an odd root, consider whether the domain could be all real numbers. Second, if there is a denominator in the function’s equation, exclude values in the domain that force the denominator to be zero. Third, if there is an even root, consider excluding values that would make the radicand negative.

Before we begin, let us review the conventions of interval notation:

  • The smallest term from the interval is written first.
  • The largest term in the interval is written second, following a comma.
  • Parentheses, ( or ), are used to signify that an endpoint is not included, called exclusive.
  • Brackets, [ or ], are used to indicate that an endpoint is included, called inclusive.

The table below summarizes interval notation.

InequalityInterval notationDescription
x>ax>a(a,)(a,\infty)xx is greater than aa
x<ax<a(,a)(-\infty,a)xx is less than aa
xax\ge a[a,)[a,\infty)xx is greater than or equal to aa
xax\le a(,a](-\infty,a]xx is less than or equal to aa
a<x<ba<x<b(a,b)(a,b)xx is strictly between aa and bb
ax<ba\le x<b[a,b)[a,b)xx is between aa and bb, to include aa
a<xba<x\le b(a,b](a,b]xx is between aa and bb, to include bb
axba\le x\le b[a,b][a,b]xx is between aa and bb, to include aa and bb

Example. Find the domain of the following function: {(2,10),(3,10),(4,20),(5,30),(6,40)}\{(2,10),(3,10),(4,20),(5,30),(6,40)\}.

Solution. First identify the input values. The input value is the first coordinate in an ordered pair. There are no restrictions, as the ordered pairs are simply listed. The domain is the set of the first coordinates of the ordered pairs.

{2,3,4,5,6}\{2,3,4,5,6\}

Find the domain of the function {(5,4),(0,0),(5,4),(10,8),(15,12)}\{(-5,4),(0,0),(5,-4),(10,-8),(15,-12)\}.

How to: given a function written in equation form, find the domain.

  1. Identify the input values.
  2. Identify any restrictions on the input and exclude those values from the domain.
  3. Write the domain in interval form, if possible.

Example. Find the domain of the function f(x)=x21f(x)=x^2-1.

Solution. The input value, shown by the variable xx in the equation, is squared and then the result is lowered by one. Any real number may be squared and then be lowered by one, so there are no restrictions on the domain of this function. The domain is the set of real numbers.

In interval form, the domain of ff is (,)(-\infty,\infty).

Find the domain of the function f(x)=5x+x3f(x)=5-x+x^3.

How to: given a function written in an equation form that includes a fraction, find the domain.

  1. Identify the input values.
  2. Identify any restrictions on the input. If there is a denominator in the function’s formula, set the denominator equal to zero and solve for xx. If the function’s formula contains an even root, set the radicand greater than or equal to 0, and then solve.
  3. Write the domain in interval form, making sure to exclude any restricted values from the domain.

Example. Find the domain of the function f(x)=x+12xf(x)=\tfrac{x+1}{2-x}.

Solution. When there is a denominator, we want to include only values of the input that do not force the denominator to be zero. So, we will set the denominator equal to 0 and solve for xx.

2x=0x=2x=2 \begin{array}{lrcl} & 2-x &=& 0 \\[4pt] & -x &=& -2 \\[4pt] & x &=& 2 \end{array}

Now, we will exclude 2 from the domain. The answers are all real numbers where x<2x<2 or x>2x>2. We can use a symbol known as the union, \cup, to combine the two sets. In interval notation, we write the solution: (,2)(2,)(-\infty,2)\cup(2,\infty).

−3−2−10123

In interval form, the domain of ff is (,2)(2,)(-\infty,2)\cup(2,\infty).

Find the domain of the function f(x)=1+4x2x1f(x)=\tfrac{1+4x}{2x-1}.

How to: given a function written in equation form including an even root, find the domain.

  1. Identify the input values.
  2. Since there is an even root, exclude any real numbers that result in a negative number in the radicand. Set the radicand greater than or equal to zero and solve for xx.
  3. The solution(s) are the domain of the function. If possible, write the answer in interval form.

Example. Find the domain of the function f(x)=7xf(x)=\sqrt{7-x}.

Solution. When there is an even root in the formula, we exclude any real numbers that result in a negative number in the radicand.

Set the radicand greater than or equal to zero and solve for xx.

7x0x7x7 \begin{array}{lrcl} & 7-x &\ge& 0 \\[4pt] & -x &\ge& -7 \\[4pt] & x &\le& 7 \end{array}

Now, we will exclude any number greater than 7 from the domain. The answers are all real numbers less than or equal to 77, or (,7](-\infty,7].

Find the domain of the function f(x)=5+2xf(x)=\sqrt{5+2x}.

Q&A. Can there be functions in which the domain and range do not intersect at all?

Yes. For example, the function f(x)=1xf(x)=-\tfrac{1}{\sqrt{x}} has the set of all positive real numbers as its domain but the set of all negative real numbers as its range. As a more extreme example, a function’s inputs and outputs can be completely different categories (for example, names of weekdays as inputs and numbers as outputs, as on an attendance chart); in such cases the domain and range have no elements in common.

Using notations to specify domain and range

In the previous examples, we used inequalities and lists to describe the domain of functions. We can also use inequalities, or other statements that might define sets of values or data, to describe the behavior of the variable in set-builder notation. For example, {x10x<30}\{x\mid 10\le x<30\} describes the behavior of xx in set-builder notation. The braces {}\{\} are read as “the set of,” and the vertical bar \mid is read as “such that,” so we would read {x10x<30}\{x\mid 10\le x<30\} as “the set of xx-values such that 10 is less than or equal to xx, and xx is less than 30.”

The table below compares inequality notation, set-builder notation, and interval notation for one family of sets, and the number lines that follow graph the same six sets.

Inequality notationSet-builder notationInterval notation
5<h105<h\le 10{h5<h10}\{h\mid 5<h\le 10\}(5,10](5,10]
5h<105\le h<10{h5h<10}\{h\mid 5\le h<10\}[5,10)[5,10)
5<h<105<h<10{h5<h<10}\{h\mid 5<h<10\}(5,10)(5,10)
h<10h<10{hh<10}\{h\mid h<10\}(,10)(-\infty,10)
h10h\ge 10{hh10}\{h\mid h\ge 10\}[10,)[10,\infty)
All real numbersR\mathbb{R}(,)(-\infty,\infty)
45678910115 < h ≤ 10
45678910115 ≤ h < 10
45678910115 < h < 10
4567891011h < 10
4567891011h ≥ 10
4567891011All real numbers

To combine two intervals using inequality notation or set-builder notation, we use the word “or.” As we saw in earlier examples, we use the union symbol, \cup, to combine two unconnected intervals. For example, the union of the sets {2,3,5}\{2,3,5\} and {4,6}\{4,6\} is the set {2,3,4,5,6}\{2,3,4,5,6\}. It is the set of all elements that belong to one or the other (or both) of the original two sets. For sets with a finite number of elements like these, the elements do not have to be listed in ascending order of numerical value. If the original two sets have some elements in common, those elements should be listed only once in the union set. For sets of real numbers on intervals, another example of a union is

{xx3}=(,3][3,)\{x\mid \lvert x\rvert\ge 3\}=(-\infty,-3]\cup[3,\infty)

Set-builder notation and interval notation.

Set-builder notation is a method of specifying a set of elements that satisfy a certain condition. It takes the form {xstatement about x}\{x\mid \text{statement about }x\} which is read as, “the set of all xx such that the statement about xx is true.” For example,

{x4<x12}\{x\mid 4<x\le 12\}

Interval notation is a way of describing sets that include all real numbers between a lower limit that may or may not be included and an upper limit that may or may not be included. The endpoint values are listed between brackets or parentheses. A square bracket indicates inclusion in the set, and a parenthesis indicates exclusion from the set. For example,

(4,12](4,12]

How to: given a line graph, describe the set of values using interval notation.

  1. Identify the intervals to be included in the set by determining where the heavy line overlays the real line.
  2. At the left end of each interval, use [ with each end value to be included in the set (solid dot) or ( for each excluded end value (open dot).
  3. At the right end of each interval, use ] with each end value to be included in the set (filled dot) or ) for each excluded end value (open dot).
  4. Use the union symbol \cup to combine all intervals into one set.

Example. Describe the intervals of values shown in the number line below using inequality notation, set-builder notation, and interval notation.

−2−101234567

Solution. To describe the values, xx, included in the intervals shown, we would say, “xx is a real number greater than or equal to 1 and less than or equal to 3, or a real number greater than 5.”

Inequality1x3  or  x>51\le x\le 3\ \text{ or }\ x>5
Set-builder notation{x1x3  or  x>5}\{x\mid 1\le x\le 3\ \text{ or }\ x>5\}
Interval notation[1,3](5,)[1,3]\cup(5,\infty)

Remember that, when writing or reading interval notation, using a square bracket means the boundary is included in the set. Using a parenthesis means the boundary is not included in the set.

−5−4−3−2−1012345

Which words describe the set graphed on the number line above?

Write the same set in interval notation.

Finding domain and range from graphs

Another way to identify the domain and range of functions is by using graphs. Because the domain refers to the set of possible input values, the domain of a graph consists of all the input values shown on the xx-axis. The range is the set of possible output values, which are shown on the yy-axis. Keep in mind that if the graph continues beyond the portion of the graph we can see, the domain and range may be greater than the visible values.

xy−6−5−4−3−2−1123456−9−8−7−6−5−4−3−2−11234567DomainRange

We can observe that the graph extends horizontally from 5-5 to the right without bound, so the domain is [5,)[-5,\infty). The vertical extent of the graph is all range values 55 and below, so the range is (,5](-\infty,5]. Note that the domain and range are always written from smaller to larger values, or from left to right for domain, and from the bottom of the graph to the top of the graph for range.

Example. Find the domain and range of the function ff whose graph is shown below.

xy−4−3−2−112−6−5−4−3−2−112f

Solution. We can observe that the horizontal extent of the graph is 3-3 to 1, so the domain of ff is (3,1](-3,1].

The vertical extent of the graph is 0 to 4-4, so the range is [4,0][-4,0]. The graph below marks both.

xy−4−3−2−1123−6−5−4−3−2−112DomainRange

Example. Find the domain and range of the function ff whose graph is shown below.

tb197519801985199019952000200504008001,2001,6002,000

Alaska crude oil production. (credit: modification of work by the U.S. Energy Information Administration)

Solution. The input quantity along the horizontal axis is “years,” which we represent with the variable tt for time. The output quantity is “thousands of barrels of oil per day,” which we represent with the variable bb for barrels. The graph may continue to the left and right beyond what is viewed, but based on the portion of the graph that is visible, we can determine the domain as 1973t20081973\le t\le 2008 and the range as approximately 180b2010180\le b\le 2010.

In interval notation, the domain is [1973,2008][1973,2008], and the range is about [180,2010][180,2010]. For the domain and the range, we approximate the smallest and largest values since they do not fall exactly on the grid lines.

tP195019601970198019902000020406080100

Using the World Population Increase graph above, identify the domain using interval notation.

Using the same graph, identify the range using interval notation, in people.

Q&A. Can a function’s domain and range be the same?

Yes. For example, the domain and range of the cube root function are both the set of all real numbers.

Finding domains and ranges of the toolkit functions

We will now return to our set of toolkit functions to determine the domain and range of each.

Constant functionf(x)=cf(x)=c

xf(x)−4−224−4−224f(x) = c

For the constant function f(x)=cf(x)=c, the domain consists of all real numbers; there are no restrictions on the input. The only output value is the constant cc, so the range is the set {c}\{c\} that contains this single element. In interval notation, this is written as [c,c][c,c], the interval that both begins and ends with cc. Domain: (,)(-\infty,\infty). Range: [c,c][c,c].

Identity functionf(x)=xf(x)=x

xf(x)−4−224−4−224

For the identity function f(x)=xf(x)=x, there is no restriction on xx. Both the domain and range are the set of all real numbers. Domain: (,)(-\infty,\infty). Range: (,)(-\infty,\infty).

Absolute value functionf(x)=xf(x)=\lvert x\rvert

xf(x)−4−224−4−224

For the absolute value function f(x)=xf(x)=\lvert x\rvert, there is no restriction on xx. However, because absolute value is defined as a distance from 0, the output can only be greater than or equal to 0. Domain: (,)(-\infty,\infty). Range: [0,)[0,\infty).

Quadratic functionf(x)=x2f(x)=x^2

xf(x)−4−224−4−224

For the quadratic function f(x)=x2f(x)=x^2, the domain is all real numbers since the horizontal extent of the graph is the whole real number line. Because the graph does not include any negative values for the range, the range is only nonnegative real numbers. Domain: (,)(-\infty,\infty). Range: [0,)[0,\infty).

Cubic functionf(x)=x3f(x)=x^3

xf(x)−4−224−4−224

For the cubic function f(x)=x3f(x)=x^3, the domain is all real numbers because the horizontal extent of the graph is the whole real number line. The same applies to the vertical extent of the graph, so the domain and range include all real numbers. Domain: (,)(-\infty,\infty). Range: (,)(-\infty,\infty).

Reciprocal functionf(x)=1xf(x)=\tfrac{1}{x}

xf(x)−4−224−4−224

For the reciprocal function f(x)=1xf(x)=\tfrac{1}{x}, we cannot divide by 0, so we must exclude 0 from the domain. Further, 1 divided by any value can never be 0, so the range also will not include 0. In set-builder notation, we could also write {xx0}\{x\mid x\ne 0\}, the set of all real numbers that are not zero. Domain: (,0)(0,)(-\infty,0)\cup(0,\infty). Range: (,0)(0,)(-\infty,0)\cup(0,\infty).

Reciprocal squared functionf(x)=1x2f(x)=\tfrac{1}{x^2}

xf(x)−4−224−4−224

For the reciprocal squared function f(x)=1x2f(x)=\tfrac{1}{x^2}, we cannot divide by 00, so we must exclude 00 from the domain. There is also no xx that can give an output of 0, so 0 is excluded from the range as well. Note that the output of this function is always positive due to the square in the denominator, so the range includes only positive numbers. Domain: (,0)(0,)(-\infty,0)\cup(0,\infty). Range: (0,)(0,\infty).

Square root functionf(x)=xf(x)=\sqrt{x}

xf(x)−4−224−4−224

For the square root function f(x)=xf(x)=\sqrt{x}, we cannot take the square root of a negative real number, so the domain must be 0 or greater. The range also excludes negative numbers because the square root of a positive number xx is defined to be positive, even though the square of the negative number x-\sqrt{x} also gives us xx. Domain: [0,)[0,\infty). Range: [0,)[0,\infty).

Cube root functionf(x)=x3f(x)=\sqrt[3]{x}

xf(x)−4−224−4−224

For the cube root function f(x)=x3f(x)=\sqrt[3]{x}, the domain and range include all real numbers. Note that there is no problem taking a cube root, or any odd-integer root, of a negative number, and the resulting output is negative (it is an odd function). Domain: (,)(-\infty,\infty). Range: (,)(-\infty,\infty).

How to: given the formula for a function, determine the domain and range.

  1. Exclude from the domain any input values that result in division by zero.
  2. Exclude from the domain any input values that have nonreal (or undefined) number outputs.
  3. Use the valid input values to determine the range of the output values.
  4. Look at the function graph and table values to confirm the actual function behavior.

Example. Find the domain and range of f(x)=2x3xf(x)=2x^3-x.

Solution. There are no restrictions on the domain, as any real number may be cubed and then subtracted from the result.

The domain is (,)(-\infty,\infty) and the range is also (,)(-\infty,\infty).

Example. Find the domain and range of f(x)=2x+1f(x)=\tfrac{2}{x+1}.

Solution. We cannot evaluate the function at 1-1 because division by zero is undefined. The domain is (,1)(1,)(-\infty,-1)\cup(-1,\infty). Because the function is never zero, we exclude 0 from the range. The range is (,0)(0,)(-\infty,0)\cup(0,\infty).

Example. Find the domain and range of f(x)=2x+4f(x)=2\sqrt{x+4}.

Solution. We cannot take the square root of a negative number, so the value inside the radical must be nonnegative.

x+40  when  x4x+4\ge 0\ \text{ when }\ x\ge -4

The domain of f(x)f(x) is [4,)[-4,\infty).

We then find the range. We know that f(4)=0f(-4)=0, and the function value increases as xx increases without any upper limit. We conclude that the range of ff is [0,)[0,\infty).

The graph below represents the function ff.

xy−5−4−3−2−112345−1123456f

Find the domain of f(x)=2xf(x)=-\sqrt{2-x}.

Find the range of f(x)=2xf(x)=-\sqrt{2-x}.

Graphing piecewise-defined functions

Sometimes, we come across a function that requires more than one formula in order to obtain the given output. For example, in the toolkit functions, we introduced the absolute value function f(x)=xf(x)=\lvert x\rvert. With a domain of all real numbers and a range of values greater than or equal to 0, absolute value can be defined as the magnitude, or modulus, of a real number value regardless of sign. It is the distance from 0 on the number line. All of these definitions require the output to be greater than or equal to 0.

If we input 0, or a positive value, the output is the same as the input.

f(x)=x  if  x0f(x)=x\ \text{ if }\ x\ge 0

If we input a negative value, the output is the opposite of the input.

f(x)=x  if  x<0f(x)=-x\ \text{ if }\ x<0

Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain.

We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain “boundaries.” For example, we often encounter situations in business for which the cost per piece of a certain item is discounted once the number ordered exceeds a certain value. Tax brackets are another real-world example of piecewise functions. For example, consider a simple tax system in which incomes up to $10,000 are taxed at 10%, and any additional income is taxed at 20%. Writing a total income of SS dollars, the tax is 0.1S0.1S dollars if S10,000S\le 10{,}000 and 1000+0.2(S10,000)1000+0.2(S-10{,}000) dollars if S>10,000S>10{,}000.

Piecewise function. A piecewise function is a function in which more than one formula is used to define the output. Each formula has its own domain, and the domain of the function is the union of all these smaller domains. We notate this idea like this:

f(x)={formula 1if x is in domain 1formula 2if x is in domain 2formula 3if x is in domain 3 f(x)=\begin{cases} \text{formula 1} & \text{if }x\text{ is in domain 1} \\[4pt] \text{formula 2} & \text{if }x\text{ is in domain 2} \\[4pt] \text{formula 3} & \text{if }x\text{ is in domain 3} \end{cases}

In piecewise notation, the absolute value function is

x={xif x0xif x<0 \lvert x\rvert=\begin{cases} x & \text{if }x\ge 0 \\[4pt] -x & \text{if }x<0 \end{cases}

How to: given a piecewise function, write the formula and identify the domain for each interval.

  1. Identify the intervals for which different rules apply.
  2. Determine formulas that describe how to calculate an output from an input in each interval.
  3. Use braces and if-statements to write the function.

Example. A museum charges $5 per person for a guided tour with a group of 1 to 9 people or a fixed $50 fee for a group of 10 or more people. Write a function relating the number of people, nn, to the cost, CC. Since one cannot have fractions of a person, this is really a discrete function. However, for this exercise we will treat it as a continuous function.

Solution. Two different formulas will be needed. For nn-values under 10, C=5nC=5n. For values of nn that are 10 or greater, C=50C=50.

C(n)={5nif  0<n<1050if  n10 C(n)=\begin{cases} 5n & \text{if }\ 0<n<10 \\[4pt] 50 & \text{if }\ n\ge 10 \end{cases}

The function is represented below. The graph is a diagonal line from n=0n=0 to n=10n=10 and a constant after that. In this example, the two formulas agree at the meeting point where n=10n=10, but not all piecewise functions have this property.

nC(n)5101520102030405060C(n)

Example. A cell phone company uses the function below to determine the cost, CC, in dollars for gg gigabytes of data transfer.

C(g)={25if  0<g<225+10(g2)if  g2 C(g)=\begin{cases} 25 & \text{if }\ 0<g<2 \\[4pt] 25+10(g-2) & \text{if }\ g\ge 2 \end{cases}

Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.

Solution. To find the cost of using 1.5 gigabytes of data, C(1.5)C(1.5), we first look to see which part of the domain our input falls in. Because 1.5 is less than 2, we use the first formula.

C(1.5)=$25C(1.5)=\$25

To find the cost of using 4 gigabytes of data, C(4)C(4), we see that our input of 4 is greater than 2, so we use the second formula.

C(4)=25+10(42)=$45C(4)=25+10(4-2)=\$45

The function is represented below. We can see where the function changes from a constant to a shifted and stretched identity at g=2g=2. We plot the graphs for the different formulas on a common set of axes, making sure each formula is applied on its proper domain.

gC(g)0.511.522.533.544.5102030405060C(g)

How to: given a piecewise function, sketch a graph.

  1. Indicate on the xx-axis the boundaries defined by the intervals on each piece of the domain.
  2. For each piece of the domain, graph on that interval using the corresponding equation pertaining to that piece. Do not graph two functions over one interval because it would violate the criteria of a function.

Example. Sketch a graph of the function.

f(x)={x2if  x13if  1<x2xif  x>2 f(x)=\begin{cases} x^2 & \text{if }\ x\le 1 \\[4pt] 3 & \text{if }\ 1<x\le 2 \\[4pt] x & \text{if }\ x>2 \end{cases}

Solution. Each of the component functions is from our library of toolkit functions, so we know their shapes. We can imagine graphing each function and then limiting the graph to the indicated domain. At the endpoints of the domain, we draw open circles to indicate where the endpoint is not included because of a less-than or greater-than inequality; we draw a closed circle where the endpoint is included because of a less-than-or-equal-to or greater-than-or-equal-to inequality.

The three figures below show the three components of the piecewise function graphed on separate coordinate systems: (a) f(x)=x2f(x)=x^2 if x1x\le 1; (b) f(x)=3f(x)=3 if 1<x21<x\le 2; (c) f(x)=xf(x)=x if x>2x>2.

xy−4−3−2−11234−2−112345
xy−4−3−2−11234−2−112345
xy−4−3−2−11234−2−112345

Now that we have sketched each piece individually, we combine them in the same coordinate plane.

xy−4−3−2−11234−2−112345

Note that the graph does pass the vertical line test even at x=1x=1 and x=2x=2 because the points (1,3)(1,3) and (2,2)(2,2) are not part of the graph of the function, though (1,1)(1,1) and (2,3)(2,3) are.

Which graph shows the piecewise function f(x)=x3f(x)=x^3 if x<1x<-1, f(x)=2f(x)=-2 if 1<x<4-1<x<4, and f(x)=xf(x)=\sqrt{x} if x>4x>4?

Q&A. Can more than one formula from a piecewise function be applied to a value in the domain?

No. Each value corresponds to one equation in a piecewise formula.

Key concepts

  • The domain of a function includes all real input values that would not cause us to attempt an undefined mathematical operation, such as dividing by zero or taking the square root of a negative number.
  • The domain of a function can be determined by listing the input values of a set of ordered pairs.
  • The domain of a function can also be determined by identifying the input values of a function written as an equation.
  • Interval values represented on a number line can be described using inequality notation, set-builder notation, and interval notation.
  • For many functions, the domain and range can be determined from a graph.
  • An understanding of toolkit functions can be used to find the domain and range of related functions.
  • A piecewise function is described by more than one formula.
  • A piecewise function can be graphed using each algebraic formula on its assigned subdomain.

Key terms

interval notation — a method of describing a set that includes all numbers between a lower limit and an upper limit; the lower and upper values are listed between brackets or parentheses, a square bracket indicating inclusion in the set, and a parenthesis indicating exclusion. piecewise function — a function in which more than one formula is used to define the output. set-builder notation — a method of describing a set by a rule that all of its members obey; it takes the form {xstatement about x}\{x\mid \text{statement about }x\}.


This section is adapted from Precalculus 2e, Section 1.2: Domain and Range by Jay Abramson and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated every figure as an accessible inline SVG, including the two opening bar charts (whose bar heights are read from the source charts), the domain-and-range function-machine diagram, the number lines, the toolkit function library, and the piecewise graphs; presented the interval-notation summary and the inequality/set-builder/interval comparison as Markdown tables, with the comparison’s number lines following as a labelled figure group and the generic aa-and-bb number lines of the first summary replaced by its own description column; omitted the media links and end-of-section exercises; converted the practice problems (“Try Its”) into interactive exercises with instant feedback, presented as multiple choice because interval and set-builder notation cannot be graded as free-response math; and presented the piecewise-sketching practice item as a “which graph is correct” question, since the graphing component cannot accept a piecewise answer.