A partly uncovered wall painting: a woman in a yellow head covering, her hand at her breast, and a hand raised above her at the right. Along the bottom the painting breaks off into a band of dark red.
The People's Share
The Restoration Series · Quiz 41

One In, One Out

What makes a relationship a function, and how to match a table or a graph to its rule
Plate: a woman, from a wall painting in the Igreja do Colégio, the church of Saint John the Evangelist at the old Jesuit college in Funchal, on the island of Madeira, Portugal. Tempera on plaster, painted between about 1680 and 1850. The photograph records a prospeção, restorers from the Junqueira 220 workshop uncovering a painting that had been hidden under later layers; it was taken on November 23, 2006, by DRAC, the regional office for cultural affairs of Madeira. Public domain, from Wikimedia Commons.
The Guide

Before you begin

rule in out
A number goes in, the rule does something to it, and one number comes out. That is the whole of what a function is.

This quiz finishes family 14. Lines on the Grid already teaches most of it: where a point lives on the grid, what f(x) means, how to work out f(5), and how to find the input that gives a stated output. If you have not been through that, go there first. If the grid itself is new, start one step earlier, with The Coordinate Plane.

Two things are left, and they are what this quiz is for. The first is deciding whether a relationship is a function at all. The second is matching: given a table or a graph, finding the rule that produced it, or picking it out from a list of rules.

Neither needs much arithmetic. Both need you to check carefully rather than guess, and both have one idea that, once you have it, makes most of the questions short.

What a function is

A function is a rule that gives exactly one output for each input.

A vending machine is the plainest picture of one. You press B4, and you get whatever is in B4. Every time you press B4, you get the same thing. If B4 sometimes gave you chips and sometimes a can of soda, you could not use the machine; you would never know what pressing a button meant. A function is a rule you can rely on in exactly that way.

The rules in the rest of family 14 are all functions. f(x) = 2x + 1 takes 3 and gives 7, every time. It never gives 7 on Monday and 8 on Tuesday.

The one thing that is not allowed

There is exactly one way for a relationship to fail to be a function: one input giving two different outputs.

What is allowed surprises people, so it is worth saying just as clearly: two inputs can share an output. In the vending machine, B4 and B5 could both hold the same brand of chips. That is fine; each button still gives one thing. What would break it is one button giving two things.

So when you check whether something is a function, you are looking for one thing only: an input that turns up twice with different outputs. Repeated outputs do not matter at all.

Checking a table or a list of pairs

Relationships are often given as a table, or as a list of pairs written (input, output). Look down the input column for any number that appears more than once. If none repeats, it is a function. If one does, look at its outputs: if they are the same, that is fine; if they differ, it is not a function.

input x1232
output y4685

The input 2 appears twice, once with 6 and once with 5. One input, two outputs: not a function.

input x1234
output y6688

No input repeats, so this is a function. The outputs 6 and 8 each appear twice, and that does not matter.

Mapping diagrams

A mapping diagram draws the same thing with arrows: inputs in one oval, outputs in the other, and an arrow from each input to its output. The check becomes a matter of counting arrows.

1 2 3 4 5 7 9 inputoutput a function 3 and 4 share an output, and that is allowed 1 2 3 5 7 8 9 inputoutput not a function 2 has two outputs, and that is not allowed
Count the arrows leaving each input. One each: a function. Any input with two: not.

Every input must have exactly one arrow leaving it. Two arrows arriving at the same output is fine. Two arrows leaving the same input is not.

On a graph: the vertical line test

On a graph the input is along the bottom and the output is up the side. A single input is a single position along the bottom, and everything directly above or below it is an output for that input. So: draw a vertical line through the graph, anywhere. If it can ever cross the graph more than once, it is not a function.

a function: the line meets it once not a function: it meets it twice
The vertical line test. A vertical line is one input, so if it can cross the graph twice, that input has two outputs.

