Skip to main content

Composite and inverse functions (SACE Stage 2 Specialist Mathematics)

Syllabus dot point

“Form composite functions and find inverse functions, attending to domain and range and the condition for an inverse to exist.”

8 min read

Quick answer

A composite f∘gf \circ g means "do gg first, then ff": (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)), and it is only defined where g(x)g(x) lands in the domain of ff. A function has an inverse exactly when it is one-to-one (passes the horizontal line test). To find f−1f^{-1}, swap xx and yy and solve for yy; its graph is the reflection of ff in the line y=xy = x, with domain and range swapped.

Jump to a section
  1. What this dot point is asking
  2. Composite functions
  3. When does an inverse exist?
  4. Finding an inverse algebraically
  5. Composing more than two functions
  6. The graphical relationship
  7. Exam-style questions

What this dot point is asking

You need to form composite functions with correct domains, determine when an inverse function exists, find inverse functions, and relate a function and its inverse graphically.

Composite functions

The composite (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) applies gg first and feeds the result into ff. Order matters: in general f∘g≠g∘ff \circ g \ne g \circ f.

Domain of a composite

(f∘g)(x)(f \circ g)(x) is defined only when xx is in the domain of gg and g(x)g(x) lies in the domain of ff. Always check the inner output is allowed as an input to the outer function - the natural domain of the composite can be smaller than the domain of gg alone.

For example, if f(x)=xf(x) = \sqrt{x} and g(x)=x−4g(x) = x - 4, then (f∘g)(x)=x−4(f \circ g)(x) = \sqrt{x - 4}, defined only for x≥4x \ge 4, even though gg itself is defined for all real xx.

When does an inverse exist?

An inverse function f−1f^{-1} reverses ff: if f(a)=bf(a) = b then f−1(b)=af^{-1}(b) = a. For this reversal to be a function, each output must come from exactly one input.

One-to-one and the horizontal line test

A function is one-to-one (injective) if different inputs always give different outputs. Graphically, it passes the horizontal line test: no horizontal line meets the graph more than once. A function has an inverse function if and only if it is one-to-one. A many-to-one function (such as f(x)=x2f(x) = x^2 on all of R\mathbb{R}) has no inverse unless its domain is restricted.

Restricting the domain can create an inverse: f(x)=x2f(x) = x^2 on x≥0x \ge 0 is one-to-one and has inverse f−1(x)=xf^{-1}(x) = \sqrt{x}.

Finding an inverse algebraically

The mechanical recipe: write y=f(x)y = f(x), swap xx and yy, then solve for yy. The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.

Finding an inverse with domain and range

Find the inverse of f(x)=2x+1x−3f(x) = \dfrac{2x + 1}{x - 3}, stating its domain

The domain of ff excludes x=3x = 3.

Step 1: Swap xx and yy

The mechanical recipe for finding an inverse is to write y=f(x)y = f(x) and then swap the roles of xx and yy. This reflects the graph in the line y=xy = x, which is exactly what inversion does geometrically.

Set y=2x+1x−3y = \dfrac{2x+1}{x-3} and swap variables:

x=2y+1y−3.x = \frac{2y + 1}{y - 3}.

Step 2: Solve for yy algebraically

Multiply both sides by (y−3)(y-3) to clear the denominator, then collect all yy terms on one side and factor.

x(y−3)=2y+1  ⟹  xy−3x=2y+1.x(y - 3) = 2y + 1 \implies xy - 3x = 2y + 1.

Collect yy terms:

xy−2y=3x+1  ⟹  y(x−2)=3x+1  ⟹  y=3x+1x−2.xy - 2y = 3x + 1 \implies y(x - 2) = 3x + 1 \implies y = \frac{3x + 1}{x - 2}.

So

f−1(x)=3x+1x−2.f^{-1}(x) = \frac{3x + 1}{x - 2}.

Step 3: Determine the domain of f−1f^{-1} from the range of ff

The domain of f−1f^{-1} is the range of ff, because the inverse swaps inputs and outputs. As x→∞x \to \infty, f(x)→2f(x) \to 2, and y=2y = 2 is never attained (the horizontal asymptote is approached but not reached), so the range of ff is all reals except 22.

Hence the domain of f−1f^{-1} is x≠2x \ne 2, consistent with the denominator x−2x - 2.

Final answer: f−1(x)=3x+1x−2f^{-1}(x) = \dfrac{3x + 1}{x - 2}, domain x≠2x \ne 2.

Composing more than two functions

