Skip to content
M
hscscience Maths Ext 1 · Y11
0/100daily goal
0
0
0 due
0
L1 · 0 XP
KJ
Your weak spots
Insights load after your first practice round.
Module 1 · L8 of 15 ~40 min ⚡ +95 XP available

Composite Functions

A temperature sensor feeds into an alarm system. A currency conversion feeds into a tax calculator. Everywhere in the real world, functions chain together — the output of one becomes the input of another. In this lesson you'll master the notation $(f \circ g)(x) = f(g(x))$, discover why order matters, and learn to find the domain of a composite function step by step.

Today's hook — If $f(x) = x + 1$ and $g(x) = x^2$, is $f(g(2))$ the same as $g(f(2))$? Compute both before reading on. By the end of this lesson you'll understand exactly why these differ — and why that matters.
0/5QUESTS
01
Recall — your gut answer first
+5 XP warm-up

If $f(x) = x + 1$ and $g(x) = x^2$, compute $f(g(2))$ and $g(f(2))$. Without simplifying the general form — just substitute $x = 2$ and work step by step. Are they the same?

auto-saved
02
The two core ideas
+5 XP to read

Everything in this lesson reduces to two moves: evaluate the inner function first, then restrict the domain carefully.

Every composite function question asks one of two things: find the formula for $f(g(x))$ by substituting $g(x)$ into $f$, or find the domain by checking where both functions are defined. Master these two moves and no composite question can catch you off guard.

SUB f(g(x)) DOM g(x)∈dom(f) formula domain
$(f \circ g)(x) = f(g(x))$
Inner first
$f(g(x))$ means: evaluate $g$ first, then feed the result into $f$. Read right to left: $g$ acts on $x$, then $f$ acts on $g(x)$.
Order matters
$f(g(x)) \ne g(f(x))$ in general. Composition is not commutative — the order of application changes the result.
Domain rule
The domain of $f \circ g$ is: all $x$ in $\text{dom}(g)$ such that $g(x)$ is in $\text{dom}(f)$.
03
What you'll master
Know

Key facts

  • $(f \circ g)(x) = f(g(x))$ — apply $g$ first, then $f$
  • Composition is generally not commutative: $f(g(x)) \ne g(f(x))$
  • Domain of $f \circ g$: all $x \in \text{dom}(g)$ with $g(x) \in \text{dom}(f)$
Understand

Concepts

  • Why $f(g(x))$ is read "right to left" — inner function acts first
  • How the domain of the composite is restricted by both functions
  • Why a composite function can be decomposed in multiple ways
Can do

Skills

  • Evaluate and simplify $f(g(x))$ and $g(f(x))$ algebraically
  • Find the domain of a composite function from first principles
  • Decompose a given function into a composite $f \circ g$
04
Key terms
Composition $(f \circ g)(x)$Applying one function to the result of another: $(f \circ g)(x) = f(g(x))$.
Domain of compositeAll $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$.
CommutativeAn operation where order does not matter. Function composition is generally NOT commutative.
DecompositionWriting a given function $h$ as $h = f \circ g$ by identifying suitable inner and outer functions.
05
Definition and notation
core concept

The composition of $f$ with $g$ is the function obtained by applying $g$ first, then $f$:

$$(f \circ g)(x) = f(g(x))$$

Read the notation carefully: $f(g(x))$ means substitute the entire expression $g(x)$ in place of $x$ in $f$. The function on the right ($g$) acts first; the function on the left ($f$) acts second.

Domain of $f \circ g$: the set of all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$:

$$\text{dom}(f \circ g) = \{x \in \text{dom}(g) : g(x) \in \text{dom}(f)\}$$
x g g(x) f f(g(x)) (f ∘ g)(x)

$x$ enters $g$, producing $g(x)$. That output enters $f$, producing $f(g(x))$. The whole pipeline is $(f \circ g)(x)$.

Real-world example. A thermometer reads Celsius $C$, then a function $g$ converts to Fahrenheit: $g(C) = \frac{9}{5}C + 32$. A comfort-level function $f$ takes Fahrenheit and outputs "hot/warm/cool". The composite $f(g(C))$ maps Celsius directly to comfort level — that's composition in action.

