← All lessons

The Function Machine

Algebra II · Unit 1
1 · Substitute
2 · Algebra moves
3 · Graph it
4 · Remember
INPUT  x RULE OUTPUT  f(x) POINT  (x, y)
Start here

A function is a MACHINE.

Money goes IN. A snack comes OUT. You already know this machine.

You put in$1
The machinePress B4
You get out🍫

Today you feed the numbers 1, 2, 3, 4, 5 into 16 different machines — and the outputs will tell you which family each machine belongs to.

Teacher script

SLIDE 1"Before one single symbol — picture a vending machine. Everybody knows this machine."

"Dollar in. Press B4. Chocolate out. That machine is a function. You are already an expert and you did not know it."

"Today we always feed the same numbers: 1, 2, 3, 4, 5. Same inputs, sixteen machines. When the inputs never change, the OUTPUTS have to tell the whole story."

Part 1 · Substitute  step 2

The rule, written short.

A rule like "double it, then add 3" gets written like this:

f(x) = 2x + 3

f — the machine's name.

x — the door. Your number goes here.

2x + 3 — the rule inside.

f(x) — the output that falls out.

⚠️ Trap

f(x) does NOT mean f × x. Those parentheses are a door, not multiplication.

Teacher script

"f is just a name, like Rex on a dog. The x in the little parentheses is the DOOR."

"Trap warning right now: f of x is NOT f times x. Your hand wants to multiply. Don't. It is a door."

Part 1 · Substitute  step 3 · the whole skill

Cross out the x. Write the number.

Pick any of the 16 machines. Feed it 1, then 2, then 3… and watch the ladder under the table find the pattern.

Inputs waiting

Table, then the difference ladder

xoutputpoint
each row becomes a dot
Teacher script

"The ONLY skill in this topic. Wherever you see an x, cross it out and write the number. That is it."

CLICK"Watch the 1 travel into the door." (let it land) "Every x just became 1. Now it is only arithmetic."

WATCH THE LADDER"Under the table I subtract each answer from the one before it. Keep going until the row is all the same number. Count the rounds. One round = linear. Two = quadratic."

ARITHMETIC"Now a sequence. The input is not just any number now — it is the TERM NUMBER. n = 1 is the first term, n = 2 is the second. Notice the graph is dots with a dotted line: there is no term number 2 and a half."

EXPONENTIAL"Do NOT subtract. Divide. Every answer is the one before it times the same number."

Part 1 · Substitute  step 4 · the big idea

Four families. One test tells them apart.

Feed 1, 2, 3, 4, 5 into anything. Then keep subtracting until the row is all the same. The number of rounds names the family.

Linear

f(x) = 2x + 3
5   7   9   11   13
+2  +2  +2  +2  ← same

1 round of subtracting.

Story: you save $2 every week.

Shape: a solid straight line. Any x is allowed — even 2.5.

Quadratic

f(x) = x²
1   4   9   16   25
+3  +5  +7  +9
+2  +2  +2  ← same

2 rounds of subtracting.

Story: area of a square room.

Shape: a U (parabola).

Arithmetic

a(n) = 3 + (n−1)·2
3   5   7   9   11
+2  +2  +2  +2  ← same

A LIST. Add the same d each term.

Story: $3 in the jar, add $2 every week.

Shape: separate dots in a line. There is no term 2½.

Exponential

f(x) = 2x
2   4   8   16   32
×2  ×2  ×2  ×2  ← same
subtracting never settles

Don't subtract — DIVIDE.

Story: money doubling every year.

Shape: flat, then it explodes.

💡 The link nobody tells you

Look at Linear and Arithmetic. Same ladder. Same +2. An arithmetic sequence IS a linear function — the only difference is that the input must be a whole term number.

Line = a road you can stop anywhere on. Sequence = stepping stones.

⚠️ The trap they love

