๐Ÿ  Home โ€บ โž• Arithmetic โ€บ Lesson 2

๐Ÿงฉ Order of Operations with Variables โ€” and f(x)

๐Ÿ“– Lesson 2 of 11

๐Ÿ“Œ Key idea of this section

PEMDAS still rules: parentheses, powers, ร—รท left to right, +โˆ’ left to right.
To EVALUATE an expression, substitute the value inside parentheses,
then follow the order, step by step.
f(x) = 3x + 2   means:   "whatever you feed me, triple it and add 2."

Substitution: swapping the letter for a number

Evaluating an expression means finding its value for a particular x. The golden rule of substitution:

Replace the variable with (parentheses around the value).

The parentheses are not decoration โ€” they protect you from sign disasters and order mix-ups, as you're about to see.

Example 1: Evaluate 2xยฒ โˆ’ 3x + 4 when x = 3.

2(3)ยฒ โˆ’ 3(3) + 4        (substitute: every x becomes (3))
= 2 ยท 9 โˆ’ 3 ยท 3 + 4     (powers first: (3)ยฒ = 9)
= 18 โˆ’ 9 + 4            (multiplications next: 2 ยท 9 = 18 and 3 ยท 3 = 9)
= 9 + 4                 (+ and โˆ’ tie, so left to right: 18 โˆ’ 9 = 9)
= 13

Watch what the parentheses prevented: 2(3)ยฒ is NOT (2 ยท 3)ยฒ = 36, because the power grabs only the 3 โ€” and 3x with x = 3 is 3 ยท 3 = 9, not 33!

Function notation: naming the rule

A function is a rule that takes an input and produces exactly one output. We write it:

f(x) = 2x + 3

Read aloud: "f of x equals 2x plus 3." The letter f is the rule's name; the x in parentheses is the input slot. f(4) means "the output when 4 goes in":

f(4) = 2(4) + 3 = 8 + 3 = 11
f(0) = 2(0) + 3 = 0 + 3 = 3
f(โˆ’2) = 2(โˆ’2) + 3 = โˆ’4 + 3 = โˆ’1     (substituting a negative โ€” parentheses doing their job)
f(1/2) = 2(1/2) + 3 = 1 + 3 = 4

A table of inputs and outputs shows the pattern at a glance:

x        0   1   2   3
f(x)     3   5   7   9

Every time x grows by 1, f(x) grows by 2 โ€” exactly the 2 sitting in front of the x. That number is the steepness of the rule (its official name is slope), and you just discovered it from a table.

Running a function BACKWARDS

Here's the honors move: don't just find outputs from inputs โ€” find the input from the output. For what x is f(x) = 13?

2x + 3 = 13           (set the rule equal to the target output)
2x = 10               (subtract 3 from both sides)
x = 5                 (divide both sides by 2)
Check: f(5) = 2(5) + 3 = 13 โœ…

A function question is secretly a Lesson 1 equation in disguise.

Feeding a function to a function

If f(x) = 2x + 3 and g(x) = xยฒ โˆ’ 1, what is f(g(2))? Work from the inside out:

g(2) = (2)ยฒ โˆ’ 1 = 4 โˆ’ 1 = 3       (inside first)
f(3) = 2(3) + 3 = 6 + 3 = 9       (feed that output into f)

So f(g(2)) = 9. This inside-out chaining is called composition, and it runs half of higher math.

โœ๏ธ Your Turn!

Let h(x) = 3x โˆ’ 4. Find: (a) h(5) (b) h(0) (c) h(2/3) (d) the x for which h(x) = 8.

๐Ÿ‘€ Show the answers

Answers: (a) 3(5) โˆ’ 4 = 15 โˆ’ 4 = 11. (b) 3(0) โˆ’ 4 = โˆ’4. (c) 3(2/3) โˆ’ 4 = 2 โˆ’ 4 = โˆ’2. (d) 3x โˆ’ 4 = 8 โ†’ 3x = 12 โ†’ x = 4. Check: h(4) = 12 โˆ’ 4 = 8 โœ….

V.3.1