Functions and Graphs of Ordered Pairs
Use a function machine forwards and backwards, and show a relationship between two quantities in words, as a table of values, as ordered pairs and their graph, and as an equation.
Before you start
- An ordered pair gives a point on a grid, with the -coordinate first: is units to the right of the origin and units down.
- To substitute a negative number, put it in brackets: if , then .
- To solve an equation, do the same to both sides: from , subtract to get , then divide by to get .
Function Machines
A function machine takes a number in, does the same thing to it every time, and gives a number out. The number that goes in is the input, what the machine does is its rule, and the number that comes out is the output.
A rule can have more than one step. The machine below multiplies its input by , then subtracts . If the input is called and the output , the machine turns into .
Using a function machine
Forwards: to find the output, put the input through the steps in order.
Backwards: to find the input from an output, undo the steps with inverse operations, starting with the last step. Adding and subtracting undo each other; multiplying and dividing undo each other.
Example 1: Working Forwards
A function machine has the rule "multiply by , then subtract ". Find the output when the input is
(a) (b) (c) (d)
Solution
Multiply by first, then subtract .
(a) , then .
(b) , then .
(c) , then .
(d) , then .
The outputs are (a) , (b) , (c) and (d) .
Example 2: Working Backwards
The same machine, "multiply by , then subtract ", gives an output of . Find the input. Then find the input that gives an output of .
Solution
The last step was "subtract ", so undo it first by adding . Then undo "multiply by " by dividing by .
Start from the output, , and go through the steps backwards. The machine below runs the other way: what comes out at its end is the input.
, then .
Check forwards: , then
For an output of : , then .
Check forwards: , then
Working backwards is the same as solving an equation: here, and .
The input is for an output of , and for an output of .
One Input, Exactly One Output
A function machine always gives the same output for the same input: put in today or tomorrow, and comes out. A relationship that behaves like this is called a function.
Function
A function is a relationship between two variables, and , in which each value of gives exactly one value of . We say that is a function of .
is the input, also called the independent variable. is the output, also called the dependent variable, because its value depends on the value of .
For each value of , the value of that goes with it is its corresponding value.
Two inputs may share an output
In a function, different inputs may give the same output. What is not allowed is one input giving two different outputs.
Example 3: Function or Not?
Which of these are functions? Give a reason for each.
(a) Input: a number. Output: times the number.
(b) Input: a whole number. Output: a whole number that is bigger than it.
(c) The pairs in this table:
| 1 | 2 | 3 | 4 | |
| 7 | 7 | 7 | 7 |
(d) The pairs in this table:
| 1 | 2 | 2 | 3 | |
| 5 | 6 | 8 | 9 |
Solution
(a) Each number has exactly one value of times it: input always gives . A function.
(b) Input could give , , or any whole number bigger than : more than one output. Not a function.
(c) Each input, , , and , gives exactly one output, . The outputs are all the same, but that is allowed. A function.
(d) The input gives two outputs, and . Not a function.
(a) and (c) are functions; (b) and (d) are not.
Four Ways to Show a Relationship
A relationship between two quantities can be shown in four ways. All four show the same relationship; each is useful for a different job. Here is the relationship " is more than ", for and .
1. In words. is more than .
2. As a table of values. The values of go in the first row and the corresponding values of in the second.
| 0 | 1 | 2 | 3 | 4 | |
| 3 | 4 | 5 | 6 | 7 |
3. As ordered pairs, and as their graph. Each column of the table gives one ordered pair : , , , and . Plotting each pair as a point gives the graph of the set of ordered pairs.
4. As an equation. . The equation is the shortest of the four, and it gives for any value of , not only for the five in the table.
The graph shows at a glance what the table only lists: the points lie on a straight line, and each time goes up by , goes up by .
Example 4: From a Rule to a Table, Ordered Pairs and a Graph
A function has the rule "double the input, then add ".
(a) Write the rule as an equation.
(b) Make a table of values for and .
(c) Write the ordered pairs.
(d) Plot the ordered pairs and say what the graph shows.
Solution
(a) "Double the input" is ; "then add " gives . So .
(b) Substitute each value of , putting a negative number in brackets:
:
:
:
: ; : ; :
| −2 | −1 | 0 | 1 | 2 | 3 | |
| −3 | −1 | 1 | 3 | 5 | 7 |
(c) , , , , and .
(d) The values of run from to and the values of from to , so the axes are drawn a little wider than that. To plot , go units to the left of , then units down.
The points lie on a straight line. Each time goes up by , goes up by .
; the ordered pairs are , , , , and , and their graph is a set of points on a straight line.
Graphs of Sets of Ordered Pairs
To draw the graph of a set of ordered pairs, draw and number the two axes so that every pair fits, then plot each pair as a point. Then look at what the graph shows: do the points lie on a straight line or not? As goes up, does go up or down?
Not every relationship gives points on a straight line.
Example 5: On a Straight Line or Not?
Plot the pairs in each table on a grid of its own, and say what each graph shows.
(a)
| 0 | 1 | 2 | 3 | 4 | |
| 6 | 5 | 4 | 3 | 2 |
(b)
| −2 | −1 | 0 | 1 | 2 | |
| 4 | 1 | 0 | 1 | 4 |
Solution
(a) The ordered pairs are , , , and .
The points lie on a straight line going down from left to right: each time goes up by , goes down by .
(b) The ordered pairs are , , , and .
These points do not lie on a straight line. As goes from to , goes down, by and then by ; from to it goes up again, by and then by . Here each value of is multiplied by itself: .
(a) The points lie on a straight line going down from left to right. (b) The points do not lie on a straight line: they go down and then up again.
Many graphs of ordered pairs come from real life: a cost, an amount of water, a temperature. Then the axes are named with the quantities and their units, and one square need not stand for . The question of whether to join the points matters too.
When to join the points
Join the points only when the values in between make sense for both quantities, and the quantity changes steadily between the readings. A time, length, mass, volume or temperature, or a cost worked out from one of these (such as the price of fruit sold by mass), can take any value in between, so when both quantities are of this kind (such as the volume of water in a tank against time) and the change is steady, the points are joined with a straight line.
Do not join them when the quantity across can only be a whole number, such as a number of tickets, pens or people: there is nothing to draw for pens.
Do not join them either when a quantity jumps from one value to the next instead of changing steadily, such as the money in a box that is filled once a week.
Example 6: The Cost of Pens
Pens cost $2 each at the school bookshop. The table shows the cost of different numbers of pens.
| Number of pens, | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Cost, ($) | 2 | 4 | 6 | 8 | 10 |
(a) Plot the pairs and say what the graph shows.
(b) Should the points be joined? Explain.
(c) Use the graph to find the cost of pens, and the number of pens Siti bought for $6.
Solution
(a) Take the number of pens across and the cost up. One square across stands for pen and one square up for $1. The pairs are , , , and .
The points lie on a straight line going up: each extra pen adds $2 to the cost, so .
(b) No. The number of pens is a whole number. There is no cost for pens, so there is nothing to draw between the points.
(c) Follow the dashed guides. Above pens, the point is level with $8 on the cost axis. The point level with $6 is above pens.
(a) The points lie on a straight line. (b) No: a number of pens is a whole number. (c) pens cost $8, and Siti bought pens.
Example 7: Draining a Tank
Mr Tan drains water from a tank. The water drains away steadily, and every minute he records the volume left in the tank.
| Time, (minutes) | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| Volume, (litres) | 40 | 35 | 30 | 25 | 20 | 15 | 10 |
(a) Plot the pairs and say what the graph shows.
(b) Should the points be joined? Explain.
(c) From the graph, how much water is left after minutes? After how many minutes are litres left?
(d) How much water is left after minutes?
Solution
(a) Take the time across and the volume up. One square across stands for minute and one square up for litres. The pairs are , , , , , and .
The points lie on a straight line going down: every minute, litres drain away.
(b) Yes. Time goes on between the readings and the water keeps draining, so every moment in between has a volume. The points are joined with a straight line, drawn with a ruler.
(c) Follow the dashed guides. The point above minutes is level with litres, and the point level with litres is above minutes.
(d) minutes is not in the table, but the joined line gives a reading there. Go up from halfway between and on the time axis to the line, then across: the line is halfway between and litres, at litres. Check: litres drain away each minute, so .
(a) The points lie on a straight line going down. (b) Yes: time and volume take every value in between. (c) litres are left after minutes, and litres are left after minutes. (d) litres.
Common Mistakes
- Writing an ordered pair the wrong way round. The value of comes first: the column , of a table gives , not .
- Leaving out the brackets when substituting a negative number. For and , write , not .
- Working a function machine backwards in the same order. Undo the last step first: for "multiply by , then subtract ", add first, then divide by .
- Thinking that a function cannot give the same output twice. In a table where every value of is , each input still has exactly one output, so it is a function; only one input with two different outputs is not allowed.
- Reading a real-life graph as if every square stood for . Look at the numbers on each axis first: on a graph where one square across is minutes, three squares along is minutes, not .
- Joining the points when the values in between make no sense, such as a number of pens or of people, or when a quantity jumps instead of changing steadily, such as money put into a box once a week.
Practice Questions
Try each question on your own before you open its solution. The questions get harder as you go.
Question 1
A function machine has the rule "multiply by , then add ". Find the output when the input is
(a) (b) (c)
ShowHide solution
(a) , then .
(b) , then .
(c) , then .
(a) (b) (c)
Question 2
A function machine has the rule "subtract , then multiply by ".
(a) Find the output when the input is .
(b) Find the input when the output is .
(c) Find the input when the output is .
ShowHide solution
(a) , then .
(b) The last step was "multiply by ", so undo it first: . Then undo "subtract ": .
Check: , then
(c) , then .
Check: , then
(a) (b) (c)
Question 3
A function machine has the rule "divide by , then add ". Copy and complete the table.
| Input | −4 | 0 | 10 | ? | ? |
|---|---|---|---|---|---|
| Output | ? | ? | ? | 15 | 2 |
ShowHide solution
Forwards, for the first three inputs: divide by , then add .
, then . , then . , then .
Backwards, for the last two outputs: undo "add " first by subtracting , then undo "divide by " by multiplying by .
, then . , then .
Check: , then , and , then
| Input | −4 | 0 | 10 | 18 | −8 |
|---|---|---|---|---|---|
| Output | 4 | 6 | 11 | 15 | 2 |
The missing outputs are , and ; the missing inputs are and .
Question 4
Which of these are functions? Give a reason for each.
(a) The pairs in this table:
| 1 | 2 | 3 | 4 | |
| 3 | 3 | 5 | 5 |
(b) The pairs in this table:
| 1 | 1 | 2 | 3 | |
| 2 | 4 | 6 | 8 |
(c) Input: a number. Output: the number that is less than it.
(d) Input: a number. Output: a number that is more or less than it.
ShowHide solution
(a) Each input gives exactly one output. The inputs and share the output , which is allowed. A function.
(b) The input gives two outputs, and . Not a function.
(c) Each number has exactly one number less than it: always gives . A function.
(d) The input could give or : two outputs. Not a function.
(a) and (c) are functions; (b) and (d) are not.
Question 5
Copy and complete the table of values for . Then write the ordered pairs.
| −2 | −1 | 0 | 1 | 2 | |
| ? | ? | ? | ? | ? |
ShowHide solution
:
:
:
: ; :
| −2 | −1 | 0 | 1 | 2 | |
| −8 | −5 | −2 | 1 | 4 |
The ordered pairs are , , , and .
Question 6
A relationship is given by the ordered pairs , , , and .
(a) Show the pairs in a table of values.
(b) Plot the pairs and say what the graph shows.
(c) Describe the rule in words, then write it as an equation.
ShowHide solution
(a) The first number of each pair goes in the row and the second in the row.
| −1 | 0 | 1 | 2 | 3 | |
| 4 | 3 | 2 | 1 | 0 |
(b)
The points lie on a straight line going down from left to right: each time goes up by , goes down by .
(c) In every pair, and add up to . In words: is minus . As an equation, .
Check with the first and last pairs: gives , and gives
The points lie on a straight line going down from left to right; the rule is " is minus ", that is, .
Question 7
Plot the pairs in each table on a grid of its own. Say whether the points lie on a straight line, and how changes as goes up.
(a)
| −2 | −1 | 0 | 1 | 2 | |
| −5 | −2 | 1 | 4 | 7 |
(b)
| 0 | 1 | 2 | 3 | 4 | |
| 1 | 2 | 4 | 7 | 11 |
ShowHide solution
(a) The ordered pairs are , , , and .
The points lie on a straight line going up from left to right: each time goes up by , goes up by .
(b) The ordered pairs are , , , and .
These points do not lie on a straight line. Each time goes up by , goes up by , then , then , then : the steps get bigger, so the points bend upwards more and more steeply.
(a) The points lie on a straight line going up; goes up by each time. (b) The points do not lie on a straight line; goes up by more at each step.
Question 8 (Setting: Sharing a Pizza)
Ali and his friends share the cost of a $12 pizza equally. The table shows the cost for each person.
| Number of people | 1 | 2 | 3 | 4 | 6 |
|---|---|---|---|---|---|
| Cost per person ($) | 12 | 6 | 4 | 3 | 2 |
(a) Plot the pairs and say whether the points lie on a straight line.
(b) Should the points be joined? Explain.
(c) Use the graph to find how much each person pays when people share, and how many people share when each pays $2.
ShowHide solution
(a) Take the number of people across and the cost per person up. One square across stands for person and one square up for $1. The pairs are , , , and .
The points do not lie on a straight line. From to people the cost per person falls by $6, from to people by $2, and from to people by $1: the falls get smaller and smaller.
(b) No. The number of people is a whole number; there is nothing to draw for people.
(c) Follow the dashed guides. The point above people is level with $3, and the point level with $2 is above people.
(a) The points do not lie on a straight line. (b) No: a number of people is a whole number. (c) Each person pays $3 when people share, and people share when each pays $2.
Question 9 (Setting: A Hot Day at School)
Priya records the temperature in her school garden every hour, starting at 8 a.m. Between 1 p.m. and 2 p.m. a shower of rain cools the air.
| Time after 8 a.m., (hours) | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| Temperature, (°C) | 26 | 27 | 30 | 31 | 32 | 32 | 30 |
(a) Plot the pairs . Do the points lie on a straight line?
(b) What was the highest temperature, and at what times was it recorded?
(c) Between which two readings did the temperature rise the most?
(d) Is the temperature a function of the time? Explain.
ShowHide solution
(a) Take the time across and the temperature up. One square across stands for hour and one square up for °C. The temperature axis starts at °C, not at , so that the points are spread out and easy to read. The pairs are , , , , , and .
The points do not lie on a straight line. The temperature rises by , , and °C, stays the same for an hour, then falls by °C.
(b) The highest points are and . The highest temperature was °C, recorded and hours after 8 a.m., that is, at 12 noon and at 1 p.m.
(c) The biggest rise, °C, is from °C to °C, between and : between 9 a.m. and 10 a.m.
(d) Yes. At each time there is exactly one temperature. Two times, and , share the temperature °C, which is allowed in a function.
(a) No. (b) °C, at 12 noon and at 1 p.m. (c) Between 9 a.m. and 10 a.m. (d) Yes: each time has exactly one temperature.
Question 10 (Setting: A Burning Candle)
In a Science lesson, Ali lights a candle and measures its height every minutes. The candle burns down steadily.
| Time, (minutes) | 0 | 10 | 20 | 30 | 40 | 50 |
|---|---|---|---|---|---|---|
| Height, (cm) | 15 | 13 | 11 | 9 | 7 | 5 |
(a) Plot the pairs , taking one square across for minutes and one square up for cm, and say what the graph shows.
(b) Should the points be joined? Explain.
(c) From the graph, what is the height after minutes? After how many minutes is the height cm?
(d) Use the joined line to find the height after minutes.
(e) If the candle keeps burning in the same way, after how many minutes will it have burnt down completely?
ShowHide solution
(a) The pairs are , , , , and . Each minutes is two squares across.
The points lie on a straight line going down: every minutes the candle gets cm shorter.
(b) Yes. Time and height take every value in between the readings, and the candle burns down steadily, so the points are joined with a straight line, drawn with a ruler.
(c) Follow the dashed guides. The point above minutes is level with cm, and the point level with cm is above minutes.
(d) minutes is halfway between and minutes. Go up from on the time axis to the line, then across: the height is cm, halfway between cm and cm.
(e) The candle loses cm every minutes. It starts cm tall, and , so it burns down completely after lots of minutes, that is, after minutes.
(a) The points lie on a straight line going down. (b) Yes: time and height take every value in between, and the candle burns steadily. (c) cm; after minutes. (d) cm. (e) After minutes.
Question 11 (Setting: Buying Durians)
At a fruit stall in Geylang, durians are sold at $10 per kilogram. The table shows the cost of durians of different masses.
| Mass, (kg) | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Cost, ($) | 10 | 20 | 30 | 40 |
(a) Plot the pairs , taking one square across for kg and one square up for $5.
(b) Should the points be joined? Explain.
(c) Use the graph to find the cost of a durian of mass kg.
(d) Siti pays $35 for a durian. Use the graph to find its mass.
ShowHide solution
(a) The pairs are , , and .
The points lie on a straight line going up: each extra kilogram costs $10 more.
(b) Yes. A durian can have any mass in between, such as kg, and every kilogram costs the same, so the cost goes up steadily with the mass. The points are joined with a straight line.
(c) Go up from kg, halfway between and , to the line, then across: the cost is $25.
(d) Go across from $35, halfway between $30 and $40, to the line, then down: the mass is kg.
(a) The points lie on a straight line going up. (b) Yes: mass takes every value in between, and the cost goes up steadily. (c) $25. (d) kg.
Question 12 (Setting: Saving for the Zoo)
Wei Ming is saving for his class trip to the Singapore Zoo. He has $10 in his money box, and at the end of every week he puts in another $5. After weeks there are dollars in the box. He plots the pairs for to , but one of his points is plotted wrongly.
(a) Make a table of values of for and .
(b) Which point is plotted wrongly? Give its correct coordinates.
(c) Should the points be joined? Explain.
(d) If he keeps saving in the same way, how much will be in the box after weeks?
(e) After how many weeks will there first be $60 in the box?
ShowHide solution
(a) He starts with $10 and adds $5 each week.
| Number of weeks, | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Amount, ($) | 10 | 15 | 20 | 25 | 30 | 35 |
(b) Read each point off the graph and compare it with the table: , , , and agree with it. is at , but after weeks there is $25 in the box. should be at .
(c) No. The amount does not change steadily: it stays the same for the whole week, then jumps by $5 when he puts the money in. So the points are not joined.
(d) In weeks he puts in lots of $5, which is $40. With the $10 he started with, there will be $50 in the box.
(e) He needs $60 − $10 = $50 more. Each week adds $5, and , so there is first $60 in the box after weeks.
(a) , , , , , . (b) ; it should be at . (c) No: the amount jumps once a week. (d) $50. (e) After weeks.
Key Points
- A function machine applies the same rule to every input; to work backwards, undo the steps with inverse operations, last step first.
- A function gives exactly one value of for each value of ; two inputs may share an output.
- A relationship can be shown in words, as a table of values, as ordered pairs and their graph, and as an equation.
- In an ordered pair the value of comes first; each column of a table of values gives one pair.
- The graph of a set of ordered pairs is the set of plotted points; it shows whether they lie on a straight line, and whether goes up or down as goes up.
- On a real-life graph, name each axis with its quantity and unit, and read what one square stands for on each axis.
- Join the points only when the values in between make sense for both quantities and the change between readings is steady (time, length, mass, volume, temperature, or a cost by mass); do not join them for a whole number of things (pens, people) or for a quantity that jumps.