A-level Mathematics

🇬🇧 United Kingdom Curriculum

Lesson 2: Functions and Graphs

🎧 Audio narration for this lesson is coming soon.

Functions are the central objects of A-level mathematics — machines that turn inputs into outputs, modelling everything from projectile paths to bank balances. This lesson builds the rigorous A-level treatment: domain and range, composite and inverse functions, transformations of graphs, and the modulus function. Where GCSE treated graphs as pictures to sketch, A-level treats functions as objects to manipulate algebraically, and examiners test whether you can move fluently between the symbolic, graphical, and numerical views.

Functions, domain, and range

A function f maps each input x in its domain to exactly one output f(x). The 'exactly one' is the whole definition: x² + y² = 1 is not a function (x = 0 gives y = ±1) — it fails the vertical line test. The domain is the set of allowed inputs; the range is the set of achieved outputs. For f(x) = √(x − 2), the domain is x ≥ 2 (you cannot take the square root of a negative); the range is f(x) ≥ 0.

Domains are restricted by three danger operations: division by zero, square roots of negatives, and logarithms of non-positive numbers. For f(x) = 1/(x² − 4), exclude x = ±2 (denominator zero): domain x ∈ ℝ, x ≠ ±2. For g(x) = ln(x² − 9), need x² − 9 > 0, so |x| > 3: domain x < −3 or x > 3. Finding domains is a staple first question — methodical checking of each operation never fails.

Range-finding reverses the thinking: what outputs are possible? For f(x) = x² + 4x + 7 with domain x ≥ 0, complete the square: (x + 2)² + 3, increasing for x ≥ 0, so the minimum output is f(0) = 7: range f(x) ≥ 7. For f(x) = 3/(x + 1), the output can be any non-zero real (as x → ±∞, f → 0 but never reaches it): range y ≠ 0. Sketching the graph is the most reliable range-finder — draw first, read off second.

Composite and inverse functions

The composite function fg(x) means 'apply g, then f': fg(x) = f(g(x)). Order matters — fg and gf are usually different. Example: f(x) = 2x + 3, g(x) = x². Then fg(x) = 2x² + 3, but gf(x) = (2x + 3)² = 4x² + 12x + 9. Worked exam-style: f(x) = 3x − 1, g(x) = 2/(x + 1), x ≠ −1. Find fg(2): g(2) = 2/3, f(2/3) = 3(2/3) − 1 = 1. Find gf(x): g(f(x)) = 2/(3x − 1 + 1) = 2/(3x), x ≠ 0.

The inverse function f⁻¹ reverses f: f⁻¹(f(x)) = x. Only one-to-one functions (each output from exactly one input) have inverses — f(x) = x² on all of ℝ has no inverse, but restricted to x ≥ 0 it does: f⁻¹(x) = √x. To find an inverse algebraically: set y = f(x), rearrange to make x the subject, then swap: for f(x) = (2x + 5)/3: y = (2x + 5)/3 → 3y = 2x + 5 → x = (3y − 5)/2, so f⁻¹(x) = (3x − 5)/2. Check: ff⁻¹(x) = (2(3x − 5)/2 + 5)/3 = 3x/3 = x. The domain of f⁻¹ is the range of f, and vice versa — a favourite exam trap.

Worked example (inverse with a fraction). Find the inverse of f(x) = 2/(x + 2), x ≠ −2. Set y = 2/(x + 2): then x + 2 = 2/y, so x = 2/y − 2, giving f⁻¹(x) = 2/x − 2. The range of f is y ≠ 0 (the fraction never equals 0), so the domain of f⁻¹ is x ≠ 0 — exactly the value excluded by its own denominator. Self-consistent, as it must be.

Graphically, y = f⁻¹(x) is the reflection of y = f(x) in the line y = x. If f(3) = 7 then f⁻¹(7) = 3 — points swap coordinates. A-level problems combine these: given f(x) = eˣ + 2, find f⁻¹(x) = ln(x − 2) (domain x > 2), then solve f⁻¹(x) = 3: ln(x − 2) = 3 → x = e³ + 2 ≈ 22.09. In context: if f models a bank balance after x years, f⁻¹ answers 'how long until the balance reaches £y?'

Transformations of graphs

Every graph transformation has an algebraic cause. For y = f(x): y = f(x) + a shifts up by a; y = f(x + a) shifts left by a (counterintuitive — inside the brackets, the shift reverses); y = af(x) stretches vertically by factor a; y = f(ax) stretches horizontally by factor 1/a; y = −f(x) reflects in the x-axis; y = f(−x) reflects in the y-axis. Learn these as a table and apply them mechanically.