On the left, wherever you put the vertical line, it meets the curve once, so each input has one output. On the right, the line meets the circle twice: the input 1.6 has one output above the axis and another below it. A circle is never a function, and neither is any shape that turns back on itself sideways.

Why the line is vertical. Because a vertical line is one input. Every point on it has the same x. If a horizontal line crosses the graph twice, that is two different inputs with the same output — which is allowed. A U-shaped curve fails a horizontal test and passes the vertical one, and it is a function. The test has to be the vertical one, because the rule is about inputs.

Matching a table to its rule: check every row

The most common matching question gives you a table and several rules, and asks which rule made the table. The method is simple and has one trap.

The method: put each input into each rule and see whether the output comes out right.

The trap: checking only the first row. One row fits a great many rules. Here is a table and three candidates:

x0123
y1357
y = x + 11234
y = x² + 112510
y = 2x + 11357

All three rules get the first row right. Only y = 2x + 1 gets every row right, so that is the rule. y = x² + 1 even gets a second row right by accident, which is exactly why one or two rows prove nothing. A rule matches a table only if it matches every row.

Finding the rule when it is a straight line

Sometimes there are no candidates; you are asked to find the rule yourself. When the table comes from a straight line, there is a quick way, and it rests on one thing to look at: how much y changes each time x goes up by 1.

x01234
y−214710
change+3+3+3+3

Every time x goes up by 1, y goes up by 3. That steady change is the slope, the m in y = mx + b. And the output when x is 0 is the starting value, the b: here, −2. So the rule is y = 3x − 2.

Then check it on a row you did not use: when x is 4, 3 × 4 − 2 = 10. It matches.

Two things can make this harder, and both are easy to deal with.

The x values go up by more than 1. If x goes 0, 2, 4, 6 and y goes up by 6 each time, then y goes up by 6 for every 2 of x, which is 3 for every 1. Divide the change in y by the change in x. That is what slope has always meant: rise over run.

There is no row for x = 0. Then work backward. If x = 1 gives 5 and the slope is 3, then x = 0 must give 5 − 3 = 2, and that is b.

When the changes are not the same

If the change in y is not steady — up by 3, then by 5, then by 7 — the table does not come from a straight line, and y = mx + b cannot describe it. Something else is going on, often a square. The table 1, 4, 9, 16 goes up by 3, 5, 7: those are the squares, y = x².

This is worth knowing for its own sake, because a question will sometimes simply ask whether a table is linear. Linear means a straight line, and a straight line means the changes are steady. Getting bigger is not enough; it has to get bigger by the same amount each step.

Matching a graph to its rule

For a straight-line graph, read the rule off in two steps.

-3 -2 -1 1 2 3 4 -3 -2 -1 1 2 3 4 5 6 7 8 across 2 up 4 (0, 1) (2, 5) crosses the y-axis at 1; up 4 for every 2 across, so the slope is 2; y = 2x + 1
Where it crosses the vertical axis gives b. Up divided by across gives the slope.

First, where does it cross the vertical axis? That is b. Here it is 1.

Second, what is the slope? Find two points where the line passes exactly through a corner of the grid — here (0, 1) and (2, 5). Count how far across and how far up from one to the other: 2 across and 4 up. Up divided by across is 4 ÷ 2 = 2. If the line goes down from left to right, the slope is negative.

So the rule is y = 2x + 1. Lines on the Grid teaches slope in much more detail if this is new.

When the question gives you a list of rules to choose from, there is an even faster way: take a point you can read exactly off the graph and try it in each rule. Any rule that does not produce that point is out. Usually one point leaves one survivor. If two survive, try a second point.

The guard

Not a function means one input with two outputs. Nothing else. Repeated outputs are fine.

The test on a graph is a vertical line, because a vertical line is one input.

Check every row of a table, not the first one. The wrong answers in a matching question are chosen to fit the first row.

Steady change means a straight line. Divide the change in y by the change in x for the slope, and find b where x is 0.

