Hide outline
Feedback

Functions As Input-Output Machines

You see a rule written on a card. You can feed in a number, apply the rule, and out comes a new number. The practical question is simple. If you know the rule, can you predict the output for any input without guessing?

Start with a rule you already know how to use. Take the input, double it, then stop. If the input is 77, the output is 1414. If the input is 1212, the output is 2424. Nothing mysterious yet, but this predictability is the whole point. When the same input always gives the same output, you can plan around it.

That is the problem type you are about to get good at. Given a rule, compute outputs quickly and accurately, then describe the rule in a way that works for every input you might try.

Inputs, a rule, and outputs

Think of the rule as a machine with three parts. You choose an input number, the machine applies the rule, and you read the output number. With the Number Doubler, the rule is to multiply by 22.

Try a few inputs and watch the outputs change.

A useful habit is to say the action out loud. For input 55, the machine does 5×25\times2, so the output is 1010. For input 1010, the machine does 10×210\times2, so the output is 2020. The only thing changing is the input. The rule stays fixed.

Golden rule
A function is a rule where each input is paired with exactly one output.

That does not mean the outputs have to be different. It only means the rule cannot give two different outputs for the same input.

Common mistake

A tempting wrong idea is that a function must always make numbers bigger. Doubling does, so it feels true. But a rule like halve the input takes 1010 to 55, and it still behaves like a function because each input still has one determined output.

From repeated calculations to one rule

Look at three specific computations.

23=625=10210=20\begin{aligned} 2\cdot3&=6\\ 2\cdot5&=10\\ 2\cdot10&=20 \end{aligned}

Each line is the same action. Multiply the input by 22. Writing many examples helps you see the pattern, but you do not want to list every possible input one by one.

Instead, you need a way to talk about any input at all. Mathematicians often use a letter like xx to stand for the input number, whatever it happens to be. If the rule is double the input, then the output is 2x2\cdot x, often written as 2x2x.

Test the idea by plugging in the same inputs you tried before and checking that you get the same outputs.

Sign up for free

Generate custom courses on any topic — with hands-on practice, AI guidance, and visuals built in.

Already have an account?