QED
Functions · step 1 of 13

Domain, codomain, image & preimage

A function f : A → B carries three pieces of data: the domain A, the codomain B, and the rule. The image f[A] is what is actually hit, and it is generally a proper subset of the codomain — which is exactly why surjectivity is a real condition. The preimage f⁻¹[S] = {a ∈ A : f(a) ∈ S} always makes sense, even when f has no inverse function.

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. Read off domain and codomain from the declarationThey are part of the function, not derived from the formula. f : ℝ → ℝ and f : ℝ → [0,∞) with f(x) = x² are different functions.
  2. Compute the image by sweeping the domainf[S] = {f(a) : a ∈ S}. For finite sets, apply f to each element and collect the distinct outputs.
  3. Compute the preimage by solvingf⁻¹[T] collects every input landing in T. Solve f(a) ∈ T; the answer may be empty, a single point, or many points.
  4. Keep preimage notation separate from inversef⁻¹[T] is a set and always defined; f⁻¹(b) as a single element requires f to be bijective.

Worked example

For f : ℝ → ℝ, f(x) = x², find the image of ℝ, f[{−1, 0, 2}] and f⁻¹[{4, 9}].

  1. Image: squares of reals are exactly the non-negative reals, so f[ℝ] = [0, ∞).
  2. f[{−1,0,2}] = {1, 0, 4} = {0, 1, 4}.
  3. f⁻¹[{4,9}] solves x² = 4 or x² = 9.
  4. x = ±2 or x = ±3.

Answer. f[ℝ] = [0,∞) — a proper subset of the codomain ℝ; f[{−1,0,2}] = {0,1,4}; f⁻¹[{4,9}] = {−3,−2,2,3}.

Where marks get dropped

These are the specific errors that cost credit on domain, codomain, image & preimage questions — QED's rubric penalises each of them separately.

Practise this until it is automatic

Unlimited fresh questions

QED generates new domain, codomain, image & preimage 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.

Domain, codomain, image & preimage — frequently asked questions

Can a preimage be empty?

Yes. f⁻¹[{−1}] = ∅ for f(x) = x², because nothing squares to a negative number. Empty preimages are exactly the elements of the codomain outside the image.

Does f⁻¹ exist for non-invertible f?

The preimage operator on SETS always exists. The inverse FUNCTION exists only when f is bijective, and the shared notation is unfortunate.

Why does the codomain matter?

Because surjectivity is defined relative to it. Restricting the codomain to the image makes any function surjective, which is why the codomain must be declared.

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 domain, codomain, image & preimage 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 →