Try a point. Any rule that fails one point from the graph or one row of the table is wrong, however good it looked.

Worked Examples

Three to study before you start

Example 1 · Function or not

Which of these are functions? (a) the pairs (1, 3), (2, 5), (3, 5), (4, 9).  (b) the pairs (5, 1), (6, 2), (5, 3), (7, 4).

Look only at the first number of each pair, the input, and ask whether any repeats.

(a) The inputs are 1, 2, 3, 4. None repeats. It is a function. The output 5 appears twice, for 2 and 3, and that is allowed.

(b) The input 5 appears twice, once with the output 1 and once with the output 3. One input, two outputs. It is not a function.

Notice that you never had to look for a rule. Whether something is a function is only a question of whether any input has two outputs.

Example 2 · Finding the rule from a table

Find the rule for this table: x is 1, 2, 3, 4 and y is 5, 9, 13, 17.

The changes: 9 − 5 = 4, 13 − 9 = 4, 17 − 13 = 4. Steady, so it is a straight line, and since x goes up by 1 each time, the slope is 4.

There is no row for x = 0, so work backward one step: when x is 1, y is 5, so when x is 0, y is 5 − 4 = 1. That is b.

The rule is y = 4x + 1. Check it on the last row: 4 × 4 + 1 = 17. It matches.

Example 3 · Choosing a rule by trying points

A straight line passes through (0, −3) and (2, 1). Which rule is it: y = 2x − 3, y = −3x + 2, or y = 4x − 7?

Try the point (2, 1) in each. 2 × 2 − 3 = 1, which works. −3 × 2 + 2 = −4, which does not, so that rule is out. 4 × 2 − 7 = 1, which also works.

Two rules survived the first point, which happens. Try the second point, (0, −3). 2 × 0 − 3 = −3, which works. 4 × 0 − 7 = −7, which does not.

So the rule is y = 2x − 3. One point narrowed it down; the second settled it. That is the same lesson as the table: one agreement proves nothing, and you keep checking until only one is left.

The Quiz · Ten Questions

Now you

Work on paper. No calculator is needed. For every matching question, check your rule against every row or every point you can read, not just one. Questions 6 and 10 have two parts.

  1. Is this relationship a function? Say why or why not.  (2, 5), (3, 7), (2, 9), (4, 11)
  2. Is this relationship a function? Say why or why not.  (1, 4), (2, 4), (3, 4), (4, 4)
  3. Find the rule for this table.
    x0123
    y371115
  4. Which rule produced this table?
    x1234
    y251017
    • A) y = 3x − 1
    • B) y = x² + 1
    • C) y = 2x + 1
    • D) y = x + 1
  5. Write the rule for the line in this graph.
    -2 -1 1 2 3 4 -5 -4 -3 -2 -1 1 2 3 4 5 6 7
  6. Use the four graphs below. (a) Which of them are not functions? (b) For one of them, say how you know.
    A B C D

Reading A reading rest stop, for the stubborn ones.

Ten minutes with the last section of this page — The Company, below the answer key — before you finish the quiz. It is about a New York office in the Depression where hundreds of people who had been out of work were hired to calculate tables of functions by hand, and how they checked their own work with the same steady-change idea you have just learned. It will not help you with question 7. It may change what you picture when you hear the word computer.

No photograph at this rest stop. The graphs in this quiz are all above.

  1. Find the rule for this table.
    x0246
    y5111723
  2. Keisha looks at this table and says it must be a straight line, because y gets bigger every time x does. Is she right? Explain, and find the rule.
    x1234
    y14916
  3. Which rule matches this graph?
    -2 -1 1 2 3 4 -3 -2 -1 1 2 3 4 5 6 7
    • A) y = 2x + 4
    • B) y = −2x + 4
    • C) y = −½x + 4
    • D) y = 4x − 2
  4. A phone plan’s monthly cost depends on the minutes used, as in this table.
    minutes0100200300
    cost ($)20283644
    (a) Write a rule for the cost, C, in terms of the minutes, m. (b) What would 450 minutes cost?