Worked example: the curve y = x² is transformed to y = 3(x − 2)² + 1. Reading inside-out: (x − 2) shifts right 2; squaring keeps the parabola; ×3 stretches vertically by 3; +1 shifts up 1. The vertex moves from (0, 0) to (2, 1). Reverse problem (exam favourite): describe the transformation mapping y = sin x to y = 2 sin(3x − π) + 1. Rewrite as 2 sin(3(x − π/3)) + 1: horizontal stretch by 1/3, shift right π/3, vertical stretch by 2, shift up 1. Factorising the inside form (x − π/3) is the step most students miss.

Order matters for combined transformations: stretches and shifts do not commute. y = 2f(x + 1) means shift left first, then stretch vertically (or equivalently: the transformation is applied to the graph as written, left to right in effect). When describing a sequence, apply each step to the result of the previous one, tracking a key point like the vertex throughout.

The modulus function

The modulus |x| is the distance from zero: |3| = 3, |−3| = 3. Formally, |x| = x if x ≥ 0, and |x| = −x if x < 0. Every modulus problem is really two problems (one for each sign case) wearing a trench coat.

Modulus equations are solved by squaring or by cases. Solve |2x − 5| = 9: case 2x − 5 ≥ 0 gives 2x − 5 = 9 → x = 7; case 2x − 5 < 0 gives 2x − 5 = −9 → x = −2. Both check in the original. Squaring both sides is quicker but can introduce extraneous solutions for inequalities, so verify.

Modulus inequalities: |x − 3| < 5 means the distance from x to 3 is less than 5, so −2 < x < 8. In general: |x − a| < b ⟺ a − b < x < a + b, and |x − a| > b ⟺ x < a − b or x > a + b (two separate intervals — the most-missed structure in the topic). Sketching y = |x − 3| (a V with vertex at (3, 0)) against the line y = 5 shows both intervals at a glance.

Sketching and exam technique

A-level sketching means labelled key features, not plotting points: intercepts, asymptotes, turning points, and end behaviour. For y = (x + 1)(x − 3)/x: x-intercepts at −1 and 3, y-intercept none (x = 0 excluded), vertical asymptote x = 0, and as x → ±∞, y ~ x (oblique asymptote — do polynomial division: = x − 2 − 3/x). Mark all of these and the curve's shape follows.

Rational functions test asymptote fluency. For y = (2x + 3)/(x − 1): vertical asymptote x = 1; horizontal asymptote y = 2 (ratio of leading coefficients); x-intercept at x = −3/2; y-intercept at y = −3. The curve has two branches, each approaching the asymptotes. Examiners award marks per correctly labelled feature — a sketch with four labelled features outscores a pretty curve with none.

