Mathematics (UK)

🇬🇧 United Kingdom Curriculum

Lesson 14: Functions and Graphs

🎧 Audio narration for this lesson is coming soon.

A function is a machine: feed in a number, get exactly one number out. Functions are the language of A-level maths, physics formulas, economics models, and every line of computer code — f(x) is just a named rule. This lesson covers function notation, evaluating and composing functions, inverse functions, and the core graph families (linear, quadratic, cubic, reciprocal) with the transformations that shift and stretch them.

Function notation and evaluation

Writing f(x) = 3x − 5 names the rule f: 'multiply by 3, subtract 5'. Evaluating is substitution: f(4) = 3(4) − 5 = 7; f(−2) = −6 − 5 = −11; f(0) = −5. The output for input 0 is the y-intercept of the graph — notation and graphs are the same story told twice. Solving f(x) = 19 means 3x − 5 = 19 → x = 8: find the input that gives the required output.

Functions can be defined piecewise (different rules for different inputs — like UK income tax bands) and machines can be chained. Exam style: 'Given f(x) = 2x + 3 and g(x) = x², find f(5) and solve g(x) = 25.' f(5) = 13; g(x) = 25 → x = ±5 (both roots — a square has two inputs giving the same output; a function needs one output per input, not one input per output).

Worked example: the cost of hiring a hall in York is C(h) = 40 + 15h pounds for h hours. C(3.5) = 40 + 52.50 = £92.50. And solving C(h) = 145: 15h = 105 → h = 7 hours. Real models are functions with units attached — always interpret the answer back in context ('7 hours', not just '7').

Worked example: f(x) = x² − 4x + 1. Then f(5) = 25 − 20 + 1 = 6; f(−1) = 1 + 4 + 1 = 6 as well. Equal outputs from different inputs are normal for quadratics (the parabola is symmetric) — and exactly why the inverse of a quadratic is not a function without restricting the domain.

Composite functions

fg(x) means 'apply g first, then f' — read right to left, working from the inside out. With f(x) = 4x − 3 and g(x) = x² + 1: gf(2): first f(2) = 5, then g(5) = 26. So gf(2) = 26. As a formula: gf(x) = g(4x − 3) = (4x − 3)² + 1 = 16x² − 24x + 10. Order matters: fg(x) = f(x² + 1) = 4(x² + 1) − 3 = 4x² + 1 — different from gf(x). Composites do not commute in general.

Worked example: f(x) = 2x + 1, g(x) = 3x − 4. Find fg(3) and gf(3). fg(3): g(3) = 5, then f(5) = 11. gf(3): f(3) = 7, then g(7) = 17. Different inputs paths, different answers — 11 vs 17. On paper, write the inner evaluation as an explicit first step; skipping it is where composite errors breed.

Real context: a shop in Bath first discounts by 20% (d(p) = 0.8p), then adds a £5 delivery charge (c(p) = p + 5). The total for a £60 item: c(d(60)) = c(48) = £53. Reverse the order — charge then discount — and you get d(c(60)) = d(65) = £52. Businesses choose the order deliberately; functions explain the £1 difference.

Inverse functions

The inverse f⁻¹ undoes f: if f(x) = 2x + 1, then f⁻¹(x) = (x − 1)/2. Method: write y = 2x + 1, swap x and y (x = 2y + 1), then solve for y: y = (x − 1)/2. Check with numbers: f(4) = 9, and f⁻¹(9) = (9 − 1)/2 = 4. ✓ The defining test: ff⁻¹(x) = x for every x.

Graphically, f⁻¹ is the reflection of f in the line y = x — swap the coordinates of every point. That is why only one-to-one functions have inverses as functions: a many-to-one rule (like x²) reflects into a one-to-many graph. (Higher tier meets this; A-level restricts domains to fix it.)