(f g)(x) = f(g(x)) — substitute g(x) into f in place of x; Read right to left: the rightmost function acts first

Pause — copy the composition definition into your book: $(f \circ g)(x) = f(g(x))$ — substitute $g(x)$ into $f$ in place of every $x$; read right-to-left so $g$ acts first, then $f$ acts on the result.

Quick check: If $f(x) = 2x + 1$ and $g(x) = x^2$, what is $f(g(3))$?

06
Why order matters — non-commutativity
core concept

We just saw that $(f \circ g)(x) = f(g(x))$ means $g$ acts first on $x$, then $f$ acts on that result. That raises a question: does swapping the order of $f$ and $g$ give the same answer, or does the order always matter? This card answers it → composition is not commutative: $f(g(x)) \ne g(f(x))$ in general; the exception is when $f$ and $g$ are mutual inverses.

Unlike multiplication, function composition is not commutative: in general, $f(g(x)) \ne g(f(x))$.

Example: Let $f(x) = 2x + 1$ and $g(x) = x^2$.

$$f(g(x)) = f(x^2) = 2x^2 + 1$$
$$g(f(x)) = g(2x+1) = (2x+1)^2 = 4x^2 + 4x + 1$$

These are clearly different polynomials. The hook question at the start used $x = 2$:

  • $f(g(2)) = f(4) = 9$
  • $g(f(2)) = g(5) = 25$

Always be clear about which composition you are forming, and always apply the functions in the correct order.

f(g(x)) g(f(x)) in general — composition is NOT commutative; Exception: f and g commute when f = g^{-1} (they are inverses of each other)

Pause — copy the non-commutativity rule into your book: $f(g(x)) \ne g(f(x))$ in general; the only exception is when $f = g^{-1}$, in which case both compositions equal $x$.

Did you get this? True or false: for any two functions $f$ and $g$, $f(g(x)) = g(f(x))$.

PROBLEM 1 · EVALUATING COMPOSITES

If $f(x) = 2x + 1$ and $g(x) = x^2$, find $f(g(x))$ and $g(f(x))$.

1
$f(g(x)) = f(x^2) = 2(x^2) + 1 = 2x^2 + 1$
Substitute $g(x) = x^2$ into $f$: replace every $x$ in $f(x) = 2x+1$ with $x^2$.
PROBLEM 2 · DOMAIN OF A COMPOSITE

If $f(x) = \sqrt{x}$ and $g(x) = x - 4$, find $f(g(x))$ and its domain.

1
$f(g(x)) = f(x-4) = \sqrt{x - 4}$
Substitute $g(x) = x - 4$ into $f(x) = \sqrt{x}$: replace $x$ with $(x - 4)$.
PROBLEM 3 · DECOMPOSING COMPOSITES

Given $h(x) = (3x + 1)^4$, find functions $f$ and $g$ such that $h = f \circ g$.

1
Identify the "inside" and "outside": the inner expression is $3x + 1$; the outer operation is raising to the power of 4.
When decomposing, ask: what is being plugged into what? The inner function produces $3x+1$; the outer function receives it and raises it to the fourth power.

Fill the gap: If $f(x) = \dfrac{1}{x}$ and $g(x) = x + 3$, then $f(g(x)) = \dfrac{1}{x +}$ .

