Specify a function before composing its rules
By UK A Level Mathematics · independent study · myAudience

Original myAudience generated mathematics illustration; not a documentary photograph. Diagram geometry is schematic, not a calibrated measurement. · Original generated project artwork; no source textbook or exam-board figures reused.
Specify a function before composing its rules
A function assigns exactly one output to each input in its domain. The domain is the set of allowed inputs; the range is the set of outputs actually reached. A many-to-one function is allowed: f(x) = x² sends −2 and 2 to the same output 4. A rule assigning two different outputs to a single input is not a function. This lesson extends earlier input–output ideas into the A Level composition requirement.
The formula alone does not always specify the intended domain. Over real inputs, √(x − 1) naturally requires x ≥ 1, while 1/(x − 1) excludes x = 1. A contextual domain can be narrower, such as integer counts or nonnegative elapsed time. State the domain before describing the range. Restricting x² to x ≥ 2 changes its range from [0, ∞) to [4, ∞).
Composition means passing the output of one function into another. The board convention fg(x) means f(g(x)): do g first. If f(x) = 2x + 3 and g(x) = x², then fg(x) = 2x² + 3 while gf(x) = (2x + 3)². The order generally matters. The notation fg does not mean multiplying the two outputs; write f(x)g(x) when that product is intended.
The domain of f∘g consists of inputs allowed by g whose outputs also belong to the domain of f. For f(u) = √u and g(x) = x − 4, composition requires x − 4 ≥ 0, giving x ≥ 4. If an intermediate function has a denominator, its exclusion remains even when the final formula seems to cancel it. A composition is a process, so every intermediate stage must be defined.
Work from the inside outward and substitute with brackets. You can evaluate fg(2) numerically or derive the whole rule fg(x), but either method should respect the same domains. This makes functions useful descriptions of successive operations, such as converting units before applying a rate. An original model can choose an order for a reason; merely rearranging the written functions may change the physical meaning.
Let f(u)=√(u−2), u≥2, and g(x)=1/(x−1), x≠1. The domain of f∘g requires 1/(x−1)≥2. Rearranging gives (3−2x)/(x−1)≥0. Sign analysis yields 1<x≤3/2. The radical at 3/2 is zero and is allowed, while 1 is a pole and excluded. Intersecting the written domains “u≥2” and “x≠1” directly would compare different variables and give a false answer.
Reverse the order: g∘f=1/(√(x−2)−1). Now x≥2 and √(x−2)≠1, so x≥2 with x≠3. The two formulas and domains differ. Check x=2 is allowed for g∘f and gives −1; it is not allowed for f∘g. Composition order changes the intermediate quantity, and therefore changes which forbidden values matter.
Read the mapping panels in order. Squaring without a domain restriction merges two inputs; restricting to nonnegative inputs makes a square-root inverse possible. A finite sample illustrates the mechanism but does not prove a whole function is one-to-one.
Worked example: Let f(u) = √(u − 2), u ≥ 2, and g(x) = x². Find fg(x) and its real domain.
Substitute g into f: fg(x) = √(x² − 2).
The square-root input must be nonnegative: x² − 2 ≥ 0.
This holds on x ≤ −√2 or x ≥ √2.
Answer: fg(x) = √(x² − 2), domain (−∞, −√2] ∪ [√2, ∞).
Check your understanding: For f(x) = 3x − 1 and g(x) = x + 4, compare fg(2) and gf(2).
Answer: fg(2) = 17 and gf(2) = 9.
Why: Doing g first gives f(6); doing f first gives g(5). Composition order changes the result.