Functions
Functions: domain, range and one-one functions
On this page
- What you need to be able to do
- What you should already know
- A function is a rule with one output for each input
- The words: function, domain, range
- One-one, many-one, and the line tests
- Finding the range, by type of function
- Key facts at a glance
- How this is examined
- Mark-scheme focus
- Worked examples
- Summary
- Can I do this?
- Quiz
What you need to be able to do
- 1.2Understand the words function, domain, range, one-one (and many-one).
- 1.2Find the range of a function in simple cases, and write it in the notation the mark scheme accepts.
- 1.2Decide whether a function is one-one, and explain why a function has no inverse.
You need: completing the square (the range of a quadratic comes from its vertex). Next: Composite functions.
What a function is, which inputs it allows and which outputs it gives, from the basics, with our own examples. Past-paper questions come in Part 2.
What you should already know
Substituting into a formula
\(f(x)=3x^2-1\) means "square the input, times 3, take 1". So \(f(-2)=3(4)-1=11\). Brackets matter: \(f(a+1)=3(a+1)^2-1\).
Quick check: \(f(x)=5-2x\): find \(f(3)\) and \(f(-1)\)
\(-1\) and \(7\)
Inequality notation
\(x\ge2\): 2 and everything above. \(-1<x\le4\): above \(-1\), up to and including 4. \(x\in\mathbb R\): every real number.
Quick check: write "all numbers from 0 to 5, excluding 0"
\(0<x\le5\)
The vertex of a quadratic
\(a(x+p)^2+q\) has its vertex at \((-p,\,q)\): a minimum if \(a>0\) (Completing the square).
Quick check: least value of \((x-1)^2+5\)?
\(5\), at \(x=1\)
The graph of y = 1/x
Two branches; it never touches either axis. As \(x\) grows, \(\tfrac1x\to0\); as \(x\to0^+\), \(\tfrac1x\) grows without limit. The axes are asymptotes.
Quick check: can \(\tfrac1x\) ever equal \(0\)?
no: a fraction is zero only when its top is zero
A function is a rule with one output for each input
Think of a function as a machine: put a number in, one number comes out. Arrow diagrams show the three ways inputs and outputs can be linked.
| Link | Example | Is it a function? |
|---|---|---|
| one-one: each input to its own output | \(x\mapsto2x+1\): \(1\to3,\ 2\to5,\ 3\to7\) | yes, and one-one |
| many-one: different inputs, same output | \(x\mapsto x^2\): \(2\to4\) and \(-2\to4\) | yes, but many-one |
| one-many: one input, several outputs | \(x\mapsto\pm\sqrt x\): \(4\to2\) and \(4\to-2\) | no: a function gives exactly one output |
That is why \(\sqrt x\) on its own always means the positive root: so that it is a function.
The words: function, domain, range
| Written | Read as | Example |
|---|---|---|
| \(f(x)=x^2+1\) for \(x\in\mathbb R\) | f of x is x² + 1, for every real x | domain: all real numbers |
| \(f:x\mapsto x^2+1\) for \(x\ge0\) | f maps x to x² + 1, for x ≥ 0 | the same rule, a smaller domain |
| range \(f(x)\ge1\) | the outputs are all the numbers from 1 upwards | written in \(f(x)\) or \(y\), never in \(x\) |
The domain is a choice. \(x^2+1\) for \(x\in\mathbb R\) and \(x^2+1\) for \(x\ge0\) are different functions: the second one is one-one, the first one isn't. Domains are often restricted on purpose to make inverses possible, so read the "for …" part every time.
Which inputs are allowed?
A domain can only contain numbers the rule can actually use. Two things are impossible for real numbers: dividing by zero and square-rooting a negative.
| Rule | Problem | Largest possible domain |
|---|---|---|
| \(\dfrac{1}{x-3}\) | \(x=3\) divides by zero | \(x\ne3\) |
| \(\sqrt{x-2}\) | \(x-2\) must be \(\ge0\) | \(x\ge2\) |
| \(\dfrac{5}{\sqrt{4-x}}\) | \(4-x>0\) (no zero underneath either) | \(x<4\) |
| \(x^2-6x\) | none | \(x\in\mathbb R\) |
- \(f(x)=x^2-4\) for \(x\ge1\). Find \(f(1)\), \(f(3)\). Is \(f(-3)\) defined?
Answer
\(-3\), \(5\); no: \(-3\) is not in the domain - What is the largest possible domain of \(\sqrt{2x+6}\)?
Answer
\(2x+6\ge0\): \(x\ge-3\)
One-one, many-one, and the line tests
- Is it a function? Each \(x\) must give one \(y\): a vertical line meets the graph at most once.
- One-one: each output comes from only one input. A horizontal line meets the graph at most once.
- Many-one: some output comes from two or more inputs (\(g(2)=g(-2)=\tfrac18\)).
- A function that is always increasing, or always decreasing, on its domain is one-one. One with a turning point inside its domain is not.
Why it matters: only a one-one function has an inverse (next pages). The question "explain whether \(g^{-1}\) exists" is answered with one of these sentences:
"\(g^{-1}\) does not exist because \(g\) is not one-one" (or "is many-one"; e.g. \(g(1)=g(-1)\)).
"\(f\) has a minimum point at \(x=1\) (inside the domain), so f is not one-one and has no inverse."
"\(f\) is a decreasing function, so it is one-one and \(f^{-1}\) exists."
Saying "it fails the horizontal line test" describes the picture; the reason in words is that the function is not one-one. Always write that phrase.
- Is \(f(x)=(x-2)^2\) for \(x\ge0\) one-one?
Answer
no: the vertex \(x=2\) is inside the domain; \(f(1)=f(3)=1\) - Is \(f(x)=(x-2)^2\) for \(x\ge2\) one-one?
Answer
yes: it only increases on \(x\ge2\) - What is the smallest \(k\) for which \(x^2+6x\) for \(x\ge k\) is one-one?
Answer
\((x+3)^2-9\): vertex at \(x=-3\), so \(k=-3\)
Finding the range, by type of function
The range is "every value \(f(x)\) can take". Look at the graph over the given domain only: the lowest and highest points, the end-points and any asymptote.
1 Quadratic on a restricted domain
\(f(x)=(x+4)^2-10\) for \(x\ge0\). Find the range of \(f\).
Askedrange of fKnowvertex at x = −4, outside the domainRoutef increases for x ≥ 0: the least value is at x = 0
- Vertex \((-4,-10)\) is not in the domain (\(x\ge0\)).
- For \(x\ge0\) the curve rises, so the least value is \(f(0)=16-10=6\).
- Range: \(\mathbf{f(x)\ge6}\) (\(\ge\): \(x=0\) is allowed)
The trap is answering f(x) ≥ −10 from the completed square without checking the domain. It is ≥, not >, because x = 0 is allowed; and a range is in f(x), not x.
2 Quadratic whose vertex is outside the domain
\(f(x)=-2(x-3)^2+11\) for \(x\le1\). Find the range of \(f\).
AskedrangeKnowthe vertex x = 3 is outside x ≤ 1Routef is increasing up to x = 1: greatest value at the end
- For \(x\le1\) the ∩ curve is still rising, so the greatest value is at \(x=1\)
- \(f(1)=-2(4)+11=3\)
- Range: \(\mathbf{f(x)\le3}\)
If the domain were x ≤ 5, the vertex (3, 11) would be inside it and the range would be f(x) ≤ 11.
3 A reciprocal: look for the asymptote
\(f(x)=3-\dfrac{4}{x+1}\) for \(x>-1\). Find the range of \(f\).
AskedrangeKnow\(\tfrac{4}{x+1}>0\) for \(x>-1\)Routeyou take something positive away from 3
- For \(x>-1\), \(x+1>0\), so \(\dfrac4{x+1}>0\) (huge near \(x=-1\), tiny for large \(x\))
- So \(f(x)=3-(\text{positive})\): always less than 3, and as small as you like
- Range: \(\mathbf{f(x)<3}\)
No vertex here: the range comes from the asymptote. Sketch it and the answer is obvious.
4 Bounded above and below
\(f(x)=\dfrac{x^2-9}{x^2+9}=1-\dfrac{18}{x^2+9}\) for \(x>3\). Find the range of \(f\).
Askedboth ends of the rangeKnow\(x^2+9>18\) for \(x>3\)Routefind the value at the end-point x = 3 and the limit as x grows
- At \(x=3\) (not included): \(1-\tfrac{18}{18}=0\)
- As \(x\) grows, \(\tfrac{18}{x^2+9}\to0\), so \(f(x)\to1\) (never reaching it)
- Range: \(\mathbf{0<f(x)<1}\)
A bounded range has TWO ends. Find both: the end-point of the domain and the limit.
5 Bounded, with a maximum
\(g(x)=\dfrac{1}{x^2+4}\) for \(x\in\mathbb R\). Find the range of \(g\).
AskedrangeKnow\(x^2+4\ge4\)Routelargest output when x² + 4 is smallest
- \(x^2+4\ge4\), so \(g(x)\le\tfrac14\) (equal at \(x=0\))
- \(g(x)>0\) always, and \(\to0\) for large \(x\)
- Range: \(\mathbf{0<g(x)\le\tfrac14}\)
- Sketch the function over its domain only (completed square for a quadratic; asymptotes for a fraction).
- Ends: work out \(f\) at each end of the domain; decide whether that end is included (\(\ge\)) or not (\(>\)).
- Turning point: if the vertex is inside the domain, it gives the least (or greatest) value.
- Limits: as \(x\) grows or approaches an asymptote, what value is approached but never reached? (strict sign)
- Write it in \(f(x)\) or \(y\), as a single chain when it is bounded: \(0<f(x)<1\).
- Find the range of \(f(x)=x^2-8x+20\) for \(x\in\mathbb R\).
Answer
\((x-4)^2+4\): \(f(x)\ge4\) - Find the range of \(f(x)=x^2-8x+20\) for \(x\ge6\).
Answer
vertex \(x=4\) is outside: \(f(6)=8\), so \(f(x)\ge8\) - Find the range of \(f(x)=2+\dfrac{6}{x}\) for \(x\ge3\).
Answer
\(\tfrac6x\) falls from \(2\) towards \(0\): \(2<f(x)\le4\)
Key facts at a glance
- Function: exactly one output for every input in the domain. Domain = allowed inputs (part of the definition); range = outputs produced.
- No dividing by zero, no square roots of negatives: these limit the domain.
- One-one: every horizontal line meets the graph at most once. Only one-one functions have inverses.
- Range: sketch over the domain; check the ends, any vertex inside the domain, and any asymptote.
- Write a range in \(f(x)\) or \(y\), never \(x\); \(\ge\) when the value is reached, \(>\) when it is only approached.
How domain, range and one-one are examined, what the mark scheme wants, then real Paper 1 questions worked through slowly.
How this is examined
The range is asked in most Functions questions (1-2 marks) and often decides whether an inverse exists. Ranges are lost easily: the June 2023 report was "surprised to see only around half of candidates finding and expressing the range correctly", and the June 2022 report: "it was rare for candidates to find both the upper and lower limits of the range." Schemes say "Must be ≥ rather than >" when the end is included, and a range written in \(x\) scores nothing.
Answers that have scored for "explain why f has no inverse": "f has a minimum point at \(x=1\), so f is not one-one" 9709/12/O/N/22 Q9(c); "f is a decreasing function, so it is one-one" 9709/12/O/N/25 Q9(b).
Mark-scheme focus
Find the range of f
![The function f is defined by f(x) = 2x² − 16x + 23 for x < 3. (a) Express f(x) in the form 2(x + a)² + b. [2] (b) Find the range of f. [1]](/notes-content/9709/functions/img/9709_s22_13_q06_ab.png)
- (a) \(2(x-4)^2-9\) B1 B1
- (b) \(y>-7\), \(f(x)>-7\) or \((-7,\infty)\) B1
- \(x>-7\) (that describes inputs, not outputs): "Don't allow x > −7"
- \(f(x)\ge-7\) (\(x=3\) is NOT in the domain \(x<3\), so \(-7\) is never reached)
- \(f(x)\ge-9\) (the vertex \(x=4\) is outside the domain)
For \(x<3\) the curve is falling towards \(x=3\) (the vertex is at \(x=4\)), so the outputs are everything above \(f(3)=-7\), with a strict sign because 3 itself is excluded.
From: 9709/13/M/J/22 Q6(a)(b).
State the range of g and explain whether g⁻¹ exists
![(a) f(x) = √x − 1 for x > 1: find f⁻¹(x). [1] The diagram shows the graph of y = g(x) where g(x) = 1/(x² + 2) for x ∈ R. (b) State the range of g and explain whether g⁻¹ exists. [2] h(x) = 1/(x² + 2) for x ≥ 0. (c) Solve hf(x) = f(25/16). [4]](/notes-content/9709/functions/img/9709_s24_12_q04.png)
- \(0<g(x)\le\tfrac12\) (or \(g(x)>0\) and \(g(x)\le\tfrac12\), or \(\left(0,\tfrac12\right]\)) B1
- "g⁻¹ does not exist because g is not one to one" / "many to one" / "one to many" / "fails the horizontal line test" B1
- "\(g(x)>0,\ g(x)\le\tfrac12\)" and "\(g(x)>0\) or \(g(x)\le\tfrac12\)" (both refused on this scheme)
- \(0\le g(x)\le\tfrac12\) (\(g\) never equals 0)
- "g⁻¹ doesn't exist because you can't divide by zero"
A bounded range is safest as ONE chain, 0 < g(x) ≤ ½. Note the comma form was refused here but accepted elsewhere: the chain is accepted everywhere.
From: 9709/12/M/J/24 Q4(b).
- State the range: on nearly every Paper 1 functions question, 1 mark, lost to notation more than to maths.
- Largest/least k for one-one: 1 mark: the x-coordinate of the vertex.
- Explain why no inverse / not one-one: 1 mark; name the property (not one-one), with a reason (turning point, f(a) = f(b)).
Worked examples
Example 1 · Range when the vertex is outside the domain (Paper 1, 1 mark) ★ Easy
![f(x) = (x + 3)² − 12 for x ≥ 0. (a) State the range of f. [1]](/notes-content/9709/functions/img/9709_w25_11_q06.png)
\(f\) is already in completed-square form. The vertex is at \(x=-3\), but the domain only allows \(x\ge0\). So on the allowed part the curve is rising, and its lowest point is the end-point \(x=0\).
- for x ≥ 0only inputs from 0 upwards; −3 is not one of them
- Stateno working needed, but the notation must be right
- (a)the range
- \(f(x)=(x+3)^2-12\)\(x\ge0\)
- x = 0 is included (≥), so f(0) is a value of f
- Findrange
- Checkis the vertex \(x=-3\) in the domain? No
- Least\(f(0)=-3\)
- Trap\(f(x)\ge-12\), or writing \(x\ge-3\)
Is −12 a value of f?
Only at \(x=-3\), which is not allowed. So no.
Why ≥ and not >?
\(x=0\) is in the domain, so \(f(0)=-3\) is actually produced.
5 Now solve it have a go on paper first, then open the worked solution
- For \(x\ge0\), \((x+3)^2\ge9\), so \(f(x)\ge9-12\)
- \(\mathbf{f(x)\ge-3}\) B1
\(f(1)=16-12=4\ge-3\) ✓; \(f(0)=-3\) is the smallest ✓.
Example 2 · Range of a reciprocal function (Paper 1, 1 mark) ★★ Medium
![The function f is defined by f(x) = 2 − 5/(x + 2) for x > −2. (a) State the range of f. [1]](/notes-content/9709/functions/img/9709_s23_13_q07.png)
For \(x>-2\) the fraction \(\tfrac{5}{x+2}\) is always positive. So \(f(x)\) is 2 minus something positive: below 2. It can get as close to 2 as we like (large \(x\)) and as low as we like (\(x\) just above −2).
- x > −2x + 2 is positive, never zero
- rangeoutputs: in f(x) or y
- (a)range
- \(f(x)=2-\dfrac5{x+2}\)\(x>-2\)
- \(y=2\) is an asymptote: never reached
- Findrange
- Use\(\tfrac5{x+2}>0\Rightarrow f(x)<2\)
- Trap\(x<2\) or \(f(x)\le2\)
Can f(x) equal 2?
Only if \(\tfrac5{x+2}=0\), which never happens.
Is there a lower limit?
No: as \(x\to-2^+\), \(\tfrac5{x+2}\to\infty\), so \(f(x)\to-\infty\).
5 Now solve it have a go on paper first, then open the worked solution
- \(\tfrac5{x+2}>0\) for \(x>-2\), and it takes every positive value
- \(\mathbf{f(x)<2}\) B1 (also \(-\infty<f(x)<2\), \((-\infty,2)\))
The scheme: "Do not accept \(x<2\) or \(f(x)\le2\)."
\(f(0)=2-2.5=-0.5<2\) ✓; \(f(100)\approx1.95<2\) ✓.
Example 3 · Both limits of a range (Paper 1, 4 marks) ★★★ Hard
![The function f is defined by f(x) = (x² − 4)/(x² + 4) for x > 2. (b) Show that 1 − 8/(x² + 4) can be expressed as (x² − 4)/(x² + 4) and hence state the range of f. [4]](/notes-content/9709/functions/img/9709_s22_11_q06.png)
Why it is hard: the June 2022 report: "it was rare for candidates to find both the upper and lower limits of the range".
First a "show that" in algebra. Then use the new form: \(1-\tfrac{8}{x^2+4}\) is easy to reason about. For \(x>2\), \(x^2+4\) is more than 8, so the fraction is between 0 and 1.
- Show thatstart from 1 − 8/(x² + 4), use a common denominator, reach the given form
- henceuse the new form for the range
- x > 2x = 2 is NOT included
- (b)the identity, then the range
- \(f(x)=\dfrac{x^2-4}{x^2+4}\)\(x>2\)
- Rangeboth ends
- Lowerat \(x=2\): \(1-\tfrac88=0\) (not reached)
- Upper\(\tfrac{8}{x^2+4}\to0\): \(f\to1\) (not reached)
Write 1 − 8/(x² + 4) as one fraction.
\(\dfrac{x^2+4-8}{x^2+4}=\dfrac{x^2-4}{x^2+4}\).
Why is 0 not in the range?
It needs \(x=2\), and the domain is \(x>2\).
5 Now solve it have a go on paper first, then open the worked solution
- \(1-\dfrac8{x^2+4}=\dfrac{x^2+4-8}{x^2+4}=\dfrac{x^2-4}{x^2+4}\) M1 A1
- \(x>2\Rightarrow x^2+4>8\Rightarrow0<\dfrac8{x^2+4}<1\)
- So \(\mathbf{0<f(x)<1}\) B1 B1
The scheme gives B1 for each inequality and "SC B1 for \(0\le f(x)\le1\)"; it accepts \(f(x)>0,\ f(x)<1\) and \((0,1)\).
\(f(3)=\tfrac{5}{13}\approx0.38\), between 0 and 1 ✓.
Example 4 · Largest k, then the range (Paper 1, 4 marks) ★★ Medium
![(a) Express −3x² + 12x + 2 in the form −3(x − a)² + b. [2] The one-one function f is defined by f: x ↦ −3x² + 12x + 2 for x ≤ k. (b) State the largest possible value of the constant k. [1] It is now given that k = −1. (c) State the range of f. [1]](/notes-content/9709/functions/img/9709_w21_11_q08.png)
The quadratic is ∩-shaped with its vertex at \(x=2\). To the left of the vertex it only goes up; once you pass the vertex it comes back down and outputs repeat. So \(f\) is one-one as long as the domain stops at the vertex.
- one-oneno output repeated: the domain must lie on one side of the vertex
- largest possible kstop exactly at the vertex
- now given k = −1a new, smaller domain: x ≤ −1
- (b)largest k
- (c)range for k = −1
- \(-3(x-2)^2+14\)from (a)
- (b)largest k
- Usevertex x = 2
- (c)range
- Userising for \(x\le-1\); value at \(x=-1\)
Why is k = 3 not allowed?
Then \(f(1)=f(3)=11\): two inputs, one output.
What is f(−1)?
\(-3(-3)^2+14=-27+14=-13\).
5 Now solve it have a go on paper first, then open the worked solution
- (a) \(-3(x-2)^2+14\) B1 B1
- (b) largest \(k=2\) B1
- (c) \(f(-1)=-13\), so \(\mathbf{f(x)\le-13}\) B1
\(f(-2)=-48+14=-34\le-13\) ✓.
Summary
- Domain = allowed inputs (given in the definition); range = outputs, written in f(x) or y.
- One-one: each output from one input; a turning point inside the domain stops it being one-one.
- Range: sketch over the domain; end-points (included?), vertex (inside?), asymptotes (never reached).
- Bounded range as one chain: 0 < f(x) ≤ ½.
| If you see… | do this |
|---|---|
| "state the range" | sketch over the domain; answer in f(x) with the right sign |
| a quadratic with a restricted domain | complete the square; is the vertex inside the domain? |
| a fraction 5/(x + 2) | asymptotes: the range stops short of the horizontal one |
| "largest k such that f is one-one" | the x-coordinate of the vertex |
| "does g⁻¹ exist?" | only if g is one-one; say "not one-one" with a reason |
Can I do this?
- I know what function, domain and range mean, and that the domain is part of the definition.
- I can decide whether a function is one-one and explain why one has no inverse.
- I can find the range of a restricted quadratic, a reciprocal function and a bounded function.
- I write a range in f(x) or y (never x) with the correct strict or non-strict sign.
Anything unticked: revise that section first. All ticked: take the quiz.
Quiz
The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.
Concept checks
Answer each one in your head first, then open it.
1Why do Paper 1 questions so often give a domain like \(x\ge2\) for a quadratic?Show answer
To make the function one-one (the domain stops at or after the vertex), so that it has an inverse.
2Can a function have the same output for two inputs? Can a function have two outputs for one input?Show answer
Yes (that is many-one, e.g. \(x^2\)). No: two outputs for one input means it isn't a function.
3Is the range of \(f(x)=2x+1\) for \(0\le x<3\) the same as for \(0\le x\le3\)?Show answer
No: \(1\le f(x)<7\) in the first case, \(1\le f(x)\le7\) in the second. End-points matter.
Exam-style practice
New questions, not used above. Do them on paper, then mark your work against the official mark scheme.
![f(x) = 1 + 3/(x − 2) for x > 2. (a) State the range of f. [1]](/notes-content/9709/functions/img/9709_w23_13_q07.png)
Show the mark scheme
| Part | Answer / working | Marks | Guidance |
|---|---|---|---|
| (a) | \(f(x)>1\) (or \(y>1\), \((1,\infty)\)) | B1 | not \(x>1\); not \(\ge\): the asymptote \(y=1\) is never reached |
| Total: 1 mark | |||
![The function f is defined by f(x) = −2x² − 8x − 13 for x < −3. (a) Express f(x) in the form −2(x + a)² + b, where a and b are integers. [2] (b) Find the range of f. [1] (c) Find an expression for f⁻¹(x). [3]](/notes-content/9709/functions/img/9709_w22_13_q02.png)
Show the mark scheme
| Part | Answer / working | Marks | Guidance |
|---|---|---|---|
| (a) | \(-2(x+2)^2-5\) | B1B1 | one for \(a=2\), one for \(b=-5\) |
| (b) | \(f(x)<-7\) | B1 | \(f(-3)=-7\), not reached; \(y<-7\) or \((-\infty,-7)\) also accepted |
| (c) | \(y=-2(x+2)^2-5\Rightarrow(x+2)^2=\dfrac{-y-5}{2}\) | M1 | operations correct; allow sign errors |
| \(x+2=-\sqrt{\dfrac{-y-5}{2}}\) | M1 | the NEGATIVE root: \(x<-3\), so \(x+2<0\) | |
| \(f^{-1}(x)=-2-\sqrt{\dfrac{-x-5}{2}}\) | A1 | ||
| Total: 6 marks | |||
Examiner tip The domain decides the sign of the square root in (c). With \(x<-3\), the bracket \(x+2\) is negative, so take \(-\sqrt{\ }\).
Your progress on this note is saved when JavaScript is on.