Lantern Tutor Sign in

Maths · 3 Functions

3.3 Functions

Before you start

  • Substituting a number into an expression, including negatives.
  • Rearranging an equation to change the subject, including when the letter appears twice (2.5).
  • Reading the shape and range of values of a graph (3.1).
Syllabus objectives covered (3)
  • Understand functions, domain and range and use function notation.
  • Understand and find inverse functions f⁻¹(x).
  • Form composite functions as defined by gf(x) = g(f(x)).

Part 1 of 3

What a function is, and how to write about it

  1. A function is a rule that takes an input and produces exactly one output. Put x in, get f(x) out.
  2. The notation f(x)=3x−5 means 'the function called f does this to whatever you feed it'. It is not f multiplied by x.
  3. So f(2) means put 2 in wherever x appears: f(2)=3(2)−5=1.
  4. You can feed it anything, not just numbers. f(a+1)=3(a+1)−5=3a−2. Use brackets around whatever you substitute — that habit prevents most sign errors.
  5. The domain is the set of allowed inputs. The range is the set of outputs the function actually produces.
  6. A useful way to keep them straight: domain is the x values, range is the y values — alphabetical order matches.
  7. Some functions cannot accept every input. f(x)=3/(x+2) is undefined at x=−2, because dividing by zero is meaningless, so x=−2 is excluded from the domain.
  8. A mapping diagram is another way to show the same idea: inputs on the left, outputs on the right, arrows for the rule. It makes clear that each input has exactly one arrow leaving it.

Part 2 of 3

Inverse functions

  1. The inverse function, written f−1(x), undoes what f does. If f turns 2 into 1, then f−1 turns 1 back into 2.
  2. Beware the notation. f−1 means 'the inverse function', not 1/f. It is the one piece of notation in this subtopic that reliably misleads people.
  3. The method for finding it has three steps, and it is the same every time.
  4. **Step 1: write y=f(x).** For f(x)=3x−5, write y=3x−5.
  5. **Step 2: rearrange to make x the subject.** Add 5 and divide by 3.
    x=y+53
  6. Step 3: swap the letters. Replace y with x and write the result as f−1(x).
    f−1(x)=x+53
  7. Check it by composing: f−1(f(2)) should give back 2. Here f(2)=1 and f−1(1)=6/3=2. Correct.
  8. That check takes ten seconds and catches nearly every algebra slip, so do it every time.
  9. One more fact worth knowing: the domain and range swap over. The range of f becomes the domain of f−1, which follows directly from the inverse running the arrows backwards.

Part 3 of 3

Composite functions

  1. A composite function applies one function and then feeds the result into another. The definition is gf(x)=g(f(x)).
  2. Read it from the inside out. In gf(x), f acts first — it is nearer the x — and g acts on the answer.
  3. That ordering is the whole difficulty of this topic, and it looks backwards because the letters are written in the reverse order to the operations.
  4. With f(x)=3x−5 and g(x)=x2: to find gf(2), first f(2)=1, then g(1)=1. So gf(2)=1.
  5. To get an expression rather than a value, substitute the whole of f(x) into g in place of its variable.
    gf(x)=g(3x−5)=(3x−5)2
  6. The order matters. Reversing it gives something different: fg(x)=f(x2)=3x2−5, which is not the same function as (3x−5)2.
  7. So always check which letter is on the inside before you start. Getting the order wrong makes every subsequent line wrong.
  8. For a numerical answer, working step by step with numbers is safer and faster than building the whole expression and then substituting.
  9. The syllabus notes say you are not expected to find the domain and range of composite functions — so if you meet gf(x), you only need the expression or the value.

Worked examples

Example 1. f(x)=2x+1 and g(x)=x2−3. Work out (i) f(4), (ii) gf(4), (iii) fg(4).

Show the working
  1. (i) Substitute 4 into f: f(4)=2(4)+1=9.
  2. (ii) For gf(4), f acts first because it is nearer the x. You already have f(4)=9.
  3. Now apply g to that answer: g(9)=92−3=78. So gf(4)=78.
  4. (iii) For fg(4), g acts first: g(4)=42−3=13.
  5. Then apply f: f(13)=2(13)+1=27. So fg(4)=27.
  6. Note that 78≠27. The order genuinely matters, and this pair of answers is the clearest demonstration of it.

Answer: (i) f(4)=9 (ii) gf(4)=78 (iii) fg(4)=27.

Example 2. f(x)=3(x+4)5. Find f−1(x).

Show the working
  1. Step 1: write y for f(x).
    y=3(x+4)5
  2. Step 2: rearrange for x. Multiply both sides by 5 to clear the fraction.
    5y=3(x+4)
  3. Divide by 3, then subtract 4.
    5y3=x+4⇒x=5y3−4
  4. Step 3: swap the letters and write it as the inverse.
    f−1(x)=5x3−4
  5. Check with a number. f(1)=3(5)/5=3, and f−1(3)=5(3)/3−4=5−4=1. It returns the original input, so the inverse is right.

Answer: f−1(x)=5x3−4, or equivalently 5x−123.

