Cambridge International AS & A Level · Topic 1.2
A-Level Maths 9709 / Topic 1.2 / AS & A Level

Inputs, outputs and chains.

A function is a rule together with the set of inputs it accepts. Learn to state the domain, find the range, decide whether a function is one-one, and build composite functions such as \(fg(x)\), including when they can exist at all.

The key idea

The domain is the set of inputs; the range is the set of outputs it produces. \(fg(x) = f\big(g(x)\big)\): apply \(g\) FIRST. The composite \(fg\) exists only when the range of \(g\) lies within the domain of \(f\).

x y 2 5 3 7 12 minimum (2, 3) (5, 12) (0, 7) range 3 ≤ f(x) ≤ 12
Fig. 1: f(x) = (x - 2)² + 3 for 0 ≤ x ≤ 5. The least output is at the vertex, not at an end, so the range is 3 ≤ f(x) ≤ 12
Section 01

Domain and range.

In the lab, choose a function and follow the mapping diagram as each input in the domain is sent to its output: the set of outputs is the range. A function is written \(f : x \mapsto 2x - 3\) or \(f(x) = 2x - 3\), always with its domain, e.g. 'for \(x \in \mathbb{R}\)' or 'for \(x \ge 1\)'.

Worked example Linear and reciprocal
Find the range of (a) \(f(x) = 2x - 3\) for \(-1 \le x \le 4\) (b) \(g : x \mapsto \dfrac{1}{x}\) for \(x \ge 1\).
  1. (a) \(f\) is increasing, so the ends give the extremes: \(f(-1) = -5\) and \(f(4) = 5\).
  2. (b) \(g(1) = 1\). As \(x\) increases, \(\dfrac{1}{x}\) decreases towards 0 but never reaches it.
Answer: (a) \(-5 \le f(x) \le 5\)   (b) \(0 < g(x) \le 1\)
Worked example A quadratic on a restricted domain
Find the range of \(f(x) = x^{2} - 4x + 7\) for \(0 \le x \le 5\) (Fig. 1).
  1. Complete the square: \(f(x) = (x - 2)^{2} + 3\), vertex \((2, 3)\).
  2. \(x = 2\) is inside the domain, so the least value is \(3\).
  3. Ends: \(f(0) = 7\) and \(f(5) = 12\); the greater is 12.
Answer: \(3 \le f(x) \le 12\)
Examiner trap

Do not just substitute the two ends of the domain. For Fig. 1 that gives \(7 \le f(x) \le 12\), missing every output between 3 and 7. Always look for a vertex inside the domain.

Section 02

One-one or many-one?

A function is one-one if every output comes from exactly one input. On a graph: no horizontal line meets the curve more than once. Only one-one functions have inverses, so restricting the domain to make a function one-one is a common exam step.

FunctionTypeWhy
\(x^{3}\), \(x \in \mathbb{R}\)one-onealways increasing
\(x^{2}\), \(x \in \mathbb{R}\)many-one\(f(-2) = f(2) = 4\)
\(x^{2}\), \(x \ge 0\)one-oneonly the right half of the parabola
\(\sin x\), \(0^{\circ} \le x \le 180^{\circ}\)many-one\(\sin 30^{\circ} = \sin 150^{\circ}\)
Worked example Restricting a domain
\(f(x) = x^{2} - 6x + 1\) for \(x \ge k\). Find the least value of \(k\) for which \(f\) is one-one.
  1. Complete the square: \(f(x) = (x - 3)^{2} - 8\), so the vertex is at \(x = 3\).
  2. To the right of the vertex the parabola only increases, so it is one-one there.
  3. Any domain starting before 3 includes points on both sides of the vertex with equal outputs.
Answer: Least \(k = 3\)
Examiner trap

The least \(k\) is the \(x\)-coordinate of the vertex, not its \(y\)-coordinate. For \((x - 3)^{2} - 8\) the answer is \(k = 3\), not \(-8\).

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

Find the range of \(f(x) = 3x + 1\) for \(0 \le x \le 2\).

Quick check+10 XP

\(f(x) = x^{2} + 1\) and \(g(x) = 2x\). Find \(fg(3)\).

Quick check+10 XP

Which of these functions is one-one?

Quick check+10 XP

Find the range of \(g : x \mapsto x^{2} + 1\) for \(x \in \mathbb{R}\).

Section 03

Composite functions.

In the lab, type in \(f(x)\) and \(g(x)\) and compare \(fg(x)\), where \(x\) goes into \(g\) first, with \(gf(x)\). Notice that \(fg\) and \(gf\) are usually different. Work from the inside out: the function written nearest \(x\) acts first.

Worked example Building fg and gf
\(f(x) = 2x + 1\) and \(g(x) = x^{2}\), both for \(x \in \mathbb{R}\). Find \(fg(x)\) and \(gf(x)\), and solve \(fg(x) = 19\).
  1. \(fg(x) = f\big(g(x)\big) = f(x^{2}) = 2x^{2} + 1\).
  2. \(gf(x) = g\big(f(x)\big) = g(2x + 1) = (2x + 1)^{2}\).
  3. \(2x^{2} + 1 = 19 \Rightarrow x^{2} = 9\).
Answer: \(fg(x) = 2x^{2} + 1\), \(gf(x) = (2x + 1)^{2}\); \(fg(x) = 19\) when \(x = \pm 3\)
Worked example When does a composite exist?
\(f : x \mapsto x - 3\) for \(x \in \mathbb{R}\) and \(g : x \mapsto \sqrt{x}\) for \(x \ge 0\). Explain why \(fg\) exists but \(gf\) does not.
  1. \(fg\): the range of \(g\) is \(g(x) \ge 0\), which lies inside the domain of \(f\) (all real numbers). So \(fg(x) = \sqrt{x} - 3\) exists.
  2. \(gf\): the range of \(f\) is all real numbers, including negatives such as \(f(1) = -2\).
  3. \(g(-2) = \sqrt{-2}\) is not defined, so the range of \(f\) is not within the domain of \(g\).
Answer: \(fg\) exists; \(gf\) does not, because \(f\) can output negative numbers that \(g\) cannot accept
Your turn
\(f(x) = x^{2} - 1\) and \(g(x) = 3x + 2\) for \(x \in \mathbb{R}\). Find \(gf(2)\) and \(fg(x)\).
Examiner trap

\(fg(x)\) is NOT \(f(x) \times g(x)\). With \(f(x) = 2x + 1\) and \(g(x) = x^{2}\), the product is \(2x^{3} + x^{2}\), but \(fg(x) = 2x^{2} + 1\).

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS & A Level Paper 1 to 6 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Find the range of \(f(x) = x^{2} - 6x + 4\) for \(1 \le x \le 7\).

Exam style+20 XP

\(f(x) = 2x + 3\) and \(g(x) = x^{2} - 1\) for \(x \in \mathbb{R}\). Solve \(gf(x) = 24\).

Exam style+20 XP

\(f(x) = x^{2} - 4x + 7\) for \(x \ge k\). Find the least value of \(k\) for which \(f\) is one-one.

Exam style+20 XP

\(f(x) = x^{2} + a\) for \(x \in \mathbb{R}\) and \(g(x) = \sqrt{x - 1}\) for \(x \ge 1\). For which values of the constant \(a\) does \(gf\) exist?

Skill unlocked

Domains, ranges and composites, done.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Range of a linear function, building and solving with \(fg\) and \(gf\), a range by completing the square, a restricted domain, when a composite exists, and a discount-and-voucher problem.