Salam Academy
Algebra and functions · Subtopic 1 of 7

Functions, Domain and Range

What makes a rule a function, function notation, the largest possible domain, and how to find the range of linear and quadratic functions on any domain.

Cambridge 9709 Paper 1Edexcel YMA01 WMA13Edexcel 9MA0 Paper 1Edexcel 9MA0 Paper 2≈ 40 minRevision 6 · updated 2026-10-27
Section 1 of 14

Learning objectives

  • Explain what a function is, and use the notations f(x)=3x+1f(x)=3x+1 and f:x↦3x+1f:x\mapsto3x+1.
  • Use the vertical line test to decide whether a graph is the graph of a function.
  • Find the largest possible domain of a function involving a square root or a fraction.
  • Find the range of a function on a given domain, including quadratics, by completing the square and sketching.
  • Write a range correctly in terms of f(x)f(x), choosing between << and ≤\le.
Pause and think

Warm-up: complete the square for x2−6x+11x^2-6x+11. What is the smallest value it can take?

Section 2 of 14

Core idea

Start hereThe vending machine rule

Press button B3 on a vending machine and you get one specific snack, every time. You'd be furious if B3 sometimes gave crisps and sometimes a drink. Some buttons don't work at all (there's no B9), and some snacks might not be on any button. Mathematics has exactly this idea, the function: a rule giving one output for each allowed input. The buttons that work are the domain; the snacks you can actually get are the range.

The big idea

A function ff assigns to each input xx in its domain exactly one output f(x)f(x). The set of all outputs actually produced is the range. To find a range, look at the graph over the domain, using any turning point and the end points.

1. Notation

A function as a machine
double, add 1input3output7
f(x)=2x+1f(x)=2x+1: input 33, output 77. Every input gives exactly one output, which is what makes it a function.
Function notationf:x↦2x+3orf(x)=2x+3, x∈Rf:x\mapsto2x+3\qquad\text{or}\qquad f(x)=2x+3,\ x\in\mathbb R
where
ff
the name of the function (the rule).
x↦x\mapsto
"xx is mapped to".
f(x)f(x)
the output when the input is xx; read "ff of xx". It is not ff times xx.
x∈Rx\in\mathbb R
"xx is a real number": the domain. ∈\in means "belongs to".
Worked exampleEvaluating and solving with f(x)=2x+3f(x)=2x+3

For f(x)=2x+3f(x)=2x+3, find f(4)f(4), f(−1)f(-1), f(a+1)f(a+1), and solve f(x)=11f(x)=11.

Goal
Outputs, and an input that gives a known output.
Strategy
Replace every xx in the rule by the input (in brackets).
  1. f(4)=2(4)+3=11,f(−1)=2(−1)+3=1f(4)=2(4)+3=11,\qquad f(-1)=2(-1)+3=1
    Substitute.
  2. f(a+1)=2(a+1)+3=2a+5f(a+1)=2(a+1)+3=2a+5
    The input can be an expression; keep it in brackets.
  3. 2x+3=11⇒x=42x+3=11\Rightarrow x=4
    Set the output equal to 1111 and solve.
Answer1111, 11, 2a+52a+5; x=4x=4.
✓ Checkf(4)=11f(4)=11 agrees with the last part ✓.

2. What makes something a function

  • One-one: each output comes from exactly one input (f(x)=2x+3f(x)=2x+3).
  • Many-one: some outputs come from several inputs (x2x^2: both 22 and −2-2 give 44). Still a function.
  • One-many is not a function: one input with two outputs (like y=±xy=\pm\sqrt x).
Key takeawayVertical line test A graph is a function if every vertical line meets it at most once. A circle fails: x=0x=0 meets it twice.

3. Domain

The domain is the set of inputs allowed. It's either stated, or you must exclude anything impossible:

  • Division by zero: 1x−2\dfrac1{x-2} needs x≠2x\neq2.
  • Square root of a negative: x−3\sqrt{x-3} needs x≥3x\ge3.
  • Logarithm of a non-positive number: ln⁡x\ln x needs x>0x>0.

4. Range

The range is what actually comes out. For a quadratic, complete the square to find its least (or greatest) value, then check the ends of the domain.

f(x) = (x − 1)² + 2 for 0 ≤ x ≤ 4
−112345246810120xf(x)y = f(x)lowest (1, 2)highest (4, 11)(0, 3)domain 0 ≤ x ≤ 4range 2 ≤ f(x) ≤ 11 (bold line)
The lowest output is at the vertex, f(1)=2f(1)=2, not at the end x=0x=0. The highest is at the end x=4x=4. So the range is 2≤f(x)≤112\le f(x)\le11.
Worked exampleRange of f(x)=x2−2x+3f(x)=x^2-2x+3 for 0≤x≤40\le x\le4

Find the range of f(x)=x2−2x+3f(x)=x^2-2x+3, 0≤x≤40\le x\le4.

Goal
The smallest and largest outputs.
Strategy
Complete the square to locate the vertex; compare with the end values.
  1. f(x)=(x−1)2−1+3=(x−1)2+2f(x)=(x-1)^2-1+3=(x-1)^2+2
    Halve −2-2, square, take away.
  2. (x−1)2≥0⇒f(x)≥2, equality at x=1(x-1)^2\ge0\Rightarrow f(x)\ge2,\ \text{equality at }x=1
    A square is never negative; x=1x=1 is inside the domain.
  3. f(0)=3,f(4)=9+2=11f(0)=3,\qquad f(4)=9+2=11
    Check both ends; the larger is the maximum.
Answer2≤f(x)≤112\le f(x)\le11.
✓ Checkf(4)=16−8+3=11f(4)=16-8+3=11 ✓ (using the original form).
Common misconceptionUsing only the end points f(0)=3f(0)=3 and f(4)=11f(4)=11 might suggest 3≤f(x)≤113\le f(x)\le11, but the curve dips to 22 in between. Always check for a turning point inside the domain.
Edge caseRange with x in the denominator f(x)=1xf(x)=\dfrac1x, x>0x>0: as xx grows, ff gets close to 00 but never reaches it; as x→0x\to0, ff grows without limit. Range f(x)>0f(x)>0.
Pause and think

Domain and range of f(x)=x−3f(x)=\sqrt{x-3}?

Summary

  • Function: one output per input.
  • Domain: allowed inputs; exclude division by zero, negative roots, ln⁡\ln of non-positives.
  • Range: use the vertex and the end values.
Key words
Domain
The set of allowed inputs.
Range
The set of outputs produced.
Many-one
Different inputs can share an output.
Two ways to write the same functionf(x)=3x+1,  x∈Rorf:x↦3x+1,  x∈Rf(x)=3x+1,\ \ x\in\mathbb{R}\qquad\text{or}\qquad f:x\mapsto3x+1,\ \ x\in\mathbb{R}

Read f:x↦3x+1f:x\mapsto3x+1 as "ff maps xx to 3x+13x+1". The symbol R\mathbb{R} means all real numbers, so x∈Rx\in\mathbb{R} says the domain is every real number.

The vertical line test
Loading the interactive graph…
Try this
  1. Drag cc to move the vertical line across. How many times does it cross the circle? How many times does it cross the parabola?
  2. A graph is the graph of a function only if every vertical line crosses it at most once. Which of the two curves passes the test?

The parabola passes: each xx gives one yy. The circle fails: for −4<x<4-4<x<4 there are two values of yy, so it is not a function of xx.

HistoryWhere the word came from. Gottfried Leibniz first used the word "function" in 1673, for quantities linked to a curve. Leonhard Euler introduced the notation f(x)f(x) in 1734. In 1837, Peter Dirichlet argued that a function could be any rule pairing inputs with outputs, even one with no formula at all. That is the idea we use today.
Fun factA function you cannot draw. Dirichlet's famous example gives 11 when xx is rational and 00 when xx is irrational. Every input has exactly one output, so it is a perfectly good function, yet its "graph" is impossible to draw: between any two points there are infinitely many of both kinds of number.
Keep reading for free

Create a free account to read the rest of this lesson: key formulae, worked examples, explore the graph, common mistakes, exam tip, guided practice and more. Your answers are checked and your progress is saved.