2x and look almost the same at first. At x = 10: 2x = 20 but 2ˣ = 1024. Never judge from two rows.

Teacher script

"Four families. Cover the equations. Read only the numbers."

"Linear: 5, 7, 9, 11, 13. Subtract once — all twos. ONE round."

"Quadratic: 1, 4, 9, 16, 25. Round one: 3, 5, 7, 9. Not the same. Round two: 2, 2, 2. TWO rounds."

"Arithmetic: 3, 5, 7, 9, 11. One round, all twos — same as linear! So what is different?" (wait) "The input. n must be a whole term number. You cannot ask for term number two-and-a-half. That is why the graph is dots, not a solid line."

"Exponential breaks the pattern. Subtracting never settles. DIVIDE and you get 2 every time."

Part 1 · Substitute  step 5 · reading the formula

Why (n − 1) and not n?

This is the question every student asks, and it has a one-sentence answer.

You start ON term 1. You have not jumped yet.

a(n)the term you want
=.
a₁where you start
+.
(n − 1)how many jumps
·.
dsize of one jump

Read it as a sentence: "Start here, then take some jumps, each one this big."

a₁ — the first term. $3 already in the jar.

d — the common difference. You add $2 every week.

nwhich term you want. Not how much — which one.

(n − 1) — the number of jumps it takes to get there.

Press a term number and count the jumps yourself.

Jumps made: 0
💡 Count with your fingers

Term 1 → term 1: 0 jumps.   Term 1 → term 2: 1 jump.   Term 1 → term 5: 4 jumps.

Always one less than the term number. That is the whole n − 1.

Same as fence posts: 5 posts in a row have only 4 gaps between them.

⚠️ The mistake that costs the most points

Using n instead of n − 1. Students write a(10) = 3 + 10·2 = 23.

The real answer is 3 + 9·2 = 21. One extra jump, wrong by a whole d.

Check it fast: put n = 1 into your formula. It must give you back the first term. If it doesn't, you used the wrong number of jumps.

🔑 Say this to yourself

"The first term is free. You only pay for the jumps."

Teacher script — this is the one to say out loud

OPEN"Every year somebody asks me the same question. Why n minus one? Why not just n? Today you get the answer, and you are never going to forget it."

THE STORY"You have a jar. There is already three dollars in it. Every week you drop in two more dollars."

