๐Ÿ  Home โ€บ ๐Ÿ“ˆ Linear Functions โ€บ Lesson 1

๐Ÿš€ What Is a Function? โ€” Machines and f(x)

๐Ÿ“– Lesson 1 of 10

๐Ÿ“Œ Key idea of this section

A function is a rule: put a number in, get exactly ONE number out.
We name the machine f and write f(x) for "the output when x goes in."

Imagine a machine with a hopper on top and a chute on the bottom. You drop a number in the top, the machine follows its recipe, and out comes an answer. That machine is a function.

Here's a machine with the recipe "double it, then add 1":

drop in 0 โ†’ out comes 1
drop in 1 โ†’ out comes 3
drop in 2 โ†’ out comes 5
drop in 3 โ†’ out comes 7

The golden property of every function: each input gets exactly ONE output. Drop in 3 a hundred times, and you get 7 a hundred times. The machine never changes its mind.

The vending machine test

A good vending machine is a function: press D4, get the pretzels โ€” every time. A broken machine that sometimes gives pretzels and sometimes cookies for the same button is NOT a function, because one input gives different outputs. One input, one output โ€” that's the law.

The official notation: f(x)

Writing "drop in 3, out comes 7" gets tiring, so mathematicians name the machine (usually f, sometimes g or h) and write:

f(x) = 2x + 1

Read it "f of x equals 2x + 1." It means: the machine f runs the recipe "double the input, then add 1." Then f(4) means "the output when 4 goes in." Watch every step:

Step 1: f(4) = 2 ร— 4 + 1      (replace every x in the recipe with 4)
Step 2: f(4) = 8 + 1          (multiply first โ€” order of operations)
Step 3: f(4) = 9              (add)

Negative inputs are welcome too. Find f(โˆ’1):

Step 1: f(โˆ’1) = 2 ร— (โˆ’1) + 1  (replace x with โˆ’1 โ€” use parentheses!)
Step 2: f(โˆ’1) = โˆ’2 + 1        (2 ร— (โˆ’1) = โˆ’2)
Step 3: f(โˆ’1) = โˆ’1            (climb from โˆ’2 up by 1)

Two more vocabulary words you'll meet everywhere:

The DOMAIN of a function is the set of all allowed inputs.
The RANGE is the set of all outputs it can actually produce.

For f(x) = 2x + 1, any number can be doubled and incremented, so the domain is all real numbers. And any target y can actually be produced (we'll prove this in Lesson 7 by running the machine backwards), so the range is also all real numbers. Compare with the flat machine f(x) = 4: its range is just the single number 4, because it only ever says "4."

โœ๏ธ Your Turn!

Let f(x) = 3x โˆ’ 2. Find f(4) and f(โˆ’1), showing each step.

๐Ÿ‘€ Show the answers

Answer: f(4) = 3 ร— 4 โˆ’ 2 = 12 โˆ’ 2 = 10. And f(โˆ’1) = 3 ร— (โˆ’1) โˆ’ 2 = โˆ’3 โˆ’ 2 = โˆ’5 (from โˆ’3, subtract 2 more). The machine always triples the input, then subtracts 2.

V.3.1