Composition extends to three or more functions, applied from the inside out. For h(x)=f(g(k(x)))h(x)=f(g(k(x))) you evaluate kk first, feed the result to gg, then to ff. Each layer narrows the domain: a value is allowed only if it survives every stage. This nesting is exactly the structure the chain rule differentiates, so a clear grasp of composition here pays off directly in the calculus topics. When asked to decompose a function - to write 3x+1\sqrt{3x+1} as f(g(x))f(g(x)) - identify the outer operation (  \sqrt{\;}) and the inner expression (3x+13x+1); the decomposition is rarely unique, but the natural one names the last operation performed as the outer function.

The graphical relationship

The graph of f−1f^{-1} is the reflection of the graph of ff in the line y=xy = x. Consequently a point (a,b)(a, b) on ff corresponds to (b,a)(b, a) on f−1f^{-1}, and any intersection of ff with its inverse lies on the line y=xy = x (for increasing functions). Composing a function with its inverse returns the input:

f−1(f(x))=xandf(f−1(x))=x,f^{-1}(f(x)) = x \quad \text{and} \quad f(f^{-1}(x)) = x,

each on the appropriate domain.

Verifying an inverse

To check your inverse is correct, compute f(f−1(x))f(f^{-1}(x)); it should simplify to xx. This catches algebra slips far more reliably than re-reading the rearrangement.

Common errors
Reversing the order of composition
(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) applies gg first. Writing g(f(x))g(f(x)) instead is a frequent error.
Ignoring the composite's domain
The inner function's output must be a legal input for the outer function; the composite domain may be smaller than expected.
Inverting a many-to-one function
A function with no domain restriction may fail the horizontal line test and have no inverse. State and use a restricted domain when needed.
Forgetting to swap domain and range
The domain of f−1f^{-1} is the range of ff. Stating the inverse rule without its restricted domain is an incomplete answer.

Exam-style questions

Questions in the style of SACE Board exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

SACE 2022-style2 marks
Calculator-assumed. The graph of g(x)=sin⁡x+cos⁡xg(x) = \sin x + \cos x is drawn for −π≤x≤π-\pi \le x \le \pi. Explain why g(x)g(x) is a function but does not have an inverse function.
Show worked answer →

g(x)g(x) is a function because every xx in −π≤x≤π-\pi \le x \le \pi maps to exactly one value of g(x)g(x); the graph passes the vertical line test. [1 mark]

However, g(x)g(x) is not one-to-one over this domain: the curve rises then falls (it has a maximum), so a horizontal line such as y=1y = 1 cuts the graph more than once, meaning two different xx values give the same output. [1 mark]

For an inverse to exist the function must be one-to-one (pass the horizontal line test), so the domain would need restricting to an interval on which gg is strictly monotonic.

SACE 2022-style1 mark
Calculator-assumed. The rule f(x)=sin⁡x+cos⁡xf(x) = \sin x + \cos x is restricted to a domain on which it is one-to-one. Explain why this restricted function does have an inverse.
Show worked answer →

Since sin⁡x+cos⁡x=2sin⁡ ⁣(x+π4)\sin x + \cos x = \sqrt{2}\sin\!\left(x + \tfrac{\pi}{4}\right), restricting the domain to an interval on which it is strictly monotonic makes the function one-to-one. [1 mark]

Because each output is now produced by exactly one input, the graph passes the horizontal line test, so the mapping can be reversed: every yy in the range corresponds to a single xx. A one-to-one function always has an inverse.

SACE 2023-style3 marks
Calculator-free. Given f(x)=x+2x−1f(x) = \dfrac{x + 2}{x - 1} for x≠1x \ne 1, find f−1(x)f^{-1}(x) and state its domain.
Show worked answer →

Set y=x+2x−1y = \dfrac{x + 2}{x - 1} and swap variables: x=y+2y−1x = \dfrac{y + 2}{y - 1}.

Solve: x(y−1)=y+2x(y - 1) = y + 2, so xy−x=y+2xy - x = y + 2, giving xy−y=x+2xy - y = x + 2, hence y(x−1)=x+2y(x - 1) = x + 2 and y=x+2x−1y = \dfrac{x + 2}{x - 1}.

So f−1(x)=x+2x−1f^{-1}(x) = \dfrac{x + 2}{x - 1} (this function is self-inverse). The domain of f−1f^{-1} is the range of ff, which is x≠1x \ne 1.

Marks: one for swapping and rearranging, one for solving for yy, one for stating the domain x≠1x \ne 1.

Practise this

Sources & how we know this

ExamExplained