Example 3. f(x)=3x+2 and g(x)=(3x+5)2. Find fg(x), giving your answer as a fraction in its simplest form.

Show the working
  1. Identify the order. In fg(x), g is nearer the x, so g acts first and f acts on its output.
  2. So you need f of the whole expression (3x+5)2.
  3. Substitute that expression wherever x appears in f.
    fg(x)=f((3x+5)2)=3(3x+5)2+2
  4. The question asks for a fraction in its simplest form, so leave the denominator as it is — expanding (3x+5)2 to 9x2+30x+27 makes it longer, not simpler.
  5. Note what would have happened with gf(x) instead: g(3/(x+2))=(9/(x+2)+5)2, an entirely different function.

Answer: fg(x)=3(3x+5)2+2.

Where people go wrong

Mistake: Reading f−1(x) as 1f(x).

Instead: It means the inverse function — the rule that undoes f.

The −1 is notation, not an index. 1f(x) is a completely different thing.

Mistake: Applying the functions in gf(x) from left to right.

Instead: f acts first, because it is nearer the x. gf(x) means g(f(x)).

The notation is written in the opposite order to the operations. Reading inside-out is the only reliable habit.

Mistake: Assuming gf(x)=fg(x).

Instead: They are usually different functions.

Squaring then adding is not the same as adding then squaring. Always check which letter is on the inside.

Mistake: Forgetting to swap x and y at the end of finding an inverse.

Instead: After making x the subject, swap the letters so the answer is in terms of x.

An inverse function must be written as a rule for its own input, and an unswapped answer is marked wrong.

Mistake: Substituting without brackets, e.g. writing f(a+1)=3a+1−5.

Instead: Put brackets round whatever you substitute: 3(a+1)−5.

Without brackets the operation only applies to part of the input, which changes the answer.

Mistake: Trying to find the domain and range of a composite function.

Instead: The syllabus says you are not expected to.

It is explicitly excluded in the notes, so the time is better spent elsewhere.

Check yourself

  1. f(x)=2x2+3. Work out f(−2).
    Answerf(−2)=2(−2)2+3=2(4)+3=11.
  2. Explain the difference between the domain and the range of a function.
    AnswerThe domain is the set of allowed inputs (x values); the range is the set of outputs produced (y values).
  3. Why must x=3 be excluded from the domain of f(x)=5x−3?
    AnswerIt would make the denominator zero, and division by zero is undefined.
  4. f(x)=4x−7. Find f−1(x).
    Answery=4x−7, so x=(y+7)/4, giving f−1(x)=x+74.
  5. How can you check that an inverse function is correct?
    AnswerSubstitute a number into f, then put the result into f−1. You should get the original number back.
  6. f(x)=x+3 and g(x)=2x. Work out gf(5) and fg(5).
    Answergf(5)=g(8)=16; fg(5)=f(10)=13. They are different.
  7. f(x)=x−1 and g(x)=x2. Find an expression for gf(x).
    Answergf(x)=g(x−1)=(x−1)2.

Exam questions

Try each part first. Open the mark scheme after you have written your answer.

Question 1. f(x)=3x−5 and g(x)=2x, where x≠0.

(a) Work out f(−3). 1 mark No calculator

Mark scheme
  • B1 -14

(b) Find f−1(x). 2 marks No calculator

Mark scheme
  • M1 y = 3x - 5 rearranged to make x the subject, or equivalent correct first step
  • A1 (x + 5)/3 oe

(c) Find gf(x), giving your answer as a single fraction. 2 marks No calculator

Mark scheme
  • M1 recognises f acts first and substitutes 3x - 5 into g
  • A1 2/(3x - 5) oe

(d) Write down the value of x that must be excluded from the domain of gf(x). 1 mark No calculator

Mark scheme
  • B1 5/3 oe; FT their (c)

Question 2. h(x)=2x2+3

(a) Work out h(4)−h(−4). 2 marks No calculator

Mark scheme
  • M1 h(4) = 35 and h(-4) = 35 both seen
  • A1 0

(b) Explain why h(a)=h(−a) for every value of a. 1 mark No calculator

Mark scheme
  • B1 squaring a and -a gives the same result, so the outputs are equal oe

(c) Write down the smallest value in the range of h. 1 mark No calculator

Mark scheme
  • B1 3

Question 3. p(x)=x+4 and q(x)=x2.

(a) Find expressions for pq(x) and qp(x). 2 marks No calculator

Mark scheme
  • B1 pq(x) = x² + 4
  • B1 qp(x) = (x + 4)² oe

(b) Solve pq(x)=qp(x). 3 marks No calculator

Mark scheme
  • M1 x² + 4 = (x + 4)² formed
  • M1 expands and simplifies to 8x + 12 = 0 oe
  • A1 x = -1.5 oe

Words to know

Function
A rule giving exactly one output for each allowed input.
Domain
The set of allowed inputs of a function.
Range
The set of outputs a function actually produces.
Inverse function f−1(x)
The rule that undoes f. Not the same as 1/f(x).
Composite function gf(x)
The result of applying f first and then g: g(f(x)).
Mapping diagram
A diagram with inputs on one side and outputs on the other, joined by arrows showing the rule.