1.02PureCore

Domain and Range

A function is not just a formula: it comes with a set of permitted inputs, the domain\textbf{domain}. Change the domain and you change the function — and the set of outputs it produces, the range\textbf{range}, changes with it. Most exam errors here come from writing down a range without ever sketching the graph.

35 min Functions

The big picture

Domain and range turn a formula into a precisely defined object. The domain is a choice, sometimes forced by the algebra (no square roots of negatives, no division by zero) and sometimes made deliberately to give a function a property you need, like being one-to-one. The range is a consequence: once the domain is fixed, the range is whatever the graph actually reaches. That relationship drives the rest of the chapter. A composite fg\mathrm{fg} only exists where the range of g\mathrm{g} fits inside the domain of f\mathrm{f}, and the inverse of a function swaps domain and range. Getting fluent at sketching to find a range is the single most useful skill here.

What you'll be able to do

  • State the domain and range of a function using set and inequality notation
  • Identify the largest possible real domain of a function from its formula
  • Find the range of a function by sketching it over its domain
  • Work with the modulus function ∣x∣|x| and its range
1

Notation for sets of numbers

The domain and range are sets, usually of real numbers, written with R\mathbb{R}. You may write a domain as "x∈R,x≥2x \in \mathbb{R}, x \ge 2" or just "x≥2x \ge 2". Ranges are written in terms of f(x)\mathrm{f}(x), for example "f(x)>−3\mathrm{f}(x) > -3".

Be careful to use f(x)\mathrm{f}(x) or yy for the range, not xx. Writing "range: x≥0x \ge 0" is a notation slip that examiners penalise.

Other sets you will meet: Z\mathbb{Z} for integers and N\mathbb{N} for natural numbers. A function defined only on integers has a graph made of isolated points.

Tip — Check whether each end point is included: ≥\ge versus >>. A range endpoint that the function reaches uses ≥\ge or ≤\le; one it only approaches uses >> or <<.

2

Finding the largest possible domain

If no domain is given, take the largest set of real numbers for which the formula makes sense. Three restrictions cover almost every case at this level.

Division\textbf{Division}: the denominator cannot be zero. f(x)=1x−3\mathrm{f}(x) = \dfrac{1}{x-3} needs x≠3x \neq 3.

Square roots\textbf{Square roots} (and other even roots): the expression inside must be non-negative. g(x)=2x−5\mathrm{g}(x) = \sqrt{2x - 5} needs x≥52x \ge \tfrac52.

Logarithms\textbf{Logarithms}: the argument must be strictly positive. h(x)=ln⁡(4−x)\mathrm{h}(x) = \ln(4 - x) needs x<4x < 4.

Example 1Find the largest possible domain of f(x)=x+4x−1\mathrm{f}(x) = \dfrac{\sqrt{x+4}}{x-1}.
1The root needs x+4≥0x + 4 \ge 0, so x≥−4x \ge -4.
2The denominator needs x≠1x \neq 1.
3Both conditions must hold at once.
Answerx≥−4, x≠1x \ge -4,\ x \neq 1
3

Finding the range from a sketch

The reliable method is: sketch y=f(x)y = \mathrm{f}(x) over the given domain only, then read off the lowest and highest yy-values the graph reaches, noting any it approaches but never attains.

For quadratics, complete the square to locate the vertex. f(x)=x2−6x+11=(x−3)2+2\mathrm{f}(x) = x^{2} - 6x + 11 = (x - 3)^{2} + 2 has minimum value 22 at x=3x = 3, so on all real xx its range is f(x)≥2\mathrm{f}(x) \ge 2.

Restricting the domain can cut the range. On the domain 0≤x≤40 \le x \le 4, the same function starts at f(0)=11\mathrm{f}(0) = 11, falls to 22 at x=3x = 3, and rises to f(4)=3\mathrm{f}(4) = 3. The range is 2≤f(x)≤112 \le \mathrm{f}(x) \le 11.

Example 1Find the range of g(x)=6x+1\mathrm{g}(x) = \dfrac{6}{x} + 1 for the domain x≥2x \ge 2.
1At x=2x = 2: g(2)=3+1=4\mathrm{g}(2) = 3 + 1 = 4.
2As xx increases, 6x\dfrac{6}{x} decreases towards 00 but never reaches it.
3So g(x)\mathrm{g}(x) decreases from 44 towards 11 without reaching 11.
Answer1<g(x)≤41 < \mathrm{g}(x) \le 4
Why this works

Evaluating only the end points of the domain is not enough: a turning point inside the domain can produce a value lower or higher than either end. That is why f(0)\mathrm{f}(0) and f(4)\mathrm{f}(4) alone would have missed the minimum of 22 above.

4

The modulus function

The modulus\textbf{modulus} ∣x∣|x| is the non-negative size of xx: ∣x∣=x|x| = x if x≥0x \ge 0 and ∣x∣=−x|x| = -x if x<0x < 0. So ∣5∣=∣−5∣=5|5| = |-5| = 5.

