top of page

2.3 Composite Functions

A-level Maths Year 2 · Edexcel 9MA0 · Chapter 2: Functions and Graphs

A free A-level Maths Year 2 lesson for Pearson Edexcel A level Mathematics (9MA0) from OBA School: combining two functions, the order of composition, and domains and ranges of composite functions. Watch the video, read the explanation and worked examples, then try the revision questions. You can work through the full lesson, with more videos, an interactive lesson, a practice quiz and printable worksheets, in our free online course.

What you will learn

  • Understand that fg(x) means f(g(x)): apply g first, then f
  • Evaluate and find expressions for composite functions such as fg(x), gf(x) and f²(x)
  • Solve equations involving composite functions
  • Find the domain and range of a composite function

Key words

  • Composite function: A function made by applying one function to the output of another. fg(x) = f(g(x)).
  • Order: In fg(x) the function next to x acts first. In general fg(x) ≠ gf(x).
  • Applying twice: Applying a function twice: f²(x) = ff(x) = f(f(x)).
  • Domain: The set of inputs a function accepts.
  • Range: The set of outputs a function produces.

Evaluating a composite function

Read fg(x) from right to left: put x into g, then put the result into f. It is like two function machines joined together.

Worked example: numerical composites

f(x) = x² + 1 and g(x) = 2x − 3. Find fg(3), gf(3) and g²(4).
fg(3) = f(g(3)) = f(3) = 9 + 1 = 10
gf(3) = g(f(3)) = g(10) = 20 − 3 = 17
g²(4) = g(g(4)) = g(5) = 7

Answer: fg(3) = 10, gf(3) = 17, g²(4) = 7

Finding fg(x) algebraically

To find fg(x), replace every x in the rule for f with the whole expression g(x), in brackets. Then simplify.

Worked example: both orders

f(x) = x² + 1 and g(x) = 2x − 3. Find fg(x) and gf(x).
fg(x) = (2x − 3)² + 1 = 4x² − 12x + 9 + 1
gf(x) = 2(x² + 1) − 3 = 2x² + 2 − 3

Answer: fg(x) = 4x² − 12x + 10 and gf(x) = 2x² − 1

Key fact: Order matters. fg(x) and gf(x) are usually different functions.

Worked example: with a fraction

p(x) = 4/(x − 1), x ≠ 1, and q(x) = x + 3. Find pq(x) and qp(x).
pq(x) = 4/((x + 3) − 1) = 4/(x + 2), qp(x) = 4/(x − 1) + 3 = (4 + 3(x − 1))/(x − 1)

Answer: pq(x) = 4/(x + 2) and qp(x) = (3x + 1)/(x − 1)

Solving equations with composite functions

Find the composite function as an expression first, then solve the equation in the usual way.

Worked example: fg(x) = gf(x)

f(x) = 3x + 1 and g(x) = x². Solve fg(x) = gf(x).
fg(x) = 3x² + 1 and gf(x) = (3x + 1)² = 9x² + 6x + 1
3x² + 1 = 9x² + 6x + 1, so 6x² + 6x = 0, 6x(x + 1) = 0

Answer: x = 0 or x = −1

Worked example: solving ff(x) = k

f(x) = 5 − 2x. Solve ff(x) = 11.
ff(x) = 5 − 2(5 − 2x) = 4x − 5
4x − 5 = 11, so 4x = 16

Answer: x = 4

Domain and range of a composite function

fg(x) only exists when the output of g is an allowed input for f. To find the range of fg, first find the range of g, then see what f does to those values.

Worked example: restricting the domain

f(x) = √x, x ≥ 0, and g(x) = x − 5, x ∈ ℝ. Find fg(x) and its domain.
fg(x) = √(x − 5). We need x − 5 ≥ 0.

Answer: fg(x) = √(x − 5), domain x ≥ 5

Worked example: range of a composite

g(x) = x² − 4 and f(x) = 2x + 3, both with domain x ∈ ℝ. Find the range of fg.
The range of g is g(x) ≥ −4.
f doubles and adds 3, so the least value of fg(x) is 2(−4) + 3 = −5.
Check: fg(x) = 2(x² − 4) + 3 = 2x² − 5.

Answer: fg(x) ≥ −5

Common mistakes

  • Applying the functions in the wrong order. In fg(x), g acts first.
  • Multiplying instead of composing: fg(x) is not f(x) × g(x).
  • Forgetting brackets when substituting: with f(x) = x² + 1, f(2x − 3) = (2x − 3)² + 1, not 2x − 3² + 1.
  • Writing f²(x) as (f(x))². Here f²(x) means ff(x).

Revision questions

Try these, then check your answers below each one.

Question 1. f(x) = 3x + 2 and g(x) = x² − 1. Find fg(2).

Answer: 11

Working: g(2) = 3, then f(3) = 11.

Question 2. For the same functions, find gf(2).

Answer: 63

Working: f(2) = 8, then g(8) = 64 − 1 = 63.

Question 3. For the same functions, find fg(x). (Choose from: 3x² − 1; 9x² + 12x + 3; 3x² + 1; (3x + 2)(x² − 1).)

Answer: 3x² − 1

Working: fg(x) = 3(x² − 1) + 2 = 3x² − 1.

Related lessons

Continue in the full course

This lesson is section 2.3 of our free A-level Maths Year 2 course. In the full course you get every video for this section, an animated interactive lesson, a self-marking practice quiz, a printable worksheet with a mark scheme, an end-of-chapter test and your progress saved. Go to the full A-level Maths Year 2 course.

 

 

 

 

 

 

 

bottom of page