Answer Key

Check your work

1 No. The input 2 has two outputs, 5 and 9.
Look at the first number of each pair. 2 appears twice, once paired with 5 and once with 9. One input with two different outputs is the one thing a function cannot have. The other inputs, 3 and 4, are fine, but one failure is enough.
2 Yes. Every input has exactly one output; they just all happen to be 4.
No input repeats: 1, 2, 3, 4. The outputs are all the same, and that is allowed — it is two inputs sharing an output, four times over. This is the question that catches people, because it looks strange. It is the rule y = 4, whose graph is a flat horizontal line, and a vertical line crosses a flat line exactly once.
3 y = 4x + 3
The changes are 4, 4, 4: steady, and x goes up by 1, so the slope is 4. When x is 0, y is 3, so b is 3. Check the last row: 4 × 3 + 3 = 15.
4 B) y = x² + 1
Check every row: 1 + 1 = 2, 4 + 1 = 5, 9 + 1 = 10, 16 + 1 = 17. All four match. A) gives 2, 5, 8, 11 — right for the first two rows and wrong after that, which is exactly the trap of stopping early. D) is right for the first row only. C) is right for the second row only. The changes in the table are 3, 5, 7, not steady, which tells you before you try anything that no straight-line rule (A, C or D) can be the answer.
5 y = 3x − 3
The line crosses the vertical axis at −3, so b = −3. From the marked point (0, −3) to (2, 3) is 2 across and 6 up, and 6 ÷ 2 = 3, so the slope is 3. The line rises from left to right, so the slope is positive. Check with the second point: 3 × 2 − 3 = 3.
6 (a) B and D    (b) a vertical line crosses each of them twice
(a) A is a straight line and C is a U opening upward; any vertical line crosses each of them once, so both are functions. B is a circle and D is a U turned on its side; a vertical line through either can cross it twice, so neither is a function. (b) For B: a vertical line through the middle of the circle meets it at the top and the bottom, so that one input has two outputs. D fails the same way — it is the shape of C turned sideways, and turning it sideways is exactly what makes it fail. C and D are the same curve; one is a function and one is not, and the only difference is which way it faces.
7 y = 3x + 5
The changes in y are 6, 6, 6, steady. But x goes up by 2 each time, not 1, so the slope is 6 ÷ 2 = 3. When x is 0, y is 5, so b = 5. Check: 3 × 6 + 5 = 23. If you wrote y = 6x + 5, you took the change in y without dividing by the change in x; test it on the second row and it gives 17 instead of 11.
8 No. The changes are 3, 5, 7 — not steady — so it is not a straight line. The rule is y = x².
Getting bigger is not what makes a table linear. Getting bigger by the same amount each time is. Here y rises by 3, then 5, then 7, and a straight line cannot do that. The outputs 1, 4, 9, 16 are the squares of the inputs, so the rule is y = x², whose graph is a curve. Keisha has noticed something true — the table does increase — and drawn the wrong conclusion from it, which is the most common way to be wrong about a table.
9 B) y = −2x + 4
The line crosses the vertical axis at 4, so b = 4, which rules out D. From (0, 4) to (2, 0) is 2 across and 4 down, so the slope is −4 ÷ 2 = −2. A) has the right size of slope but the wrong sign: the line falls, so the slope must be negative. C) has the division upside down, across over up. The fast check: put the point (2, 0) into each rule. Only B gives 0: −2 × 2 + 4 = 0.
10 (a) C = 0.08m + 20    (b) $56
(a) The cost goes up $8 for every 100 minutes, which is 8 ÷ 100 = $0.08 a minute. That is the slope. At 0 minutes the cost is $20, the monthly fee you pay whatever you use. So C = 0.08m + 20. Check: 0.08 × 300 + 20 = 24 + 20 = 44. (b) 0.08 × 450 = 36, and 36 + 20 = 56. This is question 7 again in working clothes: steady change in the outputs, inputs going up by more than 1, divide to get the rate. The b here is not just a number in a formula; it is the part of the bill you pay for nothing.
  Reading your results
