Domain and range from pairs and tables
A list of pairs can run to dozens of entries, with the same values turning up again and again. How do you say exactly which values go in and which come out?
Where you are 4 in Domain and range
When you reach for it
A relation pairs inputs with outputs. Very often the pairs are simply written down: a list of ordered pairs, a table of readings, or a mapping diagram with arrows. Before you can ask anything harder about such a relation (is it a function, what does its graph look like, can it be read backwards) you need two plain facts about it: which values go in, and which values come out.
The domain of a relation is the set of all its inputs. The range is the set of all its outputs.
Reach for this move whenever a relation is given as a finite collection of pairs, in any of its three usual dresses, and you need to say what it accepts and what it produces.
The procedure
Inputs first, outputs second
In an ordered pair (x, y) the first entry is the input and the second is the output. So for a relation written as a set of pairs,
For the relation \{(1, 8), (3, 8), (5, 2)\} the first entries are 1, 3 and 5, and the second entries are 8, 8 and 2. The domain is \{1, 3, 5\} and the range is \{2, 8\}.
The order inside a pair matters, and that is the whole reason this works: (1, 8) and (8, 1) are different pairs, and in the first one 1 goes in while in the second it comes out.
Writing the answer as a set
The domain and the range are sets, and they are written in roster form: the members listed between braces, separated by commas. Two facts about sets decide what the answer looks like.
- Each value is listed once. A set records only whether a value belongs to it, not how often. The second entries above were 8, 8 and 2, but \{8, 8, 2\} and \{8, 2\} have exactly the same members, so they are the same set, and the short one is the one to write.
- Order does not matter. \{8, 2\} and \{2, 8\} have the same members, so they are equal sets. Listing numbers from least to greatest is a convention, not a rule: it makes it easy to see that nothing is missing, and easy to compare two answers.
A repeat is dropped because the range answers a yes or no question about each value: does it ever come out? How often it comes out is held by the list of pairs, not by the range.
Where the pairs are hiding
The same relation can be shown three ways, and in each one the task is to find every pair.
- A list of pairs. Each pair is written out; the first entry is the input.
- A table. Each column (or row) of the table is one pair. Which line holds the inputs is set by the situation or by the headings, often x for inputs and y for outputs. A table that lists the same input twice is still allowed; it simply has two pairs with that input.
- A mapping diagram. The inputs sit in one oval and the outputs in another, and each arrow, from an input to an output, is one pair. An input with two arrows leaving it is in two pairs.
A separate question: is it a function?
A relation is a function when every input has exactly one output. That is a question about how the inputs and outputs are joined, and the domain and range do not answer it: they are found the same way either way. Only the pairs show an input with two different outputs, which is what stops a relation being a function; a repeated output never does. The lesson on relations and functions treats that question.
Worked examples
A list of pairs
Find the domain and range of the relation
The inputs are the first entries: 4, -1, 6 and 2. No value repeats, so all four go into the domain. Written from least to greatest,
The outputs are the second entries: 9, 3, 0 and -5. Again none repeats.
Sorting each set separately is fine, because the sets describe the two sides of the relation, not the way they are joined: -1 and -5 both come first, but (-1, -5) is not one of the pairs.
A table of daily readings
Ifeoma copies a week’s daily high temperatures, in degrees Celsius, from her school’s weather station.
| Day | High |
|---|---|
| Mon | 14 |
| Tue | 17 |
| Wed | 14 |
| Thu | 12 |
| Fri | 17 |
Treating each day as the input, find the domain and range.
SolutionEach row is one pair: (Mon, 14), (Tue, 17), (Wed, 14), (Thu, 12), (Fri, 17). The inputs are the five days, all different.
The members of a set need not be numbers; a day is a perfectly good member.
The outputs, read down the second column, are 14, 17, 14, 12, 17. The value 14 appears twice and so does 17. Each is listed once.
Five inputs give only three different outputs, and nothing went wrong: two days with the same high are two different pairs that share an output.
A mapping diagram that is not a function
A shoe shop sells two styles of the same shoe. In the mapping diagram below, each arrow joins a size to a price, in dollars, at which a pair in that size is on sale. List the pairs, and find the domain and range.
Each arrow is one pair, so read the arrows one at a time, starting from each input.
Size 6 has two arrows leaving it, so it appears in two pairs; the same goes for size 7.
The first entries are 5, 6, 6, 7, 7, 8. Listing each once,
The second entries are 35, 35, 40, 40, 55, 55. Listing each once,
In a mapping diagram the left oval already lists every input once and the right oval every output once, so the two sets can be read straight off the ovals, provided every value in an oval has at least one arrow. Here every one does.
This relation is not a function: size 6 goes to both 35 and 40. That changed nothing about how the domain and range were found.
Reading a schedule both ways
Leandro copies one trip of a bus that leaves the depot, loops past the market to the school, passes the market again on the way back and returns to the depot.
| Stop | Minutes after leaving the depot |
|---|---|
| Depot | 0 |
| Market | 6 |
| School | 11 |
| Market | 17 |
| Depot | 24 |
(a) With the stop as the input, find the domain and range.
(b) Leandro now reads the table the other way: given a number of minutes, which stop is the bus at? Find the domain and range of this second relation.
Solution(a) Each row is one pair (stop, minutes). The first entries are Depot, Market, School, Market, Depot. Two stops repeat, and each is listed once.
The second entries are all different.
(b) Reading the other way turns each pair around: (Depot, 0) becomes (0, Depot), and so on. The first entries are now the minutes, the second entries the stops.
Turning every pair around swaps the domain and the range, because every first entry becomes a second entry and every second entry a first. That swap is exactly how an inverse is read from a table.
The two readings also differ on the separate question. In (a), Market goes to both 6 and 17, so stop to minutes is not a function. In (b) each number of minutes goes to one stop, so minutes to stop is a function.
Working back from a range
Gisela’s table has one entry smudged.
| x | -2 | 0 | 1 | 3 |
|---|---|---|---|---|
| y | 5 | 1 | m | 5 |
(a) The range is \{1, 5\}. What could m be?
(b) The range is \{1, 4, 5\}. What is m?
(c) Could the range be \{1, 5, 7, 8\}?
SolutionThe visible outputs are 5, 1 and 5, so whatever m is, the range contains 1 and 5 and also contains m itself, since m is an output too.
(a) If the range is \{1, 5\}, then m must be one of its members, because every output is in the range. Both choices work: m = 1 gives outputs 5, 1, 1, 5 and m = 5 gives 5, 1, 5, 5, and each of those lists becomes \{1, 5\} once repeats are dropped. So m = 1 or m = 5, and the range alone cannot say which.
(b) Now the range has the member 4, and 4 is not among the visible outputs. The only output not yet seen is m, so m = 4. Check: the outputs 5, 1, 4, 5 give \{1, 4, 5\}.
(c) No. The table has four pairs, and two of them share the output 5, so there are at most three different outputs: 1, 5 and m. A range with four members needs four different outputs.
A rule on a short list of inputs
The rule y = x^2 - 1 is used only on the inputs \{-2, -1, 0, 1, 2, 3\}. Find the range.
SolutionThe domain is given, so the work is to find each output and collect them. Substituting each input:
| x | y |
|---|---|
| -2 | 3 |
| -1 | 0 |
| 0 | -1 |
| 1 | 0 |
| 2 | 3 |
| 3 | 8 |
For instance (-2)^2 - 1 = 4 - 1 = 3 and 3^2 - 1 = 9 - 1 = 8. The outputs are 3, 0, -1, 0, 3, 8. The value 3 comes from both -2 and 2, and 0 from both -1 and 1, because squaring a number and its opposite gives the same result. Listing each once,
Six inputs, four outputs. Given every real number as an input, the rule’s domain and range could not be listed at all; that is the work of the implied domain.
Boundaries
- The pairs must be finite and all on view. This move collects values from a list, so it works only when every pair can be listed. A line or curve, or a rule like y = 2x with no restriction on x, has infinitely many pairs, and its domain is described rather than listed. That is done by reading a graph, by asking which inputs a formula can accept, or by asking which inputs make sense in a real situation.
- You must know which entry is the input. In a list of pairs the first entry is the input by agreement. In a table or a description, the situation decides, and reading it the other way gives a different relation whose domain and range are swapped, as in the bus schedule.
- Only values that actually occur count. The range is the outputs that some input really produces. If a diagram or a price list shows a value with no arrow or no pair attached to it, that value is not in the range. Some books give a name, the codomain, to a larger set of outputs that were allowed; the range is never bigger than what was produced.
- Equal values are one member. \displaystyle \frac{1}{2} and 0.5 are the same number, so if both appear as outputs they are listed once.
- The two sets do not pin down the relation. Different relations can share a domain and a range, and the sets do not say whether the relation is a function. Both facts live in the pairs.
Where this goes next
Plotting the pairs gives a scatter of points whose x-coordinates are exactly the domain; graphing a function from a table does that, and the vertical line test then settles the function question by eye. When the graph is a whole line or curve, the domain becomes a stretch of the number line instead of a list, which is domain and range from a graph. A formula with no stated domain gets its implied domain, and a real situation trims that to a reasonable domain. Reading a table backwards is how the inverse of a function is first met. And evaluating a function is only ever asked of numbers in its domain.
Exercises
Lists of pairs
Find the domain and range of each relation.
- \{(3, 8), (1, 2), (7, 5), (-4, 0)\}
- \{(2, 6), (5, 6), (-1, 6), (0, 6)\}
- \{(9, 1), (9, 4), (9, -2)\}
- \{(-2, 3), (0, -2), (3, 0), (-2, 0), (1, 3)\}
- \displaystyle \left\{\left(\frac{1}{2}, 4\right), \left(\frac{3}{4}, \frac{1}{2}\right), \left(4, \frac{3}{4}\right)\right\}
Tables
Find the domain and range of the relation in each table, taking the first line as the input.
- A weather station’s overnight lows, in degrees Celsius, for six days.
| Day | Low |
|---|---|
| Mon | -2 |
| Tue | 1 |
| Wed | -2 |
| Thu | 0 |
| Fri | 3 |
| Sat | 1 |
- A table of values.
| x | -3 | -1 | 0 | 2 | 5 |
|---|---|---|---|---|---|
| y | 4 | 4 | 1 | 4 | 1 |
- A campsite’s price for one night, in dollars, by the number of people in the group.
| People | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|
| Dollars | 30 | 30 | 35 | 35 | 40 |
- Kirsi notes the buses due at her stop one morning, with each time as the input and the route number as the output.
| Time | Route |
|---|---|
| 8{:}05 | 12 |
| 8{:}20 | 7 |
| 8{:}35 | 12 |
| 8{:}50 | 7 |
| 9{:}05 | 31 |
Mapping diagrams
List the pairs shown, then give the domain and range.
- The mapping diagram above, from inputs to outputs.
- The mapping diagram above, from four friends to their shoe sizes.
Outputs from a rule
Each rule is used only on the inputs given. Find the range.
- y = 2x - 1 on the inputs \{-1, 0, 1, 2, 3\}
- y = (x - 2)^2 on the inputs \{-1, 0, 2, 3, 5\}
Working backwards
The table below has one unknown output, k.
| x | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| y | 6 | k | 2 | 6 | 9 |
- The range of the table is \{2, 6, 9\}. What could k be?
- The range of the table is \{2, 6, 9, 11\}. What is k?
- Write a relation of exactly four pairs whose domain is \{1, 2, 3\} and whose range is \{0, 5\}.
Reasoning
- Hamish writes the range of \{(1, 4), (2, 4), (3, 4)\} as \{4, 4, 4\}. Is that a different set from \{4\}? Which way should it be written, and why?
- A relation has exactly six pairs. What is the largest number of members its domain could have, and the smallest? Explain, and say whether the same is true of its range.
- Kirsi turns every pair of a relation around, so that (a, b) becomes (b, a). What happens to the domain and the range? Explain why.
- Two relations have the same domain and the same range. Must they be the same relation? Give an example to support your answer.
Answers
- Domain \{-4, 1, 3, 7\}, range \{0, 2, 5, 8\}. No value repeats on either side.
- Domain \{-1, 0, 2, 5\}, range \{6\}. Every input gives 6, which is listed once.
- Domain \{9\}, range \{-2, 1, 4\}. One input in three pairs; it is listed once. (Not a function, but that does not change the sets.)
- Domain \{-2, 0, 1, 3\}, range \{-2, 0, 3\}. The input -2 appears twice, and the outputs 3 and 0 each appear twice; each is listed once.
- Domain \displaystyle \left\{\frac{1}{2}, \frac{3}{4}, 4\right\}, range \displaystyle \left\{\frac{1}{2}, \frac{3}{4}, 4\right\}. The two sets are equal, even though no pair has the same input and output.
- Domain \{\text{Mon}, \text{Tue}, \text{Wed}, \text{Thu}, \text{Fri}, \text{Sat}\}, range \{-2, 0, 1, 3\}. The lows -2 and 1 each occur twice.
- Domain \{-3, -1, 0, 2, 5\}, range \{1, 4\}. Five inputs, but only two different outputs.
- Domain \{4, 5, 6, 7, 8\}, range \{30, 35, 40\}.
- Domain \{8{:}05, 8{:}20, 8{:}35, 8{:}50, 9{:}05\}, range \{7, 12, 31\}. Routes 12 and 7 each run twice; each is listed once.
- Pairs \{(3, 2), (3, 6), (5, 9), (8, 9)\}. Domain \{3, 5, 8\}, range \{2, 6, 9\}. The input 3 has two arrows, so it is in two pairs; 9 receives two arrows.
- The four pairs are (\text{Gisela}, 6), (\text{Hamish}, 9), (\text{Ifeoma}, 6) and (\text{Joaquin}, 8). Domain \{\text{Gisela}, \text{Hamish}, \text{Ifeoma}, \text{Joaquin}\}, range \{6, 8, 9\}.
- Range \{-3, -1, 1, 3, 5\}. The outputs are 2(-1) - 1 = -3, then -1, 1, 3, 5, all different.
- Range \{0, 1, 4, 9\}. The outputs are (-3)^2 = 9, (-2)^2 = 4, 0, 1 and 3^2 = 9: the inputs -1 and 5 are both 3 from 2, so both give 9.
- k = 2, k = 6 or k = 9. The visible outputs 6, 2, 6, 9 already give \{2, 6, 9\}, and k must be in the range, so any of its three members works.
- k = 11. The member 11 is not among the visible outputs, and k is the only other output.
- One answer: \{(1, 0), (2, 5), (3, 0), (3, 5)\}. Its first entries give \{1, 2, 3\} and its second entries give \{0, 5\}. Other answers are possible: four different pairs, every first entry from 1, 2, 3 and every second entry from 0, 5, with each of those values used.
- It is the same set. A set records only which values belong to it, and \{4, 4, 4\} and \{4\} both have the single member 4. It should be written \{4\}, each value once, because the range says which outputs occur, not how often.
- Largest 6, when all six inputs are different; smallest 1, when all six pairs share one input. The same holds for the range: from 1 (every pair has the same output) up to 6 (all outputs different). The domain and range need not be the same size as each other.
- They swap: the new domain is the old range and the new range is the old domain. Every first entry becomes a second entry and every second entry a first, and no value is gained or lost.
- No. \{(1, 5), (2, 6)\} and \{(1, 6), (2, 5)\} both have domain \{1, 2\} and range \{5, 6\}, but 1 is paired with 5 in the first and with 6 in the second.