"Week one. How much is in the jar?" (someone will say five — that's the mistake you want) "No. Three. On week one you have not added anything yet. You are standing at the start."

COUNT ON FINGERS"Hold up your hand. Week one to week one — how many times did you add? Zero. Week one to week two? One. Week one to week five?" (let them count: 1→2, 2→3, 3→4, 4→5) "Four. Not five. Four."

"So to reach term n, you jump n minus one times. That is it. That is the whole mystery."

FENCE POSTS"Here is the same idea in a picture. Five fence posts in a row. How many gaps between them?" (wait — they will say five, then correct to four) "Four. There is always one less gap than post. Terms are posts. Jumps are gaps."

NOW THE FORMULA"Look at the four colors on the screen and read it as a sentence with me:"

"Start here  plus  this many jumps  times  this big each  equals  the term you want."

CLICK TERM 4"Watch the hopper. Count out loud with it." (class counts: one, two, three) "Three jumps to reach term four. And look at the formula — four minus one. Three."

THE WARNING"Now the mistake that costs the most points all year. Somebody wants the tenth term and writes three plus TEN times two. Twenty-three. Wrong. It is three plus NINE times two. Twenty-one. One extra jump, and you are off by a whole d."

THE SELF-CHECK"Here is how you catch yourself in two seconds. Put n equals one into your own formula. It must hand you back the first term. If it gives you anything else, your jumps are wrong. Do this on every sequence problem before you move on."

CLOSE"Say it with me: the first term is free. You only pay for the jumps."

Part 1 · Substitute  step 6 · why n cannot be 2½

Try to feed both machines 2.5.

You can walk 2.5 meters down a movie aisle. That is a real distance.

You cannot sit in seat 2½. There is no such seat.

Two kinds of number. Watch what each machine does with the same 2.5.

Linear function

Input x means HOW MUCH

f(x) = 2·x + 3
✅ 8 is a real answerthe dot lands right on the line

Arithmetic sequence

Input n means WHICH ONE

a(n) = 3 + (n − 1)·2
❌ 6 is a fake answerthe dot lands in a HOLE — there is no term 2½
⚠️ The part that fools everyone

Your calculator does not stop you. Type 3 + (2.5 − 1)·2 and it cheerfully says 6.

But 6 is the answer to a question nobody can ask. There is no 2½th week. No 2½th payment. No 2½th seat.

The formula only carries meaning when n = 1, 2, 3, 4, 5…

💡 That is the ONLY difference

Same rule. Same +2. Same slope. The line and the sequence do the identical arithmetic.

A line is a ramp — stop anywhere on it. A sequence is stairs — you can only stand on a step.

How the test asks it

"Is the situation discrete or continuous?"

Discrete = countable things. Seats, weeks, payments, people. Only whole numbers. → a sequence, drawn as dots.

Continuous = measurable amounts. Distance, time, weight, money poured. Any number allowed. → a function, drawn as a solid line.

Teacher script

"Everybody stand up." (wait) "Walk two and a half steps toward the door." (they can) "Now sit in seat two and a half." (they cannot) "Sit down. That is today's whole idea."

"Distance is a ramp. You can stop anywhere on a ramp. Seat numbers are stairs. You can only stand on a step."

CLICK"Watch both machines get the same 2.5." (let it run) "The line says eight. Look — the dot landed right ON the line. Eight is real."

"The sequence says six. Now look at its graph. Where did the dot land?" (wait) "In a HOLE. Between term 2 and term 3. There is nothing there."

"So here is the warning, and write it down. Your calculator will not stop you. It will hand you six with a smile. Six is a lie. There is no two-and-a-half-th term."

"Say it with me: n counts things. You cannot count half a thing."

Part 2 · Algebra moves  step 7 · distributing

The number outside knocks on EVERY door.

When the rule has parentheses — like f(x) = 2(x + 3) — you have to hand the outside number to everything inside.

a(b + c)  =  a·b  +  a·c

Picture a pizza delivery. The driver (purple) must stop at house 1 AND house 2. Skipping a house is the #1 mistake.

✅ Two roads, same answer

For f(x) = 2(x + 3), find f(5):

Road A — substitute first: 2(5 + 3) = 2(8) = 16

Road B — distribute first: 2x + 6 → 2(5) + 6 = 16

Both give 16. Road A is usually faster. Road B is what you need when the test asks you to simplify.

⚠️ The three killers

1. Forgetting the second house: 2(x + 3) = 2x + 3 ✗   (the 3 never got doubled)

2. Losing a minus: −3(x + 2) = −3x + 6 ✗   it is −3x − 6

3. x · x = 2x ✗   it is

Teacher script

"Parentheses with a number in front. This is where half the class loses points, so we are going to be very slow."

"The number outside is a pizza driver. Inside the parentheses are houses. The driver must stop at EVERY house. Not the first one. Every one."

CLICK EX 1"Watch the arrows. Two on the left, two on the right. Two times x. Two times 3."

CLICK EX 3"Now the dangerous one. Negative three. Everybody: does the minus sign belong to the 3?" (wait) "Yes. So the driver is NEGATIVE three, and negative three goes to both houses. Both answers come out negative."

CLICK EX 4"x times x. Not 2x. x squared. Multiplying is not adding."

"Last thing — the two roads. Both give sixteen. If the question says 'find f of 5,' just substitute. If it says 'simplify,' distribute."

Part 2 · Algebra moves  step 8 · opening a square

Opening (x + 3)².

⚠️ Stop. Read this twice.

(x + 3)² is NOT x² + 9.

Proof with real numbers. Let x = 2.

(2 + 3)² = 5² = 25   but   2² + 3² = 4 + 9 = 13. Not the same.

The square does not go through the plus sign. Ever.

A square means the whole thing, times itself: (x + 3)² = (x + 3)(x + 3).

a square with side (x + 3)
The picture explains it Add the 4 pieces: + 3x + 3x + 9  =  + 6x + 9 The middle 6x is the piece students forget. It is there twice.
Rule 1 · plus inside (a + b)² = + 2ab + (x + 3)² = x² + 6x + 9
Rule 2 · minus inside (ab)² = 2ab + (x − 5)² = x² − 10x + 25 Only the MIDDLE turns negative. The last stays plus.
Rule 3 · plus times minus (a + b)(ab) = (x + 4)(x − 4) = x² − 16 The middle cancels out. No middle term at all.
Watch the coefficient (2x + 1)² = 4x² + 4x + 1 a = 2x, so a² = 4x² — the 2 gets squared too.
✅ Inside a function

f(x) = (x + 3)². Find f(2).

Cross out the x, write the 2: (2 + 3)² = 5² = 25. Do the inside first, then square.

You do not need to open the square to find f(2). Only open it when the question says "expand" or "simplify."

Teacher script

"Hands up if you think x plus 3, all squared, is x squared plus 9." (some hands) "Keep your hand up. I am going to prove you wrong with numbers, not with rules."

"Let x be 2. Two plus three is five. Five squared is twenty-five. Now the other way: two squared is four, three squared is nine, four plus nine is thirteen. Twenty-five is not thirteen. Hands down."

"Why? Look at the square picture. The side is x plus 3. The area is the WHOLE square — all four pieces. Two of those pieces are the 3x rectangles. Those are the ones you were throwing away."

"Say it: two of them. That is where the 2ab comes from. It is not magic, it is the two rectangles."

"Rule two — minus inside. Only the middle goes negative. Why does the last one stay positive?" (wait) "Negative times negative. Minus five times minus five is plus twenty-five."

EXIT CHECK"On your paper: open (x + 1)². Ten seconds."

Part 3 · Graph it  step 9

Four families. Four pictures.

The pattern in the table decides the picture. Every time.

Linear → a solid line
Quadratic → a U
Arithmetic → dots only
Exponential → it explodes

Look at the first and the third. Same slope, same direction — but the sequence has holes between the dots. That is the whole difference.

Teacher script

"Four pictures. Cover the captions. Which is which?" (let them call it out)

"Compare picture one and picture three. Both go up the same way. But three has HOLES. Why?" (wait) "Because there is no term number one-and-a-half. A sequence is stepping stones. A function is a road."

Part 3 · Graph it  step 10 · your turn

Now YOU change the machine.

Pick a family. Move the sliders. The rule, the table and the graph change together.

Family

a — how steep2
b — up or down3
xf(x)

Teacher script

"You drive. I change a — tell me what happens." (drag a) "Steeper. a controls steepness."

"Now b." (drag b) "The whole thing slides up and down. It never tilts."

"Set a to zero. Flat line. Still a function."

"Press 2-to-the-x. Watch how fast it leaves the screen."

DO ITCall a student up to drag the sliders.

Part 3 · Graph it  step 11 · the pencil test

The VERTICAL LINE TEST.

A vertical line means one single input. Everywhere it touches is an output.

Touch once = one output = it is a function.

f(x) = 2x + 3
Touches once → IT IS A FUNCTION ✅

All 16 machines you tried pass this test.

Teacher script

"Hold your pencil straight up and down. Slide it across."

"A vertical line is ONE input. Every place it touches is an output. Touch twice and one input gave two answers — broken machine."

"Watch." (run it) "Once. Once. Once."

Part 3 · Graph it  step 12

Now watch one FAIL.

a circle
Touches twice → NOT a function ❌

At x = 1 the line hits a top point and a bottom point. One input, two outputs.

Not a function. Still a beautiful circle — just not a function.

Teacher script

"Same pencil. Different picture." (run it, freeze in the middle) "Two places! Top and bottom."

"In words?" (wait) "One input gave two outputs. Broken vending machine."

Part 3 · Graph it  step 13 · trap

The trap: wrong pencil direction.

⚠️ #1 mistake on this topic

Students slide a HORIZONTAL line by accident, see it hit twice, and write "not a function." Wrong.

Two inputs sharing one output is allowed. Two people can both order pizza.

f(x) = x² — flat line hits twice
Still a function ✅

Say it: vertical kills, horizontal is fine.

Teacher script

"Under pressure, students turn the pencil the wrong way. This U gets hit twice by the flat red line. Problem?" (wait) "No! Two inputs, one output. Two people, same pizza. Legal."

"Say it: vertical kills, horizontal is fine."

Part 4 · Remember  step 14

Seven lines to remember.

🔑 To substitute

"Cross out the x. Write the number."

🔑 To name the family

"Count the rounds of subtracting."

1 round = linear (or a sequence).   2 rounds = quadratic.   Never settles? Divide — it's exponential.

🔑 Line or sequence?

"n counts things. You cannot count half a thing."

A line is a ramp — stop anywhere. A sequence is stairs — only on a step.

🔑 To distribute

"The driver stops at EVERY house — and the minus sign rides along."

🔑 To open a square

"Square, double, square."

(a ± b)² = a² ± 2ab + b² — the last one is always plus.

🔑 What a function IS

"Press the same button, get the same snack — every time."

🔑 For graphs

"Vertical kills. Horizontal is fine."

Teacher script

"Pencils down. Six sentences. In your head, not your notebook."

"Cross out the x, write the number. Count the rounds. Every house, minus rides along. Square, double, square. Same button, same snack. Vertical kills."

"Say them with me. Twice."

Part 4 · Remember  step 15 · the real questions

How it shows up on a test.

Question 1 · substitution

If f(x) = 2x + 3, what is f(4)?

A) 8    B) 11    C) 14    D) 2x + 7