Eight to ten: family 14 is done, and with it the last of the algebra on the test. Five to seven: sort the misses. If 1, 2 or 6 went wrong, reread the section on the one thing that is not allowed and say it aloud: one input, two outputs. If 3, 5, 7, 9 or 10 went wrong, the fault is almost always the slope — not dividing by the change in x, or missing a minus sign on a falling line — and Lines on the Grid has more practice on exactly that. If 4 or 8 went wrong, the lesson is to check every row. Under five: go through Lines on the Grid first, then come back to this quiz; it assumes that one.
The Company · An Interlude

When computers were people

In 1938, in the tenth year of the Depression, the federal government opened an office in New York City to make tables.

The tables were of functions: long printed lists giving the value of some rule for thousands of inputs, one row after another, to many decimal places. Engineers, navigators, physicists and statisticians needed them the way a carpenter needs a ruler. Before electronic computers, if you needed the value of a function you did not calculate it; you looked it up in a book of tables. The trouble was that many of the tables had never been made, and the ones that had were full of errors.

The office was called the Mathematical Tables Project, and it was paid for by the Works Progress Administration, the New Deal program that put unemployed people to work on public projects — roads, parks, murals, guidebooks, and, here, arithmetic. At its height it employed several hundred people. Most were not mathematicians. They had been clerks, salesmen, bookkeepers, people who had lost their jobs and taken the one that was offered. The job title was computer. A computer was a person who computed.

The work was organized by two mathematicians. Arnold Lowan directed the project. Gertrude Blanch planned the mathematics. She had come to America from Poland as a child, worked for years as an office clerk, and earned her doctorate at Cornell in 1935, only to find no university job in the Depression. What she did at the project was ingenious and humane at once: she broke each hard calculation down into long chains of simple steps, so that people who could add and subtract accurately, and nothing more, could produce values that were right to many decimal places. The difficult part was in the planning. The labor was spread across many hands.

And they checked the results with the idea in the middle of this quiz.

When a function is smooth, its values in a table change steadily. You saw the simplest case above: a straight line changes by the same amount every step. A curve does not change by the same amount, but the changes in the changes are steady — the table 1, 4, 9, 16 goes up by 3, 5, 7, and those go up by 2, 2, 2 — and for the smooth functions the project worked on, taking changes of changes a few times over settles into a column of small, steady numbers. A copying mistake, a slipped digit, a wrong subtraction, breaks that smoothness. It shows up as a sudden jump in a column of differences that should have been calm. So the finished tables were checked by differencing, row by row, and an error announced itself.

The project published volume after volume of tables. When the WPA ended, the work was taken over by the National Bureau of Standards, and it led in the end to a single reference book, the Handbook of Mathematical Functions, published in 1964 and used by scientists and engineers for decades afterward. Electronic computers made the human ones unnecessary within a generation. The tables they made went on being used long after.

What to keep. The word computer named a job before it named a machine, and the job was done by people who had been thrown out of work and were given this instead. It was done well because someone designed it so that ordinary care, applied steadily, would produce extraordinary accuracy — and because the method of checking was built into the mathematics itself. When you check a table row by row in this quiz, you are doing their job, in the way they did it.

Source: David Alan Grier, When Computers Were Human (Princeton University Press, 2005), which tells the history of the Mathematical Tables Project in detail.

Where this goes. That is family 14 complete. Next is Quiz 42, Room for Both, on lines, slope and systems, the last family to get a quiz of its own. The family’s page is Family 14, and Lines on the Grid is the room to go back to for the grid, slope and function notation.