Chapter 9 ยท Functions

Domain and Range of a Function

Learn that the domain is a function's permitted inputs and the range is the outputs they produce. Find both from tables, plotted points, rules and lines.

13 min read

You already know that a function gives exactly one output for each input it is permitted, or allowed, to take. You have also used a graph to find the output for a chosen input. Now you will describe a whole function at once by answering two questions:

  • Which inputs is the function permitted to take?
  • Which outputs do those inputs produce?

Try both questions on a small function. The rule is "double the input", and the only permitted inputs are 11, 22 and 33. Doubling gives 2โ‹…1=22 \cdot 1 = 2, 2โ‹…2=42 \cdot 2 = 4 and 2โ‹…3=62 \cdot 3 = 6. So the inputs are 11, 22, 33 and the outputs are 22, 44, 66. Each of these two lists has a name.

Key concept

Domain and range

The domain of a function is the set of all its permitted inputs. The range is the set of all the outputs those inputs produce. A set is a collection of values, each listed once, written inside curly braces. For the doubling function, the domain is {1,2,3}\lbrace 1, 2, 3 \rbrace and the range is {2,4,6}\lbrace 2, 4, 6 \rbrace.

  • In a function, each permitted input has exactly one output. Different inputs may share an output; list a shared output once in the range.
  • The domain has to be stated or shown: by a list, a table, points with exact coordinates, or a sentence naming the permitted inputs. A situation can restrict it.
  • A table or a group of plotted points gives only the inputs and outputs it shows, unless a rule is also stated.
A function given only by a table
Input xxOutput yy
00
77
22
44
55
77
99
11

Worked example

Domain and range from a table

The table above lists every pair of a function: input 00 gives output 77, input 22 gives 44, input 55 gives 77, and input 99 gives 11. No rule is given. Find the domain and the range.

  1. Read the input column. Each input appears in exactly one row, so each has exactly one output. These four inputs are the whole domain, because the table lists every pair and no rule adds more.

    Domain={0,2,5,9}\text{Domain} = \lbrace 0, 2, 5, 9 \rbrace
  2. Test a number that is not in the table, such as 3. It lies between the inputs 2 and 5, but it has no row and no rule gives it an output. So 3 is not in the domain.

  3. Read the output column from top to bottom. The inputs 0 and 5 share the output 7. A function allows that, because each of those inputs still has exactly one output.

    Outputs:ย 7,4,7,1\text{Outputs: } 7, \quad 4, \quad 7, \quad 1
  4. Write the outputs as a set and list the shared output 7 once. The order does not change a set, but writing the values from least to greatest makes them easy to check.

    Range={1,4,7}\text{Range} = \lbrace 1, 4, 7 \rbrace

Answer

The domain is {0,2,5,9}\lbrace 0, 2, 5, 9 \rbrace and the range is {1,4,7}\lbrace 1, 4, 7 \rbrace.

A function can also be shown as points on a coordinate plane, the grid formed by a horizontal xx-axis and a vertical yy-axis. Each point stands for one input-output pair, written (x,y)(x, y). The first number, xx, is the input; you read it along the xx-axis. The second number, yy, is the output; you read it along the yy-axis.

The figure below shows a function that has exactly four points. Each point is labelled with its exact coordinates, so use the labels instead of judging positions by eye. For example, the point labelled (โˆ’4,3)(-4, 3) is 44 units to the left of the yy-axis and 33 units above the xx-axis. It tells you that the input โˆ’4-4 has the output 33.

Coordinate grid from x -6 to 6 and y -6 to 6, with a grid step of 1, showing 4 plotted elements. Details: point at (-4, 3), named (-4, 3); point at (-1, -2), named (-1, -2); point at (2, 5), named (2, 5); point at (4, 3), named (4, 3).
The function's four points are (โˆ’4,3)(-4, 3), (โˆ’1,โˆ’2)(-1, -2), (2,5)(2, 5) and (4,3)(4, 3).

Worked example

Domain and range from plotted points

A function is made of exactly the four points in the figure above: (โˆ’4,3)(-4, 3), (โˆ’1,โˆ’2)(-1, -2), (2,5)(2, 5) and (4,3)(4, 3). Find its domain and its range.

  1. Collect the first coordinate of each point. First coordinates are inputs, so they form the domain. The four inputs are all different, so each one has exactly one output.

    Domain={โˆ’4,โˆ’1,2,4}\text{Domain} = \lbrace -4, -1, 2, 4 \rbrace
  2. Collect the second coordinate of each point, in the same order. Second coordinates are outputs.

    Outputs:ย 3,โˆ’2,5,3\text{Outputs: } 3, \quad -2, \quad 5, \quad 3
  3. The output 3 appears twice because the inputs -4 and 4 share it: both of those points are 3 units above the x-axis. List 3 once and write the set from least to greatest.

    Range={โˆ’2,3,5}\text{Range} = \lbrace -2, 3, 5 \rbrace

