QED
Functions · step 3 of 13

Composition g∘f and its properties

(g∘f)(x) = g(f(x)) — f runs first, despite g being written first. Composition is associative but not commutative, and it interacts predictably with the other properties: if f and g are both injective so is g∘f, and likewise for surjective. The converses are one-sided and are the standard exam trap: g∘f injective forces f injective, but says nothing about g.

Unlimited questions · marked criterion by criterion · no card needed

Method: how to approach it

The order below is what examiners expect to see, and each step carries its own marks.

  1. Check the types matchg∘f needs the codomain of f to be contained in the domain of g. Otherwise the composition is undefined.
  2. Substitute inner into outerWrite g(f(x)) and simplify. Doing it the other way computes f∘g, a different function.
  3. Transfer properties forwardsInjective ∘ injective = injective; surjective ∘ surjective = surjective. Prove by chaining the definitions.
  4. Transfer backwards carefullyIf g∘f is injective then f is injective. If g∘f is surjective then g is surjective. The other halves can fail.

Worked example

For f(x) = x + 1 and g(x) = x², compute g∘f and f∘g, and evaluate both at x = 2.

  1. (g∘f)(x) = g(f(x)) = g(x + 1) = (x + 1)².
  2. (f∘g)(x) = f(g(x)) = f(x²) = x² + 1.
  3. At x = 2: (g∘f)(2) = 3² = 9.
  4. (f∘g)(2) = 4 + 1 = 5.

Answer. g∘f = (x+1)² and f∘g = x² + 1 — different functions, giving 9 and 5 at x = 2.

Where marks get dropped

These are the specific errors that cost credit on composition g∘f and its properties questions — QED's rubric penalises each of them separately.

Practise this until it is automatic

Unlimited fresh questions

QED generates new composition g∘f and its properties problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.

Marked like an examiner

Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.

Answer in real notation

A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.

Saved to your library

Every question you generate is kept and re-takeable as a timed exam, and your Functions mastery is tracked so you know when this is exam-ready.

Composition g∘f and its properties — frequently asked questions

Is composition associative?

Yes: h∘(g∘f) = (h∘g)∘f, since both send x to h(g(f(x))). This is why iterated compositions need no brackets.

When is g∘f = f∘g?

Only in special cases — for instance when both are powers of the same function, or when one is the identity. Commutativity is the exception.

What does g∘f = id tell me?

That f is injective and g is surjective. Both directions (g∘f = id and f∘g = id) together mean f and g are mutually inverse bijections.

The rest of Functions

Injective, surjective, bijective, composition, inverse. Each subtopic below has its own method, worked example and mark-losing traps.

Ready to make composition g∘f and its properties exam-proof?

Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.

Start practising free →