← IGCSE / O Level Mathematics

IGCSE / O Level Mathematics · Topic 2 Algebra and graphs · Chapter 20 · pp. 239–244

Functions

A function is a rule that turns each input into exactly one output, like a machine: put 2 into “multiply by 3, then subtract 5” and 1 comes out. This chapter gives the rule a name, f, runs it backwards (the inverse f−1) and chains two machines together (the composite fg).

Learning objectives

  1. Understand function notation: f(x) = 4x − 9 and f: x ↦ 4x − 9.
  2. Evaluate a function for whole-number, decimal, negative and surd inputs.
  3. Substitute an expression into a function, such as f(x + 1), and simplify.
  4. Find the inverse function f−1(x) and use it to evaluate f−1(a).
  5. Form and evaluate composite functions such as fg(x).

Book exercises: 20.1 to 20.7 and Student assessments 1 and 2 (pp. 239–244). The whole chapter is Extended content.

What is a function? Extended

🔑 Key ideas

  • An expression such as 4x − 9 is a function of x: its value depends on the value of x.
  • We name the rule with a letter: f(x) = 4x − 9, read “f of x”.
  • The arrow form f: x ↦ 4x − 9 means the same thing: “f maps x to 4x − 9”.
  • f(2) means “the output when the input is 2”. Replace every x with 2.
input x = 2 × 3 6 − 5 1 output f(2) = 1
f(x) = 3x − 5 as a machine: 2 goes in, is multiplied by 3 to make 6, then 5 is subtracted. f(2) = 1.
You seeSayDo
f(x) = 3x − 5“f of x is 3x minus 5”This is the rule
f: x ↦ 3x − 5“f maps x to 3x − 5”Same rule, arrow form
f(−2)“f of minus 2”Put (−2) in place of every x

💡 Put a negative input in brackets. For f(x) = x2 + 4, f(−1) = (−1)2 + 4 = 5. Typing −12 on a calculator gives −1, which is wrong.

📘 Example 1 · f(x) = 3x − 5. Evaluate f(2), f(0) and f(−2)

  1. f(2): replace x with 2: 3 × 2 − 5 = 6 − 5 = 1.
  2. f(0): replace x with 0: 3 × 0 − 5 = 0 − 5 = −5.
  3. f(−2): replace x with (−2): 3 × (−2) − 5 = −6 − 5 = −11.

📘 Example 2 · f: x ↦ . Evaluate f(3), f(1.5) and f(−1)

  1. f(3): top is 2 × 3 + 6 = 12, so f(3) = = 4.
  2. f(1.5): top is 2 × 1.5 + 6 = 3 + 6 = 9, so f(1.5) = = 3.
  3. f(−1): top is 2 × (−1) + 6 = −2 + 6 = 4, so f(−1) = .
  4. Check f(3): 4 × 3 = 12 = 2 × 3 + 6. ✔

📘 Example 3 · f(x) = x2 + 4. Evaluate f(2), f(6) and f(−1)

  1. f(2) = 22 + 4 = 4 + 4 = 8.
  2. f(6) = 62 + 4 = 36 + 4 = 40.
  3. f(−1) = (−1)2 + 4 = 1 + 4 = 5. Squaring a negative gives a positive.

📘 Example 4 · f(x) = −6x(x − 4). Evaluate f(0.5)

  1. Replace every x with 0.5: f(0.5) = −6 × 0.5 × (0.5 − 4).
  2. Work out the bracket: 0.5 − 4 = −3.5.
  3. Multiply: −6 × 0.5 = −3, then −3 × (−3.5) = 10.5.

✏️ Try it

  1. f(x) = 2x + 2. Find f(−6).
  2. g(x) = . Find g(3).
  3. f(x) = 3x2 − 5. Find f(−2).
Answers

1. 2 × (−6) + 2 = −10 · 2. (15 − 3) ÷ 3 = 4 · 3. 3 × 4 − 5 = 7

Next: substituting expressions →

Substituting an expression Extended

🔑 Key ideas

  • The input does not have to be a number. f(x + 1) means: put (x + 1) wherever f has an x.
  • Always keep the new input in brackets, then expand and collect like terms.
  • f(x) + 4 is different from f(x + 4): the first adds 4 to the output, the second changes the input.
