← Year 12: Functions

NSWMaths AdvancedSyllabus dot point

When does a function have an inverse, and how do we form, evaluate and graph composite and inverse functions?

Form composite functions, determine when a function has an inverse, find and graph the inverse, and use restriction of domain to invert non-one-to-one functions

A focused answer to the HSC Maths Advanced dot point on composite and inverse functions. Composition order and domain, the horizontal line test, finding the inverse by swapping and solving, the reflection in $y = x$, and restricting domains to invert non-one-to-one functions, with worked examples.

Generated by Claude OpusReviewed by Better Tuition Academy9 min answer

Have a quick question? Jump to the Q&A page

What this dot point is asking

NESA wants you to form composite functions f∘gf \circ g and g∘fg \circ f, determine when a function has an inverse using the horizontal line test or one-to-one criterion, find the inverse algebraically, sketch it as the reflection in y=xy = x, and restrict the domain of a non-one-to-one function so an inverse exists.

The answer

Composite functions

The composite f∘gf \circ g is the function (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)): apply gg first, then ff to the result.

Domain: xx must be in the domain of gg, and g(x)g(x) must be in the domain of ff. In other words, the natural domain of f∘gf \circ g is

{x∈dom(g):g(x)∈dom(f)}.\{x \in \text{dom}(g) : g(x) \in \text{dom}(f)\}.

Composition is not commutative: usually f(g(x))β‰ g(f(x))f(g(x)) \neq g(f(x)).

Composition is associative: (f∘g)∘h=f∘(g∘h)=f(g(h(x)))(f \circ g) \circ h = f \circ (g \circ h) = f(g(h(x))).

When does an inverse exist

A function ff has an inverse (on its given domain) if and only if it is one-to-one: every value of yy in the range comes from exactly one xx.

Equivalent test (the horizontal line test): every horizontal line meets the graph at most once. Strictly increasing or strictly decreasing functions are automatically one-to-one. Many "natural" functions like x2x^2, sin⁑x\sin x, cos⁑x\cos x, and ∣x∣|x| are not one-to-one on their natural domain and need their domain restricted.

Finding an inverse algebraically

The inverse fβˆ’1f^{-1} "undoes" ff: fβˆ’1(f(x))=xf^{-1}(f(x)) = x for x∈dom(f)x \in \text{dom}(f) and f(fβˆ’1(y))=yf(f^{-1}(y)) = y for y∈range(f)y \in \text{range}(f).

To find fβˆ’1f^{-1} from y=f(x)y = f(x):

  1. Swap xx and yy.
  2. Solve for yy in terms of xx.
  3. State the domain of fβˆ’1f^{-1}, which is the range of ff.

The inverse graph

The graph of y=fβˆ’1(x)y = f^{-1}(x) is the reflection of the graph of y=f(x)y = f(x) in the line y=xy = x. Point (a,b)(a, b) on ff corresponds to (b,a)(b, a) on fβˆ’1f^{-1}. Horizontal asymptotes of ff become vertical asymptotes of fβˆ’1f^{-1} and vice versa.

If ff is increasing, so is fβˆ’1f^{-1}. If ff is decreasing, so is fβˆ’1f^{-1}.

Restricting the domain

For a non-one-to-one function ff, choose a domain on which ff is one-to-one, then invert. Different restrictions give different inverses.

  • IMATH_52 : restrict to xβ‰₯0x \ge 0 to get fβˆ’1(x)=xf^{-1}(x) = \sqrt{x}. Restricting to x≀0x \le 0 gives fβˆ’1(x)=βˆ’xf^{-1}(x) = -\sqrt{x}.
  • IMATH_57 : standard restriction is βˆ’Ο€2≀x≀π2-\frac{\pi}{2} \le x \le \frac{\pi}{2}. Inverse is arcsin⁑x\arcsin x on [βˆ’1,1][-1, 1].
  • IMATH_61 : standard restriction is 0≀x≀π0 \le x \le \pi. Inverse is arccos⁑x\arccos x on [βˆ’1,1][-1, 1].

Operations and inverses

The inverse of a composition reverses the order:

(f∘g)βˆ’1=gβˆ’1∘fβˆ’1,(f \circ g)^{-1} = g^{-1} \circ f^{-1},

provided both inverses exist on appropriate domains. Think of putting on socks then shoes: to undo, take off shoes then socks.

Worked examples

Composition with domain check

Let f(x)=xf(x) = \sqrt{x} (domain xβ‰₯0x \ge 0) and g(x)=xβˆ’4g(x) = x - 4. Find f(g(x))f(g(x)) and its domain.

f(g(x))=xβˆ’4f(g(x)) = \sqrt{x - 4}.

Domain: need g(x)β‰₯0g(x) \ge 0, that is xβ‰₯4x \ge 4. Domain of f∘gf \circ g is [4,∞)[4, \infty).

Inverse of a linear function

f(x)=5βˆ’2xf(x) = 5 - 2 x. Swap and solve: x=5βˆ’2yx = 5 - 2 y, so y=5βˆ’x2y = \frac{5 - x}{2}.

