awesome-everything RU
↑ Back to the climb

Mathematics from zero

What is a function

Crux A function is a rule that takes an input and returns exactly one output — the same input always producing the same result.
◷ 15 min

A vending machine: press B3, a particular soda drops out. Press B3 again — the same soda, every time. Press A1 — a different snack, but again always the same one. A machine where each button has one fixed result is exactly what mathematics calls a function.

Goal

After this lesson you can say what a function is, name its input and output, use function notation, and explain the one rule every function must obey: one input, one output.

1

A function is a rule that turns an input into an output. You put a number in, the rule does something to it, and a number comes out. The number you put in is the input; the number that comes out is the output. A function is the machine in between — a fixed rule connecting the two.

2

Function notation names the rule and shows the input. We write a function with a letter, often f, and put the input in brackets. f(3) means “feed the input 3 into the rule f”. If f is the doubling rule, then f(3) = 6, f(5) = 10. The expression inside the brackets is the input; the result is the output.

3

The one rule: each input has exactly one output. Feed the same input in twice and a function must hand back the same output both times. A machine that sometimes gave one soda and sometimes another for button B3 would not be a function. “Same input, same output — always” is the rule that makes something a function.

4

A function does not have to be a formula. The doubling rule is a formula, 2 × n. But a function can also be a plain table: input 1 → output 7, input 2 → output 7, input 3 → output 2. As long as every input has exactly one output, it is a function — the rule can be a formula, a table, or even a picture.

Worked example

A function f follows the rule “add 5 to the input”. Find f(3) and f(10).

The rule is: whatever number comes in, add 5 to it. Write it as f(n) = n + 5.

For f(3): the input is 3. Add 5: 3 + 5 = 8. So f(3) = 8.

For f(10): the input is 10. Add 5: 10 + 5 = 15. So f(10) = 15.

Notice that feeding 3 in again would give 8 again — the same input always yields the same output. That consistency is what makes “add 5” a function.

Why this works

Why insist on exactly one output per input? Because a function is meant to be reliable — you ask it a question and trust the answer. If f(3) could be 8 today and 2 tomorrow, the rule would predict nothing. The one-output rule is what lets you build on a function: every later step can depend on its answer being fixed.

Common mistake

A common mistake is thinking a function must be a formula like 2n + 1. Formulas are the most common functions, but the real definition is broader: any rule pairing each input with exactly one output. A lookup table is a function. The formula is one way to write a function, not the definition of one.

Practice 0 / 5

The function f(n) = n + 5. Find f(3). Type the output.

The function f(n) = 2n. Find f(7). Type the output.

The function f(n) = n − 1. Find f(10). Type the output.

The function f(n) = 3n. Find f(0). Type the output.

The function f(n) = 2n. Find f(4). Type the output.

Check yourself
Quiz

What rule must every function obey?

Recap

A function is a rule that takes an input and returns an output. Function notation, like f(3), names the rule and shows the input in brackets. The one rule every function must obey is that each input has exactly one output — the same input always gives the same result. A function can be a formula, a table, or a picture; the formula is just one way to write it.

Continue the climb ↑Linear functions
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources2
expand
  1. 01
  2. 02

Trademarks belong to their respective owners. Editorial reference only.