f( ) = 2 + 1 the rule, with x as an empty box fill every box with (x + 1) f(x + 1) = 2(x + 1) + 1 = 2x + 2 + 1 = 2x + 3 Check with x = 1: f(2) = 5 and 2(1) + 3 = 5 ✔
Think of x in the rule as an empty box. Whatever goes inside f( ) fills every box, in brackets.

📘 Example 5 · f(x) = 2x + 1. Write f(3x − 2) in its simplest form

  1. Replace x with (3x − 2): f(3x − 2) = 2(3x − 2) + 1.
  2. Expand: 6x − 4 + 1.
  3. Collect: 6x − 3.
  4. Check with x = 1: f(1) = 3, and 6 − 3 = 3. ✔

📘 Example 6 · h(x) = x2 + 2x. Write h(x − 3) in its simplest form

  1. Replace every x with (x − 3): (x − 3)2 + 2(x − 3).
  2. Expand the square: (x − 3)2 = x2 − 6x + 9.
  3. Expand the other bracket: 2(x − 3) = 2x − 6.
  4. Collect: x2 − 6x + 2x + 9 − 6 = x2 − 4x + 3.
  5. Check with x = 4: h(1) = 1 + 2 = 3, and 16 − 16 + 3 = 3. ✔

📘 Example 7 · f(x) = 5x − 2. Write f() + 2 in its simplest form

  1. Replace x with : 5 × − 2 = x − 2.
  2. Now add 2 to the output: x − 2 + 2 = x.

✏️ Try it

  1. f(x) = 3x − 1. Write f(x + 2) in its simplest form.
  2. f(x) = 3x − 1. Write f(x2).
  3. g(x) = x2 + 1. Write g(2x).
Answers

1. 3(x + 2) − 1 = 3x + 5 · 2. 3x2 − 1 · 3. (2x)2 + 1 = 4x2 + 1

Next: inverse functions →

Inverse functions Extended

🔑 Key ideas

  • The inverse f−1(x) undoes f: if f(2) = 1 then f−1(1) = 2.
  • f−1(x) is not . The −1 is a label, not an index.
  • The book's method has three steps (below). Machine view: undo each operation, in reverse order.
1. Write y y = 2x − 3 2. Swap x and y x = 2y − 3 3. Make y the subject y = (x + 3) ÷ 2
Finding the inverse of g(x) = 2x − 3: replace g(x) with y, swap x and y, then rearrange. g⁻¹(x) = (x + 3) ÷ 2.
g: do these in order → x × 2 − 3 2x − 3 g⁻¹: undo them in reverse order ← (x + 3) ÷ 2 ÷ 2 + 3 x
Machine view: g multiplies by 2 and then subtracts 3, so g⁻¹ adds 3 first and then divides by 2.

📘 Example 8 · Find the inverse of f(x) = x + 2 and of g(x) = 2x − 3

  1. f: write y = x + 2, then swap: x = y + 2.
  2. Subtract 2: y = x − 2, so f−1(x) = x − 2.
  3. g: write y = 2x − 3, then swap: x = 2y − 3.
  4. Add 3: x + 3 = 2y.
  5. Divide by 2: g−1(x) = .
  6. Check: g(4) = 5 and g−1(5) = 8 ÷ 2 = 4. ✔

📘 Example 9 · f(x) = . Calculate f−1(2) and f−1(−3)

  1. Write y = , then swap: x = .
  2. Multiply by 3: 3x = y − 3.
  3. Add 3: y = 3x + 3, so f−1(x) = 3x + 3.
  4. f−1(2) = 3(2) + 3 = 9.
  5. f−1(−3) = 3(−3) + 3 = −6.
  6. Check: f(9) = (9 − 3) ÷ 3 = 2. ✔

📘 Example 10 · Find the inverse of p(x) =

  1. Write y = , then swap: x = .
  2. Multiply by 2: 2x = 5y + 1.
  3. Subtract 1: 2x − 1 = 5y.
  4. Divide by 5: p−1(x) = .
  5. Check: p(1) = 6 ÷ 2 = 3, and p−1(3) = 5 ÷ 5 = 1. ✔

💡 Shortcut for one value: f−1(5) is the x that makes f(x) = 5. For f(x) = 2x + 1, solve 2x + 1 = 5, so f−1(5) = 2.

✏️ Try it

  1. Find the inverse of f(x) = x − 5.
  2. Find the inverse of f(x) = 4x.
  3. g(x) = 6(x − 1). Evaluate g−1(12).
Answers

