Functions: Domain and Range
Domain and range describe the inputs a function is allowed to take and the outputs it produces, and Edexcel IGCSE Maths Higher papers test both directly. This page covers deciding whether a mapping is a function, reading the range from a listed domain or an interval, the range of a squared function, and spotting the values that must be excluded from a domain. Work through the worked examples and diagrams, then test every skill on the auto-marked practice questions below.
What Is a Function?
A function is a rule that turns each input into exactly one output. The rule "double, then add 7" is written \(f(x) = 2x + 7\), or \(f : x \mapsto 2x + 7\); any letter can name a function, so \(g\), \(h\) and \(\mathrm{p}\) work exactly like \(f\). Evaluating is substitution, so \(f(3)\) means put 3 in place of \(x\), which gives 13. If that notation is new to you, or you need to substitute a whole expression or read \(f(x)\) off a graph, work through Function Notation first.
Which mappings count as functions?
- One-to-one: every input has its own output. This is a function.
- Many-to-one: several inputs share an output (squaring does this: \(3\) and \(-3\) both give \(9\)). Still a function, because each input has exactly one output.
- One-to-many: one input produces more than one output. Not a function.
On a graph, use the vertical line test: if every vertical line crosses the graph at most once, the graph shows a function. If any vertical line crosses it twice or more, it does not.
Core Ideas
How to Find the Domain and Range
Range from a listed domain
Substitute every value of the domain into the function and list the outputs. Duplicates are written once: if \(f(x) = x^2\) has domain \(\{-3, 3\}\), the range is just \(\{9\}\).
Range over an interval
- Substitute both ends of the domain into the function.
- The two outputs are the ends of the range; write it as an inequality in \(f(x)\).
- Check which output is the larger one. A negative gradient sends the smallest input to the largest output, so never assume the order.
Range of a squared function
A square is never negative, so \(x^2 \geq 0\) for every real \(x\). Adding a constant shifts every output: \(x^2 + 5\) has range \(f(x) \geq 5\). In completed-square style, \((x-a)^2 + b\) has least value \(b\) (at \(x = a\)), so its range is \(f(x) \geq b\). A subtracted square flips it: \(b - x^2\) has greatest value \(b\), so its range is \(f(x) \leq b\).
Values excluded from the domain
Two operations are impossible with real numbers: dividing by zero, and square rooting a negative number. To find the excluded inputs:
- Fractions: set the denominator equal to zero and solve. Those \(x\) values are excluded. A squared bracket in the denominator still gives one excluded value; a difference of two squares such as \(x^2 - 25\) gives two.
- Square roots: the expression under the root must be at least zero. Solve for the allowed inputs; everything else is excluded. Note that \(\sqrt{0} = 0\) is allowed, so the boundary value itself is fine.
- Roots in a denominator: for \(\dfrac{1}{\sqrt{x}}\)-style functions the boundary is excluded too, because the root would be zero and you would divide by it.
A polynomial such as \(f(x) = x^2 + 3x - 5\) uses neither operation, so it has no excluded values.
Worked Examples: Functions, Domain and Range
💡 Example 1: Is the mapping a function?
Each mapping diagram below shows a rule applied to a small set of inputs. Decide whether each one is a function.
\(x \mapsto x + 4\)
One arrow leaves each input: one-to-one, a function ✓
\(x \mapsto \pm\sqrt{x}\)
Input 4 fires two arrows: one-to-many, not a function ✗
What's happening?
Count the arrows leaving each input. Exactly one arrow from every input means a function. It does not matter how many arrows arrive at an output; only the arrows leaving each input decide it.
💡 Example 2: The vertical line test
Use the vertical line test to decide whether each graph shows a function.
A parabola
Every vertical line crosses once: a function (many-to-one) ✓
A sideways curve
The red line crosses twice: not a function ✗
What's happening?
A vertical line marks one input value. If the graph meets it twice, that input has two outputs, which breaks the function rule. The parabola is safe everywhere; the sideways curve fails wherever the red line catches both branches.
💡 Example 3: Evaluate and solve
Given \(f(x) = 5x + 2\), find \(f(4)\) and \(f(-3)\), then solve \(f(x) = 32\).
Evaluating is substitution:
\[ \begin{array}{rcl} f(4) &=& 5 \times 4 + 2 \\ &=& 22 \\[4pt] f(-3) &=& 5 \times (-3) + 2 \\ &=& -13 \end{array} \]Solving \(f(x) = 32\) is an equation:
\[ \begin{array}{rcl} 5x + 2 &=& 32 \\ 5x &=& 30 \\ x &=& 6 \end{array} \]What's happening?
\(f(4)\) asks for an output: substitute in. \(f(x) = 32\) gives you the output and asks which input produced it: set the rule equal to 32 and solve. Keep negatives in brackets when substituting.
💡 Example 4: Range from a listed domain
Find the range of \(g(x) = x^2 + 1\) for the domain \(\{-3, -1, 1, 2\}\).
Range: \(\{2, 5, 10\}\)
What's happening?
Push every domain value through the function and collect the outputs. \(-1\) and \(1\) both give 2, and a set lists each value once, so the range has three members, not four.
💡 Example 5: Range over an interval
Find the range of \(f(x) = 3x - 1\) for the domain \(0 \leq x \leq 3\).
Range: \(-1 \leq f(x) \leq 8\)
What's happening?
The domain runs along the x-axis; the graph carries it up to the line; the range is the strip of the y-axis the segment covers. If the gradient were negative, the smallest input would give the largest output, so always check both ends.
💡 Example 6: Range of a squared function
Find the range of \(h(x) = (x - 2)^2 + 3\), where the domain is all real numbers.
\((x-2)^2 \geq 0\) for every real \(x\), and it equals 0 only at \(x = 2\).
So the least value of \(h(x)\) is \(0 + 3 = 3\).
Range: \(h(x) \geq 3\)
What's happening?
The squared bracket bottoms out at zero, so the whole function bottoms out at the constant on the end. The graph confirms it: the lowest point is \((2, 3)\) and every output from 3 upwards is produced. For \(3 - x^2\)-style functions the parabola opens downwards and 3 becomes the greatest value instead.
💡 Example 7: Values excluded from the domain
State which values must be excluded from the domain of \(g(x) = \dfrac{1}{x + 3}\) and of \(h(x) = \sqrt{x - 1}\).
\(y = \dfrac{1}{x+3}\)
\(y = \sqrt{x-1}\)
For \(g\), set the denominator equal to zero:
\[ \begin{array}{rcl} x + 3 &=& 0 \\ x &=& -3 \end{array} \]Exclude \(x = -3\).
For \(h\), the radicand must not be negative: \(x - 1 \geq 0\) gives \(x \geq 1\) allowed, so exclude \(x < 1\).
What's happening?
The graphs tell the same story. The reciprocal curve splits into two branches either side of the dashed line at \(x = -3\): the function simply has no value there. The root curve starts at \((1, 0)\) and exists only to the right. Note \(\sqrt{0} = 0\) is allowed, so \(x = 1\) itself stays in the domain: the excluded region is strictly \(x < 1\). Only when the root sits in a denominator, as in \(\dfrac{1}{\sqrt{x-1}}\), does the boundary get excluded too, giving \(x \leq 1\).
🔑 Key Points
- A function turns each input into exactly one output.
- One-to-one and many-to-one mappings are functions; one-to-many is not.
- Vertical line test: a graph shows a function if no vertical line crosses it more than once.
- Domain = allowed inputs (x-axis). Range = outputs produced (y-axis).
- Evaluating \(f(3)\) is substitution; solving \(f(x) = k\) is an equation.
- \((x-a)^2 + b\) has least value \(b\); its range is \(f(x) \geq b\).
- Excluded values come from a denominator equal to zero or a negative under a square root.
⚠️ Common Pitfalls
- Swapping domain and range: the domain is the inputs, the range is the outputs.
- Calling many-to-one "not a function". Sharing an output is fine; only one input with two outputs breaks the rule.
- Substituting a negative without brackets: \(f(-3)\) into \(x^2\) is \((-3)^2 = 9\), not \(-9\).
- Writing the range of \(x^2 + 6\) as \(f(x) \geq 0\). The square is at least 0, so the function is at least 6.
- Missing the second excluded value of \(\dfrac{1}{x^2 - 25}\): both \(x = 5\) and \(x = -5\) make the denominator zero.
- Excluding the boundary of a square root: \(\sqrt{0}\) is allowed, so \(\sqrt{x - 4}\) excludes only \(x < 4\), not \(x \leq 4\).