fβˆ’1(x)=5βˆ’x2f^{-1}(x) = \frac{5 - x}{2}. Both ff and fβˆ’1f^{-1} are decreasing linear functions, and their graphs reflect across y=xy = x.

Inverse of an exponential

f(x)=ex+1f(x) = e^{x} + 1 has domain R\mathbb{R} and range (1,∞)(1, \infty).

Swap: x=ey+1x = e^y + 1, so ey=xβˆ’1e^y = x - 1, so y=ln⁑(xβˆ’1)y = \ln(x - 1).

fβˆ’1(x)=ln⁑(xβˆ’1)f^{-1}(x) = \ln(x - 1), with domain (1,∞)(1, \infty) (the range of ff).

Domain restriction

f(x)=(xβˆ’1)2f(x) = (x - 1)^2 on R\mathbb{R} is not one-to-one (the parabola has its vertex at x=1x = 1 and is symmetric about it).

Restrict to xβ‰₯1x \ge 1: ff is increasing with range [0,∞)[0, \infty).

Swap: x=(yβˆ’1)2x = (y - 1)^2, so yβˆ’1=xy - 1 = \sqrt{x} (positive root because yβ‰₯1y \ge 1), so y=1+xy = 1 + \sqrt{x}.

fβˆ’1(x)=1+xf^{-1}(x) = 1 + \sqrt{x} on [0,∞)[0, \infty).

Checking with composition

For f(x)=5βˆ’2xf(x) = 5 - 2 x and fβˆ’1(x)=5βˆ’x2f^{-1}(x) = \frac{5 - x}{2}:

f(fβˆ’1(x))=5βˆ’2β‹…5βˆ’x2=5βˆ’(5βˆ’x)=xf(f^{-1}(x)) = 5 - 2 \cdot \frac{5 - x}{2} = 5 - (5 - x) = x. So fβˆ’1f^{-1} is correct.

Common traps

Composing in the wrong order. f(g(x))f(g(x)) applies gg first; g(f(x))g(f(x)) applies ff first. These give different functions in general.

Confusing the inverse with the reciprocal. fβˆ’1(x)f^{-1}(x) means the inverse function, not 1f(x)\frac{1}{f(x)}. For example, if f(x)=x+2f(x) = x + 2, then fβˆ’1(x)=xβˆ’2f^{-1}(x) = x - 2, not 1x+2\frac{1}{x + 2}.

Forgetting to restrict. Writing y=xy = \sqrt{x} as "the inverse of y=x2y = x^2" without specifying xβ‰₯0x \ge 0 misses half the picture: the original function must be made one-to-one first.

Wrong domain for the inverse. The domain of fβˆ’1f^{-1} equals the range of ff. For f(x)=exf(x) = e^x with range (0,∞)(0, \infty), the inverse ln⁑x\ln x has domain (0,∞)(0, \infty).

Mixing up which side gets the Β±\pm. When solving x=y2x = y^2 for yy, the choice of x\sqrt{x} or βˆ’x-\sqrt{x} is determined by the restricted domain of ff, not arbitrary.

In one sentence

A function has an inverse precisely when it is one-to-one; the inverse is found by swapping xx and yy then solving, its graph is the reflection of ff in y=xy = x, and non-one-to-one functions must first have their domain restricted before an inverse exists.

Past exam questions, worked

Real questions from past NESA papers on this dot point, with our answer explainer.

2022 HSC Q184 marksLet $f(x) = 2 x - 3$ and $g(x) = x^2$. Find $f(g(x))$, $g(f(x))$, and the inverse function $f^{-1}(x)$.
Show worked answer β†’

Composition is "outside applied to inside".

f(g(x))=f(x2)=2x2βˆ’3f(g(x)) = f(x^2) = 2 x^2 - 3.

g(f(x))=g(2xβˆ’3)=(2xβˆ’3)2=4x2βˆ’12x+9g(f(x)) = g(2 x - 3) = (2 x - 3)^2 = 4 x^2 - 12 x + 9.

To invert ff, swap xx and yy and solve: x=2yβˆ’3β€…β€ŠβŸΉβ€…β€Šy=x+32x = 2 y - 3 \implies y = \frac{x + 3}{2}.

fβˆ’1(x)=x+32f^{-1}(x) = \frac{x + 3}{2}.

Markers reward correct composition in both orders (they differ), the swap-and-solve method for the inverse, and a tidy final expression.

2021 HSC Q194 marksThe function $f(x) = x^2$ is not one-to-one on $\mathbb{R}$. State a domain restriction that makes $f$ one-to-one, find the inverse on that restricted domain, and state the domain and range of the inverse.
Show worked answer β†’

Restrict to xβ‰₯0x \ge 0. On this domain, ff is increasing and one-to-one, with range [0,∞)[0, \infty).

Inverse: swap xx and yy in y=x2y = x^2 to get x=y2x = y^2 with yβ‰₯0y \ge 0, so y=xy = \sqrt{x}.

fβˆ’1(x)=xf^{-1}(x) = \sqrt{x} on domain [0,∞)[0, \infty) with range [0,∞)[0, \infty).

Markers expect a domain choice that yields a one-to-one function, a correct inverse derived by swap-and-solve with the right sign, and a domain and range that match.

Related dot points