MathsAlgebra and functions › Functions, inverses and the modulus

Functions, inverses and the modulus

A function maps each permitted input in its domain to exactly one output, and its range is the set of outputs it produces. This lesson adds the rules for composing two functions and for reversing one. The modulus makes negative values positive, and its V-shaped graphs give equations extra solutions.

Builds on Graphs, proportion and transformations.

IN THIS TOPIC

  • Distinguish a one-to-one mapping from a many-to-one mapping, and state a function's domain and range.
  • Build composite functions in the right order.
  • Find an inverse and give its domain and range.
  • Sketch modulus graphs, and solve modulus equations and inequalities from them.

COMMON MISCONCEPTION

Every function has an inverse.

Domain, range and the two kinds of mapping

A function assigns to each input exactly one output, written f(x) or f: x ↦ 2x + 1. Its domain is the set of inputs it accepts and its range is the set of outputs it actually produces. A function is one-one when distinct inputs always give distinct outputs, and many-one when two inputs can share an output, as x2 does by sending both 2 and −2 to 4. That distinction may look like a technicality. It is what determines which functions have inverses, which is the rest of the lesson.

Composites, and which one goes first

Chain two functions together and the notation reads right to left. In fg(x), the function nearest the input acts first, so g goes first. Swapping the order usually changes the answer.

WORKED EXAMPLE

Composites, in the right order

With f(x) = 2x + 1 and g(x) = x2, find fg(2) and gf(2), and the formula for fg(x).

fg means g first. g(2) = 4, then f(4) = 9, so fg(2) = 9.

The other order. f(2) = 5, then g(5) = 25, so gf(2) = 25.

In general fg(x) = f(x2) = 2x2 + 1.

The two results differ, which is the point of asking for both. Write down the inner function's output before you touch the outer one and the order looks after itself.

Inverses, and which functions have them

The inverse f−1 undoes f, so f−1f(x) = x for every x in the domain, and its graph is the graph of f reflected in y = x, because undoing swaps input with output. Only one-one functions have inverses. A many-one function sends two inputs to one output, so there would be no way to determine which input the inverse should return. The standard remedy is a restricted domain. Take x2 + 4 on x ≥ 0, keep one arm of the parabola, and it becomes invertible.

The function x squared plus 4 for x at least 0 and its inverse the square root of x minus 4, drawn as reflections in the line y equals xf: x² + 4, x ≥ 0f⁻¹: √(x − 4)y = xdomain and range swap with the axes
FIG. 1f(x) = x² + 4 on x ≥ 0 and its inverse √(x − 4), reflections in y = x. The domain restriction is what makes the reflection a function at all.

WORKED EXAMPLE

An inverse with its domain and range

Find the inverse of f(x) = x2 + 4 with domain x ≥ 0, stating the domain and range of f−1.

Write y = x2 + 4 and solve for x, giving x = √(y − 4), taking the positive root because the domain of f is x ≥ 0.

Swap the letters. f−1(x) = √(x − 4).

The range of f is y ≥ 4, so the domain of f−1 is x ≥ 4 and its range is y ≥ 0. Domain and range trade places under inversion.

The swapped domain and range are part of the answer. Without the domain, √(x − 4) is a different function, and the answer mark goes with it.

The modulus

The modulus |x| strips signs, so the graph of y = |ax + b| is the line ax + b with everything below the axis folded up, a V with its vertex at the line's root. The same fold applied after a function gives y = |f(x)|, negative outputs reflected upward. Keep two different-looking relatives separate from it: y = f(−x) replaces x by −x and reflects the whole graph in the y-axis, while y = f(|x|) folds the input first, copying the right-hand half of the graph onto the left. Solving a modulus equation is a two-graph problem, and the sketch tells you how many answers to expect.

The graph of the modulus of 2x minus 1 cut by the line y equals x: crossings at x equal to one third and at x equal to 1y = |2x − 1|y = xx = ⅓x = 1one crossing per arm; the sketch counts them first
FIG. 2y = |2x − 1| against y = x. One crossing on the reflected arm at x = ⅓, one on the original arm at x = 1, so the sketch shows two solutions.

WORKED EXAMPLE

A modulus equation, both arms

Solve |2x − 1| = x.

Original arm. 2x − 1 = x gives x = 1, and the check |1| = 1 holds.

Reflected arm. −(2x − 1) = x gives 1 − 2x = x, so x = ⅓, and |−⅓| = ⅓ holds.

Solutions: x = ⅓ and x = 1, matching the two crossings on the sketch.

Each arm contributes one candidate and each candidate goes back into the original equation, because folding can produce values that satisfy neither arm.

GUIDED PRACTICE

The matching inequality

Solve |2x − 1| > x, before opening the working.

Show the working

The critical points are the crossings just found, x = ⅓ and x = 1.

Between them the V dips below the line, so the modulus is the larger outside them: x < ⅓ or x > 1.

A test value settles any doubt. At x = ½ the left side is 0 and the right is ½, so the middle interval genuinely fails.

INDEPENDENT PRACTICE

A composite with two answers

With f(x) = 2x + 1 and g(x) = x2, solve gf(x) = 9.

Show the working

gf(x) = (2x + 1)2, so (2x + 1)2 = 9 and 2x + 1 = ±3.

The two arms give x = 1 and −2.

Squares behave like a modulus here, two preimages for one output. That is the many-one behaviour from the start of the lesson, appearing as an exam question.

ASSESSMENT FOCUS

  • fg means g first. Write the inner function's output down before touching the outer one.
  • To invert, set y = f(x), solve for x, swap the letters, then state the new domain and range. The domain of f−1 is the range of f, and forgetting to say so is the standard dropped mark.
  • Only one-one functions invert. Asked why f has no inverse, name two inputs that share an output; a sentence about “failing the horizontal line test” on its own is thin.
  • Sketch a modulus equation and count the crossings first. Then solve one linear equation per arm and check each answer in the original.
  • For |f(x)|, fold the below-axis parts up and leave everything else alone. For f(−x), reflect in the y-axis; for f(|x|), copy the right-hand half to the left.

CHECK YOURSELF

With f(x) = 3x − 2 on all of ℝ, find f−1(x), and solve |3x − 2| = 4.

Show a hint

Linear functions are one-one everywhere; the modulus needs both arms.

Show the answer

Solving y = 3x − 2 for x gives x = (y + 2)/3, so f−1(x) = (x + 2)/3, with no restriction needed.

The arms of |3x − 2| = 4. 3x − 2 = 4 gives x = 2, and 3x − 2 = −4 gives x = −⅔.

Solutions x = 2 and x = −⅔, and both satisfy the original equation when substituted back.

fg runs g first. An inverse undoes, reflects in y = x, and swaps domain with range.

Only one-one functions invert.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

7 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the functions, inverses and the modulus questions page.

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Distinguish a one-to-one mapping from a many-to-one mapping, and state a function's domain and range.
  • Build composite functions in the right order.
  • Find an inverse and give its domain and range.
  • Sketch modulus graphs, and solve modulus equations and inequalities from them.

Open the full revision checklist to see every objective in the course in one place.