Common exam pitfalls: forgetting domain restrictions on inverses and composites (the domain of fg is restricted by g's domain and by where g's outputs fall outside f's domain); confusing f⁻¹(x) with 1/f(x) (the −1 is not an exponent); and applying transformations in the wrong order. Build a checklist: domain, intercepts, asymptotes, transformations, key points — and run it on every sketch.

Piecewise functions and real-world models

Many real relationships change their rule at thresholds: a piecewise function uses different formulas on different domains. UK income tax is piecewise: 0% on the first £12,570 (personal allowance), 20% on the next band, 40% above £50,270. A mobile contract: £10/month for the first 5 GB, then £2 per extra GB — C(d) = 10 for d ≤ 5, C(d) = 10 + 2(d − 5) for d > 5. Piecewise definitions model tariffs, postage, and tax — always check continuity at the join (does the formula agree at d = 5? 10 = 10 ✓).

Graphing piecewise functions: draw each piece only on its domain, using solid dots for included endpoints and open circles for excluded ones. For f(x) = x² (x < 0), 2x + 1 (x ≥ 0): the left piece is the parabola's left half ending in an open circle at (0, 0); the right piece is a ray from solid (0, 1). The jump at x = 0 is a discontinuity — the function leaps from approaching 0 to the value 1. Discontinuities matter in models: tariffs jump, tax bands step.

Composing with piecewise functions demands domain tracking: if f is piecewise and g(x) = f(x²), determine which piece applies by checking where x² falls. Exam questions test this: 'find fg(3)' where g(3) lands in a particular piece of f — compute g(3) first, then select the piece. The method is always inside-out: evaluate the inner function, check its value against the pieces' domains, then apply the matching rule.

Common mistakes

  • Reading f⁻¹(x) as 1/f(x). The −1 denotes inversion, not a power. f(x) = 2x has inverse x/2, not 1/(2x).
  • Forgetting the domain of an inverse. The domain of f⁻¹ is the range of f. If the question restricts f's domain, the inverse inherits the restriction swapped — leaving it out loses the accuracy mark.
  • Transformations in the wrong direction. y = f(x + 3) moves the graph left, and y = f(2x) compresses horizontally by factor 1/2. Anything inside the brackets acts inversely; examiners test this every series.
  • Squaring modulus inequalities without checking. Squaring can reverse or invent solutions. Prefer the distance interpretation or a sketch, and test boundary values.
  • Composing in the wrong order. fg means g first. Writing fg(x) = g(f(x)) is the single most common composite error.
Try it. The function f is defined by f(x) = (x − 1)/(x + 3), x ≠ −3. Find f⁻¹(x), and state its domain. (Answer: f⁻¹(x) = (3x + 1)/(1 − x), domain x ≠ 1 — the value f never takes.)

Exam Experience

Questions in the style of the A-level pure paper. Attempt them before reading the mark scheme.

1. The functions f and g are defined by f(x) = 4 − 3x and g(x) = x² + 1. (a) Find fg(x), giving your answer in simplest form. [2] (b) Show that ff(x) = 9x − 8. [2] (c) Find f⁻¹(x). [2]

2. Describe fully the sequence of transformations that maps the curve y = f(x) onto the curve y = 3f(2x) − 1. [3]

Mark scheme.

  • 1(a) fg(x) = f(x² + 1) = 4 − 3(x² + 1) (M1) for substituting g into f in the correct order. = 1 − 3x² (A1).
  • 1(b) ff(x) = f(4 − 3x) = 4 − 3(4 − 3x) (M1). = 4 − 12 + 9x = 9x − 8 (A1) — as required; in a 'show that' question the target must appear exactly, with the intermediate expansion visible.
  • 1(c) y = 4 − 3x → 3x = 4 − y → x = (4 − y)/3 (M1) for rearranging to make x the subject. f⁻¹(x) = (4 − x)/3 (A1).
  • 2. Stretch parallel to the x-axis by factor 1/2 (B1) — from f(2x); stretch parallel to the y-axis by factor 3 (B1) — from 3f(...); translation of 1 unit downwards (B1) — from −1. Order among independent axes does not matter, but the horizontal stretch factor is 1/2, not 2.

📈 Interactive Graph: Function Explorer — Functions and Graphs

Explore how functions behave — a core skill for Functions and Graphs.

🎛️ Interactive Explorer: Quadratic Explorer — Functions and Graphs

Drag the sliders to change the coefficients of y = ax² + bx + c and watch the parabola transform live.

1 0 0

Notice how a controls the width and direction, b shifts the axis of symmetry, and c moves the graph up and down.

Key Terms

Function
A mapping where each input has exactly one output; passes the vertical line test.
Domain
The set of permitted input values of a function.
Range
The set of output values a function actually attains.
Composite function
fg(x) = f(g(x)) — applying g first, then f; order matters.
Inverse function
f⁻¹ reverses f; exists only for one-to-one functions; reflection in y = x.
One-to-one
Each output comes from exactly one input — the condition for an inverse.
Transformation
A shift, stretch, or reflection applied to a graph, e.g. y = af(x + b).
Modulus
|x|, the distance of x from zero; |x| = x for x ≥ 0, -x for x < 0.
Asymptote
A line a curve approaches but never reaches.
Oblique asymptote
A diagonal asymptote of a rational function, found by polynomial division.

Discussion Questions

  1. f(x) = √(2x + 6) and g(x) = x² - 5. State the domain of f, find fg(x) and its domain, and find g⁻¹(x) with its domain, restricting g to x ≥ 0.
  2. Describe fully the sequence of transformations mapping y = x³ to y = -2(x + 4)³ - 7, and give the image of the point (1, 1).
  3. Solve |3x - 8| = 2x + 1. Explain why you must check your solutions, and sketch y = |3x - 8| and y = 2x + 1 to confirm.
  4. Sketch y = (x² - 9)/(x + 2), labelling intercepts, asymptotes, and the behaviour as x → ±∞.
  5. A taxi firm in Manchester charges £2.50 plus £1.80 per mile: C(m) = 2.5 + 1.8m. Find the inverse function and interpret it. A customer is charged £29.50 — how many miles did they travel, computed via the inverse?

🎬 Watch & Learn

Free YouTube video lessons on “Functions and Graphs” — pick a result below:

Keep reading to complete this lesson