Cambridge IGCSE Mathematics 0580 · Algebra and graphs

Functions

Function notation such as f(x)=3x−5, what the domain and range of a function are, how to form composite functions like fg(x), and how to find an inverse function f−1(x). Most of this is algebra you already know, written in a new and very precise notation.

E2.13Extended onlyFree lesson
What the syllabus says

E2.13 (Extended)

  • 1 Understand functions, domain and range and use function notation.
  • 2 Understand and find inverse functions f−1(x).
  • 3 Form composite functions as defined by gf(x)=g(f(x)).

Notes and examples

  • Examples include:
  • f(x)=3x−5
  • g(x)=3(x+4)5
  • h(x)=2x2+3.
  • e.g. f(x)=3x+2 and g(x)=(3x+5)2. Find fg(x). Give your answer as a fraction in its simplest form.
  • Candidates are not expected to find the domains and ranges of composite functions.
  • This topic may include mapping diagrams.

Quoted from the Cambridge IGCSE Mathematics 0580 syllabus for 2025 to 2027.

What a function is Extended

A function is a rule that takes an input and gives exactly one output. The rule "multiply by 3, then subtract 5" is a function, and we write it as

f(x)=3x−5

Read f(x) as "f of x". The letter f names the function and x is the input. The notation tells you what to do with any input:

  • f(4) means put x=4 into the rule: f(4)=3(4)−5=7.
  • f(−2)=3(−2)−5=−11.
  • f(a) is 3a−5: the input can be a letter, or even another expression.

Other letters work the same way. Cambridge often uses several functions in one question, such as g(x)=3(x+4)5 and h(x)=2x2+3. Put brackets round every input you substitute, especially a negative one: h(−2)=2(−2)2+3=2(4)+3=11, whereas −22 without brackets would wrongly give −4.

Solving f(x)=13 is not the same as finding f(13). f(x)=13 asks which input gives the output 13: 3x−5=13, so x=6.

Mapping diagrams Extended

A mapping from inputs to outputs
Input xOutput f(x)=3x−5
0−5
1−2
21
34

A mapping diagram shows a function as arrows from each input to its output; the table above lists the same pairs. Each input has exactly one arrow leaving it. That is what makes it a function. Two inputs may share an output (for x2, both 2 and −2 map to 4), but one input can never have two outputs.

Worked example 1 Extended

f(x)=3x−5, g(x)=3(x+4)5 and h(x)=2x2+3.
(a) Find g(6). (b) Find h(−2). (c) Solve f(x)=13.

  1. (a) g(6)=3(6+4)5=305=6.

  2. (b) h(−2)=2(−2)2+3=8+3=11.

  3. (c) 3x−5=13, so 3x=18 and x=6.

Answer: (a) 6 (b) 11 (c) x=6

Check yourself Extended

f(x)=7−2x. Find f(−3).

Answer it in the portal, where your answer is checked as you type →

Domain and range Extended

The domain of a function is the set of inputs it is allowed to take. The range is the set of outputs it produces from that domain.

Inputs that must be left out. You cannot divide by zero, so for 5x−2 the value x=2 is not in the domain. You cannot take the square root of a negative number, so for x+1 the domain is x⩾−1.

Finding a range.

  • If the domain is a short list, work out every output. For g(x)=4x−1 with domain {0,1,2,3}, the range is {−1,3,7,11}.
  • If the domain is an interval, think about the outputs at the ends. g(x)=4x−1 for 0⩽x⩽3 has range −1⩽g(x)⩽11, because a straight line goes steadily from one end to the other.
  • A square is never negative. For h(x)=2x2+3, the smallest value of 2x2 is 0, so the range is h(x)⩾3.

Write a range in terms of the output, h(x)⩾3 or y⩾3, not in terms of x. You are not expected to find the domain or range of a composite function.

Worked example 2 Extended

(a) f(x)=5x−2. Which value of x must be excluded from the domain?
(b) g(x)=4x−1 has domain {0,1,2,3}. Find its range.

  1. (a) The denominator is zero when x−2=0, so x=2 must be excluded.

  2. (b) g(0)=−1, g(1)=3, g(2)=7, g(3)=11.

  3. The range is {−1,3,7,11}.

Answer: (a) x=2 (b) {−1,3,7,11}

Composite functions Extended

A composite function applies one function and then another. gf(x) means g(f(x)): apply f first, then apply g to the result.

The function nearest to x acts first. In gf(x), f is next to x, so f goes first. This is the opposite of the order you read the letters in, and it is the commonest source of lost marks.

To find gf(x) as an expression, take the rule for g and replace every x in it by the whole expression f(x), in brackets. To find a value such as gf(3), it is usually quicker to work inside out with numbers: find f(3), then put that answer into g.

In general fg(x) and gf(x) are different. ff(x) means apply f twice.

Worked example 3 Extended

f(x)=2x+1 and g(x)=x2. Find (a) fg(x), (b) gf(x), (c) gf(3).

  1. (a) g acts first: fg(x)=f(x2)=2x2+1.

  2. (b) f acts first: gf(x)=g(2x+1)=(2x+1)2, which expands to 4x2+4x+1.

  3. (c) Inside out: f(3)=7, then g(7)=49. Check with (b): (2×3+1)2=49.