B. C = added before doubling. A = forgot the +3. D = never substituted.

Question 2 · distributing

Simplify −4(2x − 3).

A) −8x − 12    B) −8x + 12    C) −8x − 3    D) 8x + 12

B. −4 × 2x = −8x. −4 × −3 = +12. A is the sign trap. C forgot the second house.

Question 3 · opening a square

Expand (x − 5)².

A) x² − 25    B) x² + 25    C) x² − 10x + 25    D) x² − 10x − 25

C. Square, double, square. A and B skip the middle. D got the last sign wrong — it is always plus.

Question 4 · sequences

"An arithmetic sequence starts at 7 and has d = 4. Find the 10th term."

Your move: a(10) = 7 + (10 − 1)·4 = 7 + 36 = 43. The trap is using 10 instead of 9 — you take n minus 1 steps to reach term n.

Question 5 · graphs

"Which graph represents a function?"

Your move: pencil straight up and down, slide across. Planted wrong answers: circles, sideways U-shapes, sideways S-curves.

Teacher script

"Five questions. Cover the choices each time."

"Number two. Negative four times negative three." (wait) "PLUS twelve. Two negatives make a positive. Answer A is the trap for people who rushed."

"Number three. Say the chant while you write: square, double, square. x squared, minus ten x, plus twenty-five."

"Number four. Tenth term. How many steps from term 1 to term 10?" (wait — someone will say ten) "NINE. Count on your fingers: 1 to 2 is one step. 1 to 10 is nine steps. That is the whole reason for the n minus 1."

EXIT TICKET"Sticky note: open (x + 2)², and find f(3) for f(x) = 3(x − 1)."

1 / 15