Answer

The domain is {โˆ’4,โˆ’1,2,4}\lbrace -4, -1, 2, 4 \rbrace and the range is {โˆ’2,3,5}\lbrace -2, 3, 5 \rbrace. No other values belong, because the function has only these four points.

Worked example

A rule with a domain set by the situation

At a school fair, entry costs 11 dollar and each ride costs 22 dollars. Let xx be the number of rides and yy the total cost in dollars. Then y=2x+1y = 2x + 1, because each of the xx rides costs 22 dollars and entry adds 11 dollar. A wristband is sold for exactly 11, 22, 33 or 44 rides. Find the domain and the range of this function.

  1. Take the domain from the situation, not from the rule alone. The rule can be worked out for other numbers, but the fair sells wristbands only for 1, 2, 3 or 4 rides, so those are the only permitted inputs.

    Domain={1,2,3,4}\text{Domain} = \lbrace 1, 2, 3, 4 \rbrace
  2. Multiply each permitted input by 2, the cost in dollars of one ride.

    2(1)=2,2(2)=4,2(3)=6,2(4)=82(1) = 2, \quad 2(2) = 4, \quad 2(3) = 6, \quad 2(4) = 8
  3. Add the 1 dollar for entry to each product. Each sum is the output for that input.

    2+1=3,4+1=5,6+1=7,8+1=92 + 1 = 3, \quad 4 + 1 = 5, \quad 6 + 1 = 7, \quad 8 + 1 = 9
  4. Collect the four outputs. They are all different, so each one is listed once.

    Range={3,5,7,9}\text{Range} = \lbrace 3, 5, 7, 9 \rbrace

Answer

The domain is {1,2,3,4}\lbrace 1, 2, 3, 4 \rbrace, the permitted numbers of rides, and the range is {3,5,7,9}\lbrace 3, 5, 7, 9 \rbrace, the possible total costs in dollars.

Now set the fair aside and keep only the rule y=2x+1y = 2x + 1, where xx is the input and yy is the output. Suppose every real number is a permitted input. The real numbers are all the numbers on the number line: negative numbers, zero, positive numbers, fractions, decimals and numbers such as 2\sqrt{2}. This time the domain is stated in words: all real numbers.

There is now one point (x,y)(x, y) for every real number xx, and together these points make a whole straight line. It is Line A in the figure below. The fair's four points (1,3)(1, 3), (2,5)(2, 5), (3,7)(3, 7) and (4,9)(4, 9) are on Line A. So are unlabelled pairs such as (0.5,2)(0.5, 2) and (โˆ’3,โˆ’5)(-3, -5), because 2(0.5)+1=1+1=22(0.5) + 1 = 1 + 1 = 2 and 2(โˆ’3)+1=โˆ’6+1=โˆ’52(-3) + 1 = -6 + 1 = -5. The figure shows only a window of the plane, from x=โˆ’5x = -5 to x=5x = 5 and from y=โˆ’9y = -9 to y=11y = 11. Line A itself keeps going beyond that window in both directions.

Coordinate grid from x -5 to 5 and y -9 to 11, with a grid step of 1, showing 5 plotted elements. Details: line 2 x plus -1 y equals -1, named Line A; point at (1, 3), named (1, 3); point at (2, 5), named (2, 5); point at (3, 7), named (3, 7); point at (4, 9), named (4, 9).
Line A is y=2x+1y = 2x + 1 with every real number as a permitted input. The labelled points are the fair's four pairs.

So what is the range when every real number is a permitted input? Choose a number and ask whether some permitted input produces it. Try 5050. You need 2x+1=502x + 1 = 50. Subtract 11 from both sides, which keeps the two sides equal, to get 2x=492x = 49. Divide both sides by 22, which is allowed because 22 is not 00, to get x=24.5x = 24.5. Since 24.524.5 is a real number, it is a permitted input, so 5050 is an output. The pair (24.5,50)(24.5, 50) is on Line A, far outside the window of the figure.

The same two moves work for any real number you choose. Call it kk. Subtracting 11 and then dividing by 22 gives the input kโˆ’12\frac{k - 1}{2}, which is a real number. Check it: 2โ‹…kโˆ’12+1=(kโˆ’1)+1=k2 \cdot \frac{k - 1}{2} + 1 = (k - 1) + 1 = k. So every real number is an output, and the range is all real numbers.

The takeaway. The domain of a function is the set of its permitted inputs, and the range is the set of outputs those inputs produce. Find the domain first, from what is stated or shown. A table or a group of plotted points gives only the inputs it shows, read from exact values, unless a rule is also stated. A situation can limit the inputs, and a sentence such as "every real number" can open them up. Then find the outputs of those permitted inputs and list each one once. The edges of a picture never decide the domain.