Worked example: f(x) = (x − 4)/2. Find f⁻¹. y = (x − 4)/2 → swap: x = (y − 4)/2 → 2x = y − 4 → y = 2x + 4. So f⁻¹(x) = 2x + 4. Check: f(10) = 3; f⁻¹(3) = 10. ✓ Undoing 'halve after subtracting 4' is 'double, then add 4' — reverse the operations in reverse order, like unwrapping a parcel.

Worked example: temperature conversion as functions. F(C) = 9C/5 + 32 converts Celsius to Fahrenheit; its inverse C(F) = 5(F − 32)/9 converts back (you rearranged this in Lesson 3). At F = 68: C = 5 × 36/9 = 20°C — a mild British day by either scale.

Graphs of functions — families and transformations

Know the shapes: linear y = mx + c (straight line, gradient m, intercept c); quadratic y = x² (parabola, minimum at origin, symmetric); cubic y = x³ (an S-curve through the origin, rising both ends in opposite directions); reciprocal y = 1/x (two branches, asymptotes at both axes — never touches them). Sketching from shape knowledge beats point-plotting in exams.

Transformations (Higher): starting from y = f(x):

  • y = f(x) + a shifts the graph up by a.
  • y = f(x − a) shifts it right by a. (The minus sign feels backwards — the graph moves opposite to the sign inside the bracket.)
  • y = −f(x) reflects in the x-axis; y = f(−x) reflects in the y-axis.
  • y = a·f(x) stretches vertically by factor a; y = f(ax) compresses horizontally by factor a.

Worked example: y = x² has vertex (0, 0). y = (x − 3)² + 2 has vertex (3, 2) — shifted right 3, up 2; its minimum value is 2, and it never crosses the x-axis. y = −x² + 5 is the upside-down parabola with maximum 5, crossing the axis at x = ±√5. Reading a transformed graph's vertex, intercepts, and symmetry from the equation — without plotting points — is a high-value exam skill.

Worked example: the graph of y = 2ˣ (exponential) passes through (0, 1) and (3, 8). y = 2ˣ + 3 shifts it up 3: intercept (0, 4), horizontal asymptote y = 3. Exponential graphs model growth and decay (Lessons 13, 17) — the asymptote is the value the curve approaches but never reaches.

Worked example — domain, range, and reading graphs

A function is not fully described until you know its domain (allowed inputs) and range (resulting outputs). For f(x) = √x, the domain is x ≥ 0 (no real square roots of negatives) and the range is f(x) ≥ 0. For g(x) = 1/(x − 2), the domain excludes x = 2 (division by zero); the graph has a vertical asymptote there and a horizontal asymptote y = 0. GCSE graph questions ask exactly these things: 'state the values of x for which the function is undefined', 'find the range of f for −1 ≤ x ≤ 3'. Worked example: f(x) = x² for −1 ≤ x ≤ 3. The smallest output is 0 (at x = 0 — inside the interval!), the largest is 9 (at x = 3). Range: 0 ≤ f(x) ≤ 9. The trap is evaluating only the endpoints (giving 1 to 9) and missing the vertex at 0 — always check for turning points inside the domain.

