Functions: domain, range and composition

Functions: domain, range and composition

Spec 1.2 · Edexcel International A Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A function gives exactly one output for each input in its domain.
  • The domain is the set of inputs; the range is the set of outputs.
  • Many-one mappings are functions; one-to-many rules are not.
  • fg(x)=f(g(x))(x)=f(g(x)): do gg first. In general fg≠gf\mathrm{fg}\neq\mathrm{gf}.
  • For fg\mathrm{fg} to exist, the range of gg must lie within the domain of ff.

Functions and mappings

A function gives exactly one output for each input in its domain.

It is written f:x↦x2−4x+7f:x\mapsto x^2-4x+7 or f(x)=x2−4x+7f(x)=x^2-4x+7. The inputs form the domain; the set of outputs is the range.

A function is one-one if each output comes from exactly one input, and many-one if two or more inputs give the same output. A one-to-many rule is not a function.

One-one

  • A function
  • Each output from exactly one input

Many-one

  • A function
  • Some outputs share inputs

One-to-many

  • Not a function
  • One input, several outputs
−11234524681012xy(1, 4)(3, 4)(2, 3)y = x² − 4x + 7
f(x) = x² − 4x + 7 is many-one: f(1) = f(3) = 4.

Which type of mapping is NOT a function?

Finding domain and range

The domain is where the rule works; the range is found by completing the square or sketching.

The domain may be stated, or you find the largest set where the rule works: avoid division by zero, and square roots of negatives. For x−2+1\sqrt{x-2}+1 the domain is x⩾2x\geqslant2.

For the range, use completing the square, a sketch, or the extremes of the domain. A restricted domain can turn a many-one function into a one-one function.

−11234562468101214161820xy(2, 3)(4, 7)f(x) = x² − 4x + 7
f(x) = x² − 4x + 7 = (x − 2)² + 3: the minimum is (2, 3), so the range is f(x) ≥ 3; for x ≥ 4 it starts at f(4) = 7
  • Domainallowed inputs (xx)
  • Rangeresulting outputs (f(x)f(x))

Worked example

Find the range of f(x)=x2−4x+7f(x)=x^2-4x+7 for all real xx, and for x⩾4x\geqslant4.

What is the domain of f(x)=x−2+1f(x)=\sqrt{x-2}+1?

Composite functions

fg(x) means do g first, then f; the order matters.

The composite function fg(x)=f(g(x))\mathrm{fg}(x)=f(g(x)) applies gg to xx first, then ff to the result.

In general fg≠gf\mathrm{fg}\neq\mathrm{gf}. The function nearest to xx acts first.

  1. 1

    Input x = 1

    start here

  2. 2

    Apply f first

    f(1) = 2(1) + 3 = 5

  3. 3

    Apply g to the result

    g(5) = 25 − 1 = 24

Evaluating gf(1) with f(x) = 2x + 3 and g(x) = x² − 1.

Worked example

With f(x)=2x+3f(x)=2x+3 and g(x)=x2−1g(x)=x^2-1, find fg(x)\mathrm{fg}(x) and gf(x)\mathrm{gf}(x).

With f(x)=2x+3f(x)=2x+3 and g(x)=x2−1g(x)=x^2-1, what is gf(1)\mathrm{gf}(1)?

Domain and range of composites

fg is defined only when the range of g lies within the domain of f.

With f(x)=x−2+1f(x)=\sqrt{x-2}+1 (x⩾2x\geqslant2) and g(x)=4x−1g(x)=\frac{4}{x-1} we need g(x)⩾2g(x)\geqslant2, so 4x−1⩾2\frac{4}{x-1}\geqslant2, giving 1<x⩽31<x\leqslant3.

Also gf(x)=4x−2\mathrm{gf}(x)=\frac{4}{\sqrt{x-2}} must exclude x=2x=2, so its domain is x>2x>2.

−3−2−1123456−6−4−22468xyx = 1y = 2(3, 2)y = 4/(x − 1)
g(x) = 4/(x − 1) is at least 2 only for 1 < x ≤ 3.

For fg\mathrm{fg} to exist, what must be true?

Try an exam question

The functions f and g are defined by f(x)=x2−6x+11f(x)=x^2-6x+11, x∈Rx\in\mathbb{R}, and g(x)=2x−1g(x)=2x-1, x∈Rx\in\mathbb{R}. (a) Find the range of f. (b) Find fg(x)\mathrm{fg}(x), giving your answer in the form ax2+bx+cax^2+bx+c.

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which statement about ff is correct?

1 mark, marked against the mark scheme

Revision notes