Answer: (a) 2x2+1 (b) (2x+1)2 (c) 49

Check yourself Extended

f(x)=x+3 and g(x)=5x−2. Find gf(x). Give your answer in its simplest form.

Answer it in the portal, where your answer is checked as you type →

Worked example 4 Extended

f(x)=4x−1 and g(x)=(2x+1)2. Find fg(x), giving your answer as a fraction in its simplest form.

  1. g acts first, so replace x in f by (2x+1)2: fg(x)=4(2x+1)2−1.

  2. Expand the bracket: (2x+1)2=4x2+4x+1, so the denominator is 4x2+4x+1−1=4x2+4x.

  3. Simplest form: 4x2+4x=4(x2+x), and the 4 cancels with the numerator.

  4. fg(x)=1x2+x.

Answer: 1x2+x

Inverse functions Extended

The inverse function f−1 undoes f. If f takes 4 to 7, then f−1 takes 7 back to 4. Applying a function and then its inverse returns you to where you started: f−1f(x)=x and ff−1(x)=x.

Method.

  1. Write y=f(x).
  2. Rearrange to make x the subject.
  3. Swap the letters: replace y by x, and you have f−1(x).

The rearranging in step 2 undoes the operations of f in reverse order, which is exactly what an inverse must do. For f(x)=3x−5 (multiply by 3, then subtract 5), the inverse adds 5 and then divides by 3: f−1(x)=x+53.

f−1(x) is not 1f(x). The −1 is a label for "inverse", not a power.

A function only has an inverse if each output comes from exactly one input. On the graph, y=f−1(x) is the reflection of y=f(x) in the line y=x.

xy−4−3−2−1123456−4−3−2−11234560ff inversey = x

f(x)=2x+1 and f−1(x)=x−12. Folding the page along y=x would place one line exactly on the other.

Worked example 5 Extended

g(x)=3(x+4)5. Find g−1(x).

  1. y=3(x+4)5.

  2. Multiply both sides by 5: 5y=3(x+4).

  3. Divide by 3: 5y3=x+4.

  4. Subtract 4: x=5y3−4.

  5. Swap letters: g−1(x)=5x3−4, which can also be written 5x−123.

  6. Check: g(1)=3×55=3, and g−1(3)=5−4=1.

Answer: 5x−123

Worked example 6 Extended

f(x)=3x+2. Find f−1(x).

  1. y=3x+2. Multiply both sides by (x+2): y(x+2)=3.

  2. Divide by y: x+2=3y.

  3. Subtract 2: x=3y−2.

  4. f−1(x)=3x−2, or 3−2xx.

Answer: 3x−2

Check yourself Extended

f(x)=x−74. Find f−1(x).

Answer it in the portal, where your answer is checked as you type →

Solving equations with functions Extended

Many questions end with an equation. Turn the function notation into ordinary algebra first, then solve as usual.

  • f(x)=k: write out the rule and set it equal to k.
  • ff(x)=k or fg(x)=k: find the composite expression first, then solve.
  • f−1(x)=k: there is a shortcut. If the inverse takes x to k, then f takes k to x, so x=f(k).
  • f−1f(a)=a for any input a in the domain, with no working needed.

Worked example 7 Extended

f(x)=2x−3. (a) Solve ff(x)=11. (b) Solve f−1(x)=4.

  1. (a) ff(x)=f(2x−3)=2(2x−3)−3=4x−9.

  2. 4x−9=11, so 4x=20 and x=5.

  3. (b) f−1(x)=4 means f takes 4 to x: x=f(4)=8−3=5.

Answer: (a) x=5 (b) x=5

Check yourself Extended

f(x)=2x+5. Find f−1(9).

Answer it in the portal, where your answer is checked as you type →

Key points

  • f(a) means substitute a for x in the rule. Bracket every input.

  • The domain is the set of allowed inputs; the range is the set of outputs. Leave out inputs that would divide by zero or root a negative number.

  • gf(x)=g(f(x)): the function next to x acts first.

  • To find f−1(x): write y=f(x), make x the subject, then replace y by x.

  • f−1(x) is not 1f(x), and f−1f(x)=x.

Where marks are lost Extended

  • Doing a composite in reading order. In fg(x), g acts first.

  • Treating fg(x) as a product f(x)×g(x).

  • Writing f−1(x)=1f(x).

  • Forgetting brackets when substituting. For f(x)=3x−5, f(2x+1)=3(2x+1)−5=6x−2, not 3×2x+1−5=6x−4.

  • Leaving a composite fraction unsimplified when the question says "in its simplest form".

  • Confusing f(x)=13 (solve for x) with f(13) (substitute 13).

Related IGCSE Mathematics 0580 lessons

All IGCSE Mathematics 0580 lessons →

An original lesson written to the Cambridge IGCSE Mathematics 0580 syllabus (2025 to 2027). The worked examples and questions are our own, not Cambridge questions. Back to every IGCSE Mathematics 0580 lesson.