1. f−1(x) = x + 5 · 2. f−1(x) = · 3. g−1(x) = + 1, so g−1(12) = 3 (check: 6(3 − 1) = 12)

Next: composite functions →

Composite functions Extended

🔑 Key ideas

  • fg(x) means f(g(x)): do g first, then put its output into f.
  • Read it from the right, the end nearest the x.
  • fg(x) and gf(x) are usually different.
  • To evaluate fg(3), either find fg(x) first, or work out g(3) and then put the answer into f.
3 g firstg(x) = 2x 6 then ff(x) = 2x + 3 15 fg(3) = f(g(3)) = f(6) = 2 × 6 + 3 = 15
fg(3): 3 goes into g first and comes out as 6; then 6 goes into f and comes out as 15.

📘 Example 11 · f(x) = x + 2 and g(x) = x + 3. Find fg(x)

  1. g goes first: fg(x) = f(x + 3).
  2. Put (x + 3) into f: (x + 3) + 2.
  3. Collect: fg(x) = x + 5.

📘 Example 12 · f(x) = 2x − 1 and g(x) = x − 2. Find fg(x) and gf(x)

  1. fg(x) = f(x − 2) = 2(x − 2) − 1.
  2. Expand and collect: 2x − 4 − 1 = 2x − 5.
  3. gf(x) = g(2x − 1) = (2x − 1) − 2.
  4. Collect: 2x − 3. Different from fg(x): the order matters.

📘 Example 13 · f(x) = 2x + 3 and g(x) = 2x. Evaluate fg(3)

  1. fg(x) = f(2x) = 2(2x) + 3 = 4x + 3.
  2. Substitute x = 3: 4 × 3 + 3 = 15.
  3. Check the other way: g(3) = 6, then f(6) = 12 + 3 = 15. ✔

🧪 Try it: function machine

f(x) = x +

g(x) = x +

f: do these in order → 5 × 2 10 − 3 7 f⁻¹: undo them in reverse order ← 5 ÷ 2 10 + 3 7
Top row: your input goes through f. Bottom row: f⁻¹ takes the output back to the input.

f(x) and the value at your input

    The inverse f⁻¹(x)

      The composite fg(x)

        ✏️ Try it

        1. f(x) = 3x + 1 and g(x) = x − 2. Find fg(x).
        2. For the same f and g, find gf(x).
        3. f(x) = x2 and g(x) = x + 1. Evaluate fg(3).
        Answers

        1. 3(x − 2) + 1 = 3x − 5 · 2. (3x + 1) − 2 = 3x − 1 · 3. g(3) = 4, f(4) = 16

        Next: summary and quiz →

        Chapter summary

        • f(x) = 3x − 5 and f: x ↦ 3x − 5 name the same rule. f(2) is the output for input 2.
        • Replace every x with the input, in brackets. (−1)2 = 1.
        • f(x + 1): put the whole expression in place of x, then expand and simplify.
        • Inverse f−1(x): write y = f(x), swap x and y, make y the subject. It undoes f.
        • f−1(a) is the x that makes f(x) = a.
        • Composite fg(x) = f(g(x)): g first, then f. Usually fg(x) ≠ gf(x).

        📄 Practice questions

        The book's Exercises 20.1 to 20.7 and Student assessments 1 and 2 are in the printable assignment for this chapter.

        Mini-quiz

        1. If f(x) = 3x − 5, what is f(−2)?
        2. If f(x) = x² + 4, what is f(−3)?
        3. If f(x) = (2x + 6)/3, what is f(3)?
        4. If f(x) = 2x + 1, what is f(x + 1) in its simplest form?
        5. If g(x) = 3x², what is g(2x)?
        6. What does f⁻¹(x) mean?
        7. Find the inverse of g(x) = 2x − 3.
        8. If f(x) = (x − 3)/3, what is f⁻¹(2)?
        9. If f(x) = x + 2 and g(x) = x + 3, what is fg(x)?
        10. In fg(x), which function is applied to x first?
        11. If f(x) = 2x + 3 and g(x) = 2x, what is fg(3)?
        12. If f(x) = 2x − 1 and g(x) = x − 2, what is gf(x)?

        Source: Cambridge IGCSE Mathematics Core and Extended (4th edition, Pimentel and Wall), Chapter 20 (Functions). Explanations, the Try it answers, the tool and the quiz are Guru Jazzy's own. This page is not made or endorsed by Cambridge or Hodder Education.