Worked example: a taxi tariff is a piecewise function: C(d) = 4 for 0 < d ≤ 1 (first kilometre flat), then C(d) = 4 + 2(d − 1) for d > 1. A 6 km ride: C(6) = 4 + 2 × 5 = £14. Piecewise definitions model every real tariff — electricity, postage, tax bands (Lesson 17's income tax is a piecewise function). Reading which branch applies is the entire skill.

Iteration — a first look (Higher)

Feeding a function's output back in as its next input is iteration: xₙ₊₁ = f(xₙ). Worked example: solve x² − x − 3 = 0 approximately by rearranging to x = √(x + 3) and iterating from x₀ = 2: x₁ = √5 = 2.236; x₂ = √(5.236) = 2.288; x₃ = √(5.288) = 2.300; x₄ = √(5.300) = 2.302 — converging to ≈ 2.303. (Check: 2.303² − 2.303 − 3 = 5.304 − 5.303 ≈ 0. ✓) Iteration is how computers actually solve equations that algebra cannot — and GCSE Higher asks you to perform three or four steps by hand and state the approximation.

Common mistakes

  • Reading fg backwards. fg(x) applies g first. Inside out, always.
  • Assuming fg = gf. They are usually different functions; verify with a number if unsure.
  • Inverse without swapping. For f⁻¹, the swap of x and y is the method — solving y = ... for x without swapping gives f itself in disguise.
  • Losing the ± root. g(x) = x² = 25 has two solutions, x = 5 and x = −5.
  • Transformation sign confusion. f(x − 3) moves right; f(x) − 3 moves down. Inside the brackets: opposite direction. Outside: same direction.
  • Domain blindness. 1/x and √x do not accept every input: 1/0 is undefined, √(−4) is not real. State restrictions when asked.

Exam Experience

Question 1. f(x) = 4x − 3 and g(x) = x² + 1. (a) Work out f(5). (b) Work out gf(2). [3 marks]

Question 2. f(x) = (x − 4)/2. Work out f⁻¹(x). [2 marks]

Question 3. f(x) = 2x + 1. (a) Show that f⁻¹(x) = (x − 1)/2. (b) Verify that ff⁻¹(9) = 9. [3 marks]

Mark scheme.

  • Q1: B1 for (a) f(5) = 4 × 5 − 3 = 17. M1 for (b) evaluating in the correct order: f(2) = 5, then g(5). A1 for gf(2) = 26. (Writing fg instead scores 0 for part (b)'s method.)
  • Q2: M1 for swapping x and y and rearranging (x = (y − 4)/2 → 2x = y − 4). A1 for f⁻¹(x) = 2x + 4.
  • Q3: M1 for the swap-and-solve method: x = 2y + 1 → y = (x − 1)/2. A1 for f⁻¹(x) = (x − 1)/2 as required. M1/A1 for (b): f⁻¹(9) = (9 − 1)/2 = 4, then f(4) = 2 × 4 + 1 = 9, as required.
Key idea. Functions are machines: evaluate inside-out, invert by swap-and-solve, and verify every inverse by checking ff⁻¹(x) = x on a number.
Try it. With f(x) = 3x − 2 and g(x) = x²: work out fg(2) and gf(2), then find f⁻¹(x). (fg(2) = 10; gf(2) = 16; f⁻¹(x) = (x + 2)/3.) Then sketch in words how y = (x + 1)² − 4 differs from y = x².

📈 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 rule mapping each input to exactly one output; written f(x).
Domain
The set of valid inputs to a function.
Range
The set of possible outputs of a function.
Composite function
fg(x) = f(g(x)) — applying g then f; order matters.
Inverse function
f⁻¹ reverses f; exists (as a function) only for one-to-one functions.
One-to-one
Each output comes from exactly one input — the condition for an invertible function.
Asymptote
A line a graph approaches but never reaches, e.g. x = 3 for 1/(x-3).
Graph transformation
Shifts, stretches, and reflections applied to y = f(x).
Vertical stretch
y = af(x): scales y-values by a.
Horizontal shift
y = f(x - a): moves the graph right by a (note the sign).

Discussion Questions

  1. Given f(x) = 4x - 5 and g(x) = x² + 1, find (a) fg(3), (b) gf(3), (c) fg(x) and gf(x) in simplest form. Explain why they differ.
  2. Find the inverse of f(x) = (2x + 5)/3, and verify by computing f(f⁻¹(7)). State the domain and range of both.
  3. State the domain and range of: (a) f(x) = √(2x + 6), (b) g(x) = 3/(x + 2), (c) h(x) = x² - 6x + 10. Sketch each, marking asymptotes and vertices.
  4. Describe the sequence of transformations mapping y = x² to y = 3(x + 2)² - 5, and give the new vertex.
  5. A theme park charges £25 entry plus £4 per ride: C(r) = 25 + 4r. (a) Find and interpret C⁻¹(x). (b) A family spends £89 — how many rides? Use both C and C⁻¹.
Keep reading to complete this lesson

🎬 Watch & Learn

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