Skip to main content
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=xy = x, and restricting domains to invert non-one-to-one functions, with worked examples.

Generated by Claude Opus 4.814 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

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}.

See the inverse appear as a reflection, stage by stage

Take f(x)=2xβˆ’3f(x) = 2x - 3 (whose inverse is fβˆ’1(x)=x+32f^{-1}(x) = \frac{x + 3}{2}, found below). The four panels build the inverse purely by reflecting in y=xy = x, with no algebra, so you can see why swapping coordinates is the same as mirroring.

Stage 1, draw the function and the mirror line. Plot y=f(x)=2xβˆ’3y = f(x) = 2x - 3 and the dashed line y=xy = x. The line y=xy = x is the mirror; every point will be flipped across it. Mark the yy-intercept (0,βˆ’3)(0, -3) to track later.

Function and the mirror line y equals xThe line y equals f of x equals two x minus three is drawn in accent, with the dashed mirror line y equals x. The y-intercept at zero minus three is marked.xy-33y = xy = f(x)(0, -3)Stage 1Draw y = f(x) = 2x - 3 and the mirror line y = x (dashed).

Stage 2, reflect a single point. Take a point on ff, say (2,1)(2, 1). Reflecting in y=xy = x swaps its coordinates to give (1,2)(1, 2). The connector between them crosses y=xy = x at right angles, which is exactly what "reflection in y=xy = x" means.

Reflecting a single point in the line y equals xThe point two one on y equals f of x reflects across the dashed line y equals x to the point one two, with a thin connector showing the coordinates swap.xy-33y = xy = f(x)(2, 1)(1, 2)Stage 2Reflect a point across y = x: (2, 1) becomes (1, 2). Coordinates swap.

Stage 3, reflect the whole graph. Reflect every point of ff in the same way and the images trace out a new straight line: y=fβˆ’1(x)=x+32y = f^{-1}(x) = \frac{x + 3}{2}. The original ff is now muted; its mirror image is the inverse, in accent. Because ff is increasing, so is its inverse.

The inverse function as the reflection of fThe inverse y equals f inverse of x equals x plus three over two is the reflection of y equals f of x in the dashed line y equals x. The original f is muted and the inverse is in accent.xy-33y = xy = f(x)y = f⁻¹(x)Stage 3Reflect every point: y = f⁻¹(x) = (x + 3)/2, the mirror image of f in y = x.

Stage 4, read off the swapped intercepts. The reflection swaps the axes, so the yy-intercept of ff at (0,βˆ’3)(0, -3) becomes the xx-intercept of fβˆ’1f^{-1} at (βˆ’3,0)(-3, 0). This is the graphical face of "domain and range swap" and is a quick way to sketch an inverse without finding its equation.

Swapped intercepts of f and its inverseThe y-intercept of f at zero minus three corresponds to the x-intercept of the inverse at minus three zero, showing coordinates swap under the reflection.xy-33y = xy = f(x)y = f⁻¹(x)(0, -3)(-3, 0)Stage 4Intercepts swap: f cuts the y-axis at (0, -3); f⁻¹ cuts the x-axis at (-3, 0).

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.

  • f(x)=x2f(x) = x^2: 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}.
  • f(x)=sin⁑xf(x) = \sin x: 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].
  • f(x)=cos⁑xf(x) = \cos x: 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.

How exam questions ask about composite and inverse functions

These dot points are examined with a small set of recurring instructions. Translate each one to the method:

  • "Find f(g(x))f(g(x)) and g(f(x))g(f(x))." Substitute the inner function into the outer one, both ways, and simplify. They usually differ, so compute both; do not assume symmetry (2022 HSC Q18).
  • "State the domain of f∘gf \circ g." Two conditions: xx in the domain of gg, and g(x)g(x) in the domain of ff. The binding one is whichever restricts xx more.
  • "Find fβˆ’1(x)f^{-1}(x)" or "find the inverse function." Swap xx and yy, solve for yy, and state the domain of fβˆ’1f^{-1} (which is the range of ff).
  • "Does ff have an inverse?" or "is ff one-to-one?" Apply the horizontal line test, or argue ff is strictly increasing/decreasing. If it fails, the answer is no on that domain.
  • "State a restriction so that ff has an inverse, then find it." Pick an interval on which ff is monotonic (for x2x^2, take xβ‰₯0x \ge 0 or x≀0x \le 0), then invert; the restriction decides the sign of the square root (2021 HSC Q19).
  • "Sketch y=f(x)y = f(x) and y=fβˆ’1(x)y = f^{-1}(x) on the same axes." Draw ff, draw y=xy = x dashed, and reflect; mark that intercepts and asymptotes swap axes. You do not need the inverse's equation to draw it.
  • "Show that g=fβˆ’1g = f^{-1}" or "verify the inverse." Compute f(g(x))f(g(x)) (and/or g(f(x))g(f(x))) and show it simplifies to xx.
  • "Where do ff and fβˆ’1f^{-1} meet?" For an increasing ff, intersections lie on y=xy = x, so solve f(x)=xf(x) = x.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2022 HSC Q184 marksLet f(x)=2xβˆ’3f(x) = 2 x - 3 and g(x)=x2g(x) = x^2. Find f(g(x))f(g(x)), g(f(x))g(f(x)), and the inverse function fβˆ’1(x)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)=x2f(x) = x^2 is not one-to-one on R\mathbb{R}. State a domain restriction that makes ff 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