Input And Output In Math: Function Machines Explained
The short version
- In math, the input is the number you start with and the output is the number you get after applying a rule. If the rule is “add 5” and the input is 3, the output is 8.
- Kids first meet input and output through function machines and input/output tables in grades 3 to 5. Later the same idea becomes functions, written as f(x), with x as the input.
- To find a table’s rule, check how much the output changes each time the input goes up by 1. That change is usually what you multiply by. Then adjust with an add or subtract.
- To find an input from an output, run the machine backward: undo each step in reverse order.
- In a function, each input gives exactly one output. Two different inputs can share an output, but one input can’t have two.
Input and output in math describe what goes into a rule and what comes out. The input is the starting number, the rule tells you what to do to it, and the output is the result. With the rule “multiply by 2,” an input of 6 gives an output of 12.
That’s the idea behind the input/output tables in elementary school and the functions kids study in algebra. Below we show how function machines work, how to fill in and figure out input/output tables, how to work backward, and how the same idea turns into f(x). There are practice problems with answers at the end.
What is an input in math?
An input is the value you feed into a rule, equation or function. It’s the number you choose or are given at the start. In algebra the input is usually called x, and it’s also known as the independent variable, because you pick it freely.
The output is what the rule produces. It depends on the input, so it’s also called the dependent variable, and in algebra it’s often y or f(x).
| Term | Other names | Example with rule “add 4” |
|---|---|---|
| Input | x, independent variable, domain value | 10 |
| Rule | Function, pattern, equation | add 4 |
| Output | y, f(x), dependent variable, range value | 14 |
How a function machine works
A function machine is a picture of a box. A number goes in one side, the machine does something to it, and a new number comes out the other side. It gives younger kids a concrete way to think about rules before any algebra shows up.
One step machine. Rule: × 3
Input 4 → 4 × 3 = 12 → Output 12
Two step machine. Rule: × 3, then + 1
Input 4 → 4 × 3 = 12 → 12 + 1 = 13 → Output 13
Order matters in a two step machine. “Add 1, then multiply by 3” gives a different answer for the same input: (4 + 1) × 3 = 15.
Input and output tables
An input/output table (also called an in/out table or function table) lists several inputs next to their outputs. Homework usually asks for one of three things: fill in missing outputs, fill in missing inputs, or figure out the rule.
Filling in outputs
Rule: × 3 + 1
| Input | Work | Output |
|---|---|---|
| 1 | 1 × 3 + 1 | 4 |
| 2 | 2 × 3 + 1 | 7 |
| 3 | 3 × 3 + 1 | 10 |
| 4 | 4 × 3 + 1 | 13 |
Finding the rule
This is where most kids get stuck. Here’s a method that works for most elementary and middle school tables.
| Input | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Output | 5 | 9 | 13 | 17 | 21 |
Step 1: Check how much the output changes when the input goes up by 1. Here it’s 9 – 5 = 4, 13 – 9 = 4, and so on. The output grows by 4 each time.
Step 2: That suggests “multiply by 4.” Try it on the first input: 1 × 4 = 4. The output is 5, so you’re 1 short.
Step 3: Add the fix: × 4 + 1.
Step 4: Test it on another row: 5 × 4 + 1 = 21. It matches.
Always test the rule on at least two rows. Looking only at the first pair (1 → 5) might make a kid say “add 4,” which fails for 2 → 9.
When the inputs skip
If the inputs jump by 2 or more, divide the output change by the input change. Inputs 2, 4, 6 with outputs 7, 13, 19: the outputs grow by 6 while the inputs grow by 2, and 6 ÷ 2 = 3. So try × 3: 2 × 3 = 6, and 7 – 6 = 1. The rule is × 3 + 1. Check: 6 × 3 + 1 = 19.
Working backward from an output
Sometimes you know the output and need the input. Run the machine in reverse: undo the last step first, using the opposite operation.
Rule: × 2, then – 3. The output is 15. What was the input?
Undo “- 3” by adding 3: 15 + 3 = 18
Undo “× 2” by dividing by 2: 18 ÷ 2 = 9
Input: 9. Check: 9 × 2 – 3 = 18 – 3 = 15.
This is exactly how kids will later solve two step equations like 2x – 3 = 15. Working backward in a function machine is the same skill with a friendlier picture.
From input and output to functions
In middle school, the machine gets a name. The rule “× 2 + 5” is written as a function:
f(x) = 2x + 5
The x inside the parentheses is the input. f(x) is the output. To evaluate it, replace x with the input:
f(3) = 2 × 3 + 5 = 11
f(0) = 2 × 0 + 5 = 5
f(-2) = 2 × (-2) + 5 = 1
Each input and output pair is also a point on a graph: (3, 11), (0, 5) and (-2, 1). The input goes first as the x coordinate, and the output is the y coordinate.
What makes something a function
A rule is a function if each input gives exactly one output. A vending machine is a good picture: press B4 and you always get the same snack. If B4 sometimes gave chips and sometimes gave pretzels, it wouldn’t be a function.
Repeated outputs are fine. For f(x) = x², both 3 and -3 give 9. That’s still a function, because each input has only one output.
Common mistakes with input and output
- Building the rule from one row. Any single pair fits dozens of rules. Test your rule on every row.
- Swapping the columns. Some tables run sideways or put the output first. Read the labels before calculating.
- Undoing steps in the wrong order. Working backward means undoing the last step first. For × 2 then – 3, you add 3 before you divide by 2.
- Stopping at “the output goes up by 4.” That’s a pattern in the output column, not a rule connecting input to output. The rule has to turn each input into its output.
- Thinking a repeated output breaks the function. Only one input with two different outputs does that.
Practice problems
1. Rule: add 7. The input is 12. What is the output?
2. Rule: × 5. The output is 45. What was the input?
3. Inputs 2, 4, 6, 8 give outputs 1, 2, 3, 4. What is the rule, and what is the output for an input of 20?
4. Rule: × 3, then – 2. The input is 6. What is the output?
5. Inputs 1, 2, 3, 4 give outputs 3, 5, 7, 9. Find the rule and the output for an input of 10.
6. Rule: × 4, then + 3. The output is 31. What was the input?
7. If f(x) = x² – 1, what is f(5)?
8. A table pairs input 3 with output 7 and also pairs input 3 with output 9. Is it a function?
Answers
1. 19
2. 9, since 45 ÷ 5 = 9.
3. The rule is ÷ 2. An input of 20 gives 10.
4. 16. 6 × 3 = 18, and 18 – 2 = 16.
5. The outputs go up by 2, so try × 2: 1 × 2 = 2, and the output is 3, so add 1. The rule is × 2 + 1. For 10: 10 × 2 + 1 = 21.
6. 7. Undo + 3: 31 – 3 = 28. Undo × 4: 28 ÷ 4 = 7. Check: 7 × 4 + 3 = 31.
7. 24. 5² = 25, and 25 – 1 = 24.
8. No. The input 3 has two different outputs.
What it means if your child is stuck on input and output tables
Input/output tables look like a new topic, but they’re built from older skills. If your child can’t find the rule, check their multiplication facts first. Spotting “× 4 + 1” depends on recognizing 4, 8, 12, 16 as the fours at a glance. A kid still counting on fingers can’t see the pattern because they’re spending all their effort on the arithmetic.
Working backward is the other common wall, and it matters a lot. It’s the same thinking as solving equations, so a gap here tends to show up again in algebra. We explain that chain in Struggling With Algebra? The Real Problem Is Usually Fourth Grade Fractions. For where these skills sit by grade, see Math Skills By Grade Level. Fact fluency comes from short, frequent practice, which we cover in why 20 minutes a day works better than long sessions.
Frequently asked questions
What is the input math definition?
The input is the value that goes into a rule or function. It’s the starting number, often called x or the independent variable.
What is the output in math?
The output is the result you get after applying the rule to the input. It’s often called y, f(x) or the dependent variable.
Is x the input or the output?
In most cases x is the input and y is the output. On a graph, the input is on the horizontal axis and the output is on the vertical axis.
What grade learns input and output tables?
Kids usually see function machines and in/out tables somewhere in grades 3 to 5, as part of work on patterns and rules. Formal functions and f(x) notation typically come in grade 8 and Algebra 1.
How do you find the rule in an input output table?
See how much the output changes each time the input goes up by 1, and try multiplying by that number. Then add or subtract whatever fixes the first row, and test the rule on every other row.
Find the actual gap
If input and output tables are a struggle, the missing piece is often multiplication fluency or the idea of undoing an operation, and those gaps follow kids into algebra. Math Anon begins with a short adaptive assessment that pins down which skills are missing and gives you a written report on what it found.
Then your child gets about 20 minutes of targeted practice a day on exactly those skills, with a weekly progress report so you’re never guessing. The assessment is $49 and is credited back in full on your first month. Start the assessment or see pricing.
