01 · Learn the idea
Relations, and the ones called functions
A relation is any set of ordered pairs (x, y). The first number in each pair is the input and the second is the output. A relation is a function when each input has exactly one output.
Think of a snack machine. You press a button (the input) and a snack drops (the output). If button B4 always gives pretzels, the machine acts like a function. If B4 gives pretzels on some days and raisins on others, you can’t predict the output from the input, and that is what "not a function" means.
The input is also called the independent variable, because you are free to choose it. The output is the dependent variable, because its value depends on the input. If you earn $11 for each hour you work, the hours worked are the independent variable and the pay is the dependent variable.
The domain of a relation is the set of all its inputs. The range is the set of all its outputs. Take the relation {(1, 4), (2, 6), (3, 4)}. Its domain is {1, 2, 3}. Its range is {4, 6}: list each number once, even though 4 appears twice. This relation is a function, because each input has just one output. Two different inputs may share an output. What a function can’t have is one input with two different outputs.
02 · Build understanding
Worked example: a table
A table gives the relation x: −2, 0, 3, 0 and y: 5, 1, 4, −1. Is it a function? What are its domain and range?
Step 1: Read the table as ordered pairs, column by column: (−2, 5), (0, 1), (3, 4) and (0, −1).
Step 2: Look for an input that appears more than once. The input 0 appears twice.
Step 3: Compare the outputs for that input. The input 0 is paired with 1 and with −1. That is one input with two different outputs, so the relation is not a function.
Step 4: List the domain, the inputs, each one once and in order: {−2, 0, 3}.
Step 5: List the range, the outputs: {−1, 1, 4, 5}.
Step 6: Check by counting. The table has four pairs but the domain has only three numbers. That matches what you found: one input was used twice. A relation has a domain and a range whether or not it is a function.
03 · Build understanding
Worked example: a mapping diagram
A mapping diagram shows two ovals side by side. The left oval lists the inputs and the right oval lists the outputs. An arrow goes from each input to its output.
Picture this one. The left oval holds 2, 5 and 8. The right oval holds 10 and 20. The arrows are 2 → 10, 5 → 10 and 8 → 20.
Step 1: Count the arrows that leave each input. One arrow leaves 2, one leaves 5 and one leaves 8.
Step 2: Decide. Every input has exactly one arrow leaving it, so each input has exactly one output. The relation is a function. Two arrows land on 10, and that is allowed.
Step 3: Read the domain from the left oval, {2, 5, 8}, and the range from the right oval, {10, 20}.
Step 4: Check by changing the diagram. Add one more arrow, 5 → 20. Now two arrows leave 5, so the input 5 has the outputs 10 and 20, and the new relation is not a function. Its domain and range are unchanged.
04 · Build understanding
Reading a graph
Every point on a graph is an ordered pair, so a graph is a relation too. The x-coordinates are the inputs and the y-coordinates are the outputs.
The graph here shows five points: (−3, 2), (−1, 4), (1, 4), (2, −1) and (4, 1). No two points have the same x-coordinate, so each input has one output and the relation is a function. Its domain is {−3, −1, 1, 2, 4} and its range is {−1, 1, 2, 4}.
A quick way to test a graph is the vertical line test. Imagine sliding a vertical line across the graph from left to right. All the points on one vertical line share the same x-value. If the line ever touches the graph at two or more points at once, one input has more than one output, and the graph is not a function.
On this graph, a vertical line touches at most one point wherever you put it. The points (−1, 4) and (1, 4) are at the same height, so a horizontal line touches both of them. That only shows two inputs sharing an output, which a function may do.
05 · Build understanding
Worked example: domain and range as inequalities
When a graph is an unbroken line or curve, it has too many points to list. Then you describe the domain and the range with inequalities.
A candle is 12 centimeters tall when it is lit. It burns down 2 centimeters each hour and is blown out after 5 hours. The graph shows its height h, in centimeters, after t hours.
Step 1: Name the variables. The height depends on the time, so t is the independent variable (the input) and h is the dependent variable (the output).
Step 2: Find the domain by reading the graph from left to right. The graph starts at t = 0 and ends at t = 5, and it uses every time between them. The domain is 0 ≤ t ≤ 5.
Step 3: Find the range by reading the graph from bottom to top. After 5 hours the candle has lost 2 × 5 = 10 centimeters, so it is 12 − 10 = 2 centimeters tall. The lowest height is 2 and the highest is 12. The range is 2 ≤ h ≤ 12.
Step 4: Check the endpoints. The filled dots at (0, 12) and (5, 2) show that the ends are included, so the inequalities use ≤. An open dot would mean the end is left out, and you would use <.
06 · Build understanding
Mistakes to watch for
Calling a relation "not a function" because an output repeats. {(1, 9), (2, 9)} is a function: each input has one output. It is a repeated input with different outputs that breaks the rule, as in {(9, 1), (9, 2)}.
Swapping domain and range. The domain comes from the inputs, the x-values, the first number in each pair. For {(3, 7), (5, 8)} the domain is {3, 5} and the range is {7, 8}.
Listing a number twice. The range of {(1, 4), (2, 6), (3, 4)} is {4, 6}. Writing {4, 6, 4} repeats a number that is already in the set.
Reading a range off the x-axis. On the candle graph the numbers 0 and 5 are times. The range is about heights, so its numbers, 2 and 12, come from the vertical axis.
Apply and explain
Your turn
A relation is {(4, 1), (6, 3), (4, 5), (9, 3)}. Marco says it is not a function because the output 3 appears twice. Is his conclusion right? Is his reason right? Explain, and give the domain and range.
Use paper or explain your thinking aloud before opening the solution.
Check your reasoning
His conclusion is right, but his reason is wrong. The output 3 is paired with the inputs 6 and 9, and two inputs sharing an output is allowed in a function. The real problem is the input 4, which is paired with two different outputs, 1 and 5. One input with two outputs means the relation is not a function. The domain is {4, 6, 9} and the range is {1, 3, 5}.
- Says the relation is not a function because the input 4 has two different outputs.
- Explains that a repeated output does not stop a relation from being a function.
- Gives the domain {4, 6, 9} and the range {1, 3, 5} with no number repeated.
Ready to practice?
Try the questions, get feedback, and review your reasoning.
Functions, domain and range: practice →