To sketch y=∣f(x)∣y = |\mathrm{f}(x)|, sketch y=f(x)y = \mathrm{f}(x) and reflect any part below the xx-axis upwards in that axis. The range of ∣f(x)∣|\mathrm{f}(x)| is always ≥0\ge 0.

The graph of y=∣ax+b∣y = |ax + b| is a V shape with its vertex on the xx-axis at x=−bax = -\tfrac{b}{a}. Solving ∣ax+b∣=c|ax + b| = c gives two cases: ax+b=cax + b = c or ax+b=−cax + b = -c.

∣x∣={xx≥0−xx<0|x| = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}
Definition of the modulus.
Example 1Solve ∣2x−3∣=7|2x - 3| = 7.
1Case 1: 2x−3=72x - 3 = 7, so x=5x = 5.
2Case 2: 2x−3=−72x - 3 = -7, so x=−2x = -2.
Answerx=5x = 5 or x=−2x = -2

Tip — When solving ∣f(x)∣=g(x)|\mathrm{f}(x)| = \mathrm{g}(x) with g\mathrm{g} non-constant, check every solution in the original equation: squaring or splitting into cases can produce answers where g(x)\mathrm{g}(x) is negative, which are invalid.

Think like an examiner

  • Write ranges in terms of f(x)\mathrm{f}(x), never xx.
  • Include a sketch when finding a range — it is the working that justifies your answer.
  • Distinguish strict and non-strict inequalities at each end point.
  • Check for turning points inside a restricted domain.

Common misconceptions

Writing the range as "x≥2x \ge 2".
The range describes outputs: "f(x)≥2\mathrm{f}(x) \ge 2".
Finding a range only from the values at the ends of the domain.
Check for a turning point inside the domain as well.
Including an asymptotic value in the range.
Values approached but never reached use strict inequalities.
Solving ∣x−2∣=5|x - 2| = 5 with only x=7x = 7.
Both cases: x−2=5x - 2 = 5 or x−2=−5x - 2 = -5, giving x=7x = 7 or x=−3x = -3.

Domain and range

1g(x): g(x)≠0\dfrac{1}{\mathrm{g}(x)}: \ \mathrm{g}(x) \neq 0
Division restriction.
g(x): g(x)≥0\sqrt{\mathrm{g}(x)}: \ \mathrm{g}(x) \ge 0
Square root restriction.
ln⁡g(x): g(x)>0\ln \mathrm{g}(x): \ \mathrm{g}(x) > 0
Logarithm restriction.
∣ax+b∣=c⇒ax+b=±c|ax+b| = c \Rightarrow ax+b = \pm c
Modulus equations.

Stretch yourself

The function f\mathrm{f} is defined by f(x)=5−∣x2−4∣\mathrm{f}(x) = 5 - |x^{2} - 4| for the domain −3≤x≤3-3 \le x \le 3. Find the range of f\mathrm{f}.

Hint — Sketch y=x2−4y = x^{2} - 4 on the domain, reflect the negative part to get ∣x2−4∣|x^{2}-4|, find its greatest and least values, then apply "5 minus".

Reveal solution
SolutionOn −3≤x≤3-3 \le x \le 3, x2−4x^{2} - 4 runs from −4-4 (at x=0x = 0) up to 55 (at x=±3x = \pm3). Taking the modulus, ∣x2−4∣|x^{2} - 4| is 00 at x=±2x = \pm2, reaches 44 at x=0x = 0, and reaches 55 at x=±3x = \pm3. So 0≤∣x2−4∣≤50 \le |x^{2} - 4| \le 5 on this domain, both ends attained. Then f(x)=5−∣x2−4∣\mathrm{f}(x) = 5 - |x^{2}-4| ranges from 5−5=05 - 5 = 0 to 5−0=55 - 0 = 5. The range is 0≤f(x)≤50 \le \mathrm{f}(x) \le 5. Note that the local value f(0)=1\mathrm{f}(0) = 1 is not an extreme: the true minimum occurs at the domain ends. ■\blacksquare

Questions students ask

Is the domain always given?
Usually, as part of the definition. If not, assume the largest set of real numbers for which the formula is defined.
Can two functions have the same formula but be different?
Yes. x2x^{2} on x∈Rx \in \mathbb{R} and x2x^{2} on x≥0x \ge 0 are different functions: the second is one-to-one and has an inverse.
How do I find the range of a quadratic?
Complete the square to find the vertex, then consider the domain. For all real xx, the vertex value gives the minimum (or maximum).
Why sketch when I could just calculate?
A sketch shows turning points, asymptotes and which end points are included — exactly the details a calculation alone tends to miss.

Key takeaways

  • The domain is the set of permitted inputs; the range is the set of resulting outputs.
  • Largest real domain: avoid division by zero, even roots of negatives, logs of non-positives.
  • Find ranges from a sketch over the domain, checking turning points and asymptotes.
  • Write ranges in terms of f(x)\mathrm{f}(x) with correct strict or non-strict inequalities.
  • ∣f(x)∣|\mathrm{f}(x)| reflects negative parts upwards; ∣ax+b∣=c|ax+b| = c splits into two cases.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 6 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.