Skip to the page

Function notation: f(x) is just substitution

How to evaluate f(x), plug an expression into a function, work out compositions like f(g(2)), and solve f(x) = k, with five original problems.

f(x)=2x+5f(x) = 2x + 5 is a rule with a blank in it. The xx marks where the input goes. When a question asks for f(3)f(3), it is asking you to erase every xx, write 3 in its place, and simplify. Nearly every function-notation question is a version of that one move, done carefully.

One warning before the problems: f(x)f(x) is not ff times xx. The parentheses hold the input, the way a blank on a form holds your name. Read f(3)f(3) as "the output of rule ff when the input is 3." Most of the traps below come from losing track of where the input goes.

Evaluating: replace every x, with parentheses

The safest habit is to replace each xx with the input wrapped in parentheses, even when the input is a plain number. Parentheses keep negative signs and exponents honest.

Problem 1

If f(x)=2x2−3x+1f(x) = 2x^2 - 3x + 1, what is f(−2)f(-2)?

  • A−1-1
  • B3
  • C15
  • D23

Worked solution

Write the rule with (−2)(-2) in each blank:

f(−2)=2(−2)2−3(−2)+1f(-2) = 2(-2)^2 - 3(-2) + 1

Exponents first: (−2)2=4(-2)^2 = 4, so the first term is 2⋅4=82 \cdot 4 = 8. Next, −3(−2)=+6-3(-2) = +6. Then 8+6+1=158 + 6 + 1 = 15. The answer is C.

Each wrong choice comes from one slip. Choice D squares the 2 along with the input, as if the rule said (2x)2(2x)^2: that gives 16+6+1=2316 + 6 + 1 = 23. Choice B gets −3(−2)-3(-2) wrong as −6-6: 8−6+1=38 - 6 + 1 = 3. Choice A treats (−2)2(-2)^2 as −4-4, which happens when the parentheses are left off and −22-2^2 is read as −(22)-(2^2).

Problem 2

If f(x)=x2+1f(x) = x^2 + 1, which expression is equal to f(a+3)f(a + 3)?

  • Aa2+10a^2 + 10
  • Ba2+6a+10a^2 + 6a + 10
  • Ca2+4a^2 + 4
  • Da2+6a+9a^2 + 6a + 9

Worked solution

The input is now an expression, but the move is the same. Replace xx with (a+3)(a + 3):

f(a+3)=(a+3)2+1f(a + 3) = (a + 3)^2 + 1

Expand the square: (a+3)2=a2+6a+9(a + 3)^2 = a^2 + 6a + 9. Add 1: a2+6a+10a^2 + 6a + 10. The answer is B.

Choice A squares each piece separately, a2+9a^2 + 9, and drops the middle term. A square of a sum always has a middle term: (a+3)2(a + 3)^2 means (a+3)(a+3)(a + 3)(a + 3), and the two cross products give 3a+3a=6a3a + 3a = 6a. Choice C computes f(a)+3f(a) + 3, which adds 3 to the output instead of the input. Choice D expands correctly but forgets the +1+1 from the rule.

You can check an answer like this by picking a number. Let a=1a = 1. Then f(a+3)=f(4)=17f(a + 3) = f(4) = 17, and choice B gives 1+6+10=171 + 6 + 10 = 17. Choice A gives 11, and choice D gives 16, so neither can be right.

Composition: work from the inside out

f(g(2))f(g(2)) means: find g(2)g(2) first, then use that answer as the input to ff. Read it from the inside out, the way you would work through nested parentheses in arithmetic.

Problem 3

If f(x)=3x−1f(x) = 3x - 1 and g(x)=x2g(x) = x^2, what is f(g(2))f(g(2))?

  • A9
  • B11
  • C20
  • D25

Worked solution

Inside first: g(2)=22=4g(2) = 2^2 = 4. Then the outside: f(4)=3⋅4−1=11f(4) = 3 \cdot 4 - 1 = 11. The answer is B.

Choice D does the functions in the other order: f(2)=5f(2) = 5, then g(5)=25g(5) = 25. Order matters, and f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different. Choice C multiplies f(2)⋅g(2)=5⋅4f(2) \cdot g(2) = 5 \cdot 4, and choice A adds them. Composition is neither: the output of one function becomes the input of the other.

Problem 4

The table gives some values of the functions ff and gg.

Scroll for more columns

xx1234
f(x)f(x)2341
g(x)g(x)3142

What is the value of g(f(2))g(f(2))?

  • A1
  • B2
  • C3
  • D4

Worked solution

There is no formula here, so substitution becomes looking up. Inside first: find 2 in the xx row and read down to the f(x)f(x) row: f(2)=3f(2) = 3. Now that 3 is the input for gg. Find 3 in the xx row and read down to the g(x)g(x) row: g(3)=4g(3) = 4. The answer is D.

Choice B does the composition in the wrong order: g(2)=1g(2) = 1, then f(1)=2f(1) = 2. Choice C stops after the first step, and choice A reads g(2)g(2) without ever using ff. With tables, saying each step aloud in your head helps: "f of 2 is 3, so I need g of 3."

Solving f(x) = k: the output is given

Sometimes the question runs backward. It gives you the output and asks for the input. f(x)=15f(x) = 15 means "which input makes the rule produce 15?" Set the rule equal to 15 and solve.

Problem 5

If f(x)=x2−2xf(x) = x^2 - 2x, which of the following values of xx satisfies f(x)=15f(x) = 15?

  • A−5-5
  • B3
  • C5
  • D15

Worked solution

Set the rule equal to the output: x2−2x=15x^2 - 2x = 15. Move everything to one side: x2−2x−15=0x^2 - 2x - 15 = 0. Factor by finding two numbers that multiply to −15-15 and add to −2-2: those are −5-5 and 33. So (x−5)(x+3)=0(x - 5)(x + 3) = 0, and x=5x = 5 or x=−3x = -3.

Only 5 is listed. Check it: 52−2⋅5=25−10=155^2 - 2 \cdot 5 = 25 - 10 = 15. The answer is C.

Choice A has the right size but the wrong sign; (−5)2−2(−5)=25+10=35(-5)^2 - 2(-5) = 25 + 10 = 35. Choice D confuses the output with the input: it computes as if the question asked for f(15)f(15), which is 195. Choice B comes from mixing up the signs in the factors. Notice that −3-3 also solves the equation. It is not a choice here, but a different version of this question could ask for it, so read which value the question wants.

Since this question offers four specific values, plugging each one into the rule is also a fair method.

The pattern in all five

  • Replace every xx with the input, inside parentheses.
  • For f(g(…))f(g(\ldots)), start with the innermost function and work out.
  • For a table, read the input row, then the output row.
  • For f(x)=kf(x) = k, the kk is an output: set the rule equal to it and solve.

Try it

Make up a function of your own, such as h(x)=4−x2h(x) = 4 - x^2. Write out h(−3)h(-3), h(t+1)h(t + 1) and h(h(1))h(h(1)) by hand, putting parentheses around every input. Then solve h(x)=−12h(x) = -12 and check both answers by substituting them back. If both checks work, you have used every move from the five problems. For more math practice with worked explanations, see the math section of our question library.

Practice for free: the Skill Scan is 20 questions, about 12 minutes, with no account needed, and every question in the question library comes with a worked explanation.