Trap 01
Getting the order of composition backwards
Students frequently compute $f(g(x))$ as if it means "apply $f$ first". Remember: $f(g(x))$ means $g$ acts first, then $f$. The inner function (on the right) always acts first. When in doubt, think of the function machine: $x \to g \to f$.
Trap 02
Forgetting to restrict the domain
Students find $f(g(x))$ correctly but state the domain as "all real numbers" without checking. The domain of $f \circ g$ requires both that $x \in \text{dom}(g)$ and that $g(x) \in \text{dom}(f)$. Either condition can introduce extra restrictions.
Trap 03
Treating composition like multiplication
$f(g(x))$ does NOT mean $f(x) \times g(x)$ (that's the product of functions). Composition means substitution: the entire output of $g$ becomes the input of $f$. These are completely different operations and produce different results.

Did you get this? True or false: if $f(x) = \sqrt{x}$ and $g(x) = x - 9$, then the domain of $f(g(x))$ is $x \geq 9$.

Work mode · how are you completing this lesson?
1

If $f(x) = x^2 + 1$ and $g(x) = 3x - 2$, find $f(g(x))$ and $g(f(x))$.

2

If $f(x) = \dfrac{1}{x + 1}$ and $g(x) = x^2$, find $f(g(x))$ and state its domain.

3

Find functions $f$ and $g$ such that $f(g(x)) = \sqrt{x^2 + 4}$.

4

If $h(x) = \dfrac{1}{\sqrt{x - 2}}$, find $f$ and $g$ such that $h = f \circ g$, then state the domain of $h$.

5

Give an example of two functions $f$ and $g$ for which $f(g(x)) = g(f(x))$ for all $x$. Explain why they commute.

Odd one out: Three of these are valid decompositions of $h(x) = (2x+3)^5$. Which one is NOT a valid decomposition?

11
Revisit your thinking

Earlier you computed $f(g(2))$ and $g(f(2))$ for $f(x) = x+1$ and $g(x) = x^2$.

$f(g(2)) = f(4) = 5$, but $g(f(2)) = g(3) = 9$. They differ because composition is not commutative — applying $g$ (squaring) before $f$ (adding 1) gives a different result than the other way around. The order of function application matters just like the order of dressing yourself matters (socks before shoes, not the reverse).

auto-saved
01
Multiple choice
+5 XP per correct · +25 XP all-correct

Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.

02
Short answer
ApplyBand 42 marks

Q1. If $f(x) = x^2 + 1$ and $g(x) = 3x - 2$, find $f(g(x))$ and $g(f(x))$. (2 marks)

auto-saved
ApplyBand 42 marks

Q2. If $f(x) = \dfrac{1}{x + 1}$ and $g(x) = x^2$, find $f(g(x))$ and state its domain. (2 marks)

auto-saved
AnalyseBand 52 marks

Q3. Find functions $f$ and $g$ such that $f(g(x)) = \sqrt{x^2 + 4}$. (2 marks)

auto-saved
Comprehensive answers (click to reveal)

Activities: 1. $f(g(x)) = (3x-2)^2+1 = 9x^2-12x+5$; $g(f(x)) = 3(x^2+1)-2 = 3x^2+1$ · 2. $f(g(x)) = \frac{1}{x^2+1}$; domain $x^2+1 \ne 0$ means domain is all reals $\mathbb{R}$ (since $x^2+1 \geq 1 > 0$ always) · 3. $g(x) = x^2+4$, $f(x) = \sqrt{x}$ · 4. $g(x) = x-2$, $f(x) = \frac{1}{\sqrt{x}}$; domain: $x - 2 > 0 \Rightarrow x > 2$ · 5. Any pair of inverse functions commute, e.g. $f(x) = 2x$, $g(x) = \frac{x}{2}$; they commute because $f(g(x)) = x = g(f(x))$.

Q1 (2 marks): $f(g(x)) = f(3x-2) = (3x-2)^2 + 1 = 9x^2 - 12x + 4 + 1 = 9x^2 - 12x + 5$ [1]. $g(f(x)) = g(x^2+1) = 3(x^2+1) - 2 = 3x^2 + 3 - 2 = 3x^2 + 1$ [1].

Q2 (2 marks): $f(g(x)) = f(x^2) = \dfrac{1}{x^2 + 1}$ [1]. Domain: $x^2 + 1 \ne 0$. Since $x^2 \geq 0$, we have $x^2 + 1 \geq 1 > 0$ for all real $x$. Domain is $\mathbb{R}$ (all real numbers) [1].

Q3 (2 marks): Let $g(x) = x^2 + 4$ (inner: the expression under the root) and $f(x) = \sqrt{x}$ (outer: the square root) [1]. Verify: $f(g(x)) = f(x^2+4) = \sqrt{x^2+4} = h(x)$ ✓ [1].

01
Boss battle · The Function Chainer
earn bronze · silver · gold

Five timed questions on composite functions, domains, and decompositions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.

⚔ Enter the arena
02
Science Jump · platform challenge

Climb platforms by answering composite function questions. A lighter alternative to the boss.

Mark lesson as complete

Tick when you've finished the practice and review.

🎓
Want help with Composite Functions?

Work through this topic 1-on-1 with an experienced HSC tutor.

Book a free session →