IGCSE Maths · Area 2 · Algebra and Graphs

Functions

Functions is Extended only, and it is the language the rest of the algebra paper is written in. You learn to read f(x) as a rule rather than a multiplication, to say which inputs a function accepts and which outputs it produces, and to build a new function by applying one rule after another. Then you reverse a rule to find f−1(x) and reflect its graph in the line y=x. Marks are lost by reversing the order in a composite function, by treating f−1(x) as 1f(x), and by quoting the domain of a function when the question asked for its range.

Not started

Syllabus coverage

  • Extended only: understand functions, domain and range and use function notation
  • Extended only: examples include f(x)=3x−5, g(x)=3(x+4)5 and h(x)=2x2+3
  • Extended only: understand and find inverse functions f−1(x)
  • Extended only: form composite functions as defined by gf(x)=g(f(x))
  • Extended only: candidates are not expected to find the domains and ranges of composite functions
  • Extended only: this topic may include mapping diagrams

Part of the IGCSE Maths syllabus 0580.

A function as a machine: one input, one outputinput xf(x) = 3x + 2multiply by 3, then add 2every input has exactly one outputoutput f(x)f(4) = 3 × 4 + 2 = 14 · f(-1) = 3 × (-1) + 2 = -1The inverse machine undoes the steps in reverse: subtract 2, then divide by 3.
A function drawn as a machine: every input goes through the same rule and comes out as exactly one output. The inverse machine undoes the steps in reverse order.

A function is a rule with exactly one output for each input

A function is a rule that turns an input into exactly one output. Write the input as x and the rule as f(x), read as 'f of x'. So f(x)=3x−5 means: take the input, multiply it by 3, then subtract 5. Put in 4 and you get f(4)=3(4)−5=7.

f(x) is not f multiplied by x. The letter f is the name of the rule and the brackets hold the input, so a function can be named with any letter. The syllabus uses g(x)=3(x+4)5 and h(x)=2x2+3 as well as f(x)=3x−5, and the letter only tells you which rule to use when a question gives you two or three of them.

The words 'exactly one' are the whole of the definition. A rule that hands back two answers for a single input is not a function. That is why 9 is defined as 3 and not as both 3 and −3, and why the square root button on a calculator gives one answer.

A mapping diagram draws a function as a machine: inputs on the left, the rule in the middle, outputs on the right. Cambridge mentions mapping diagrams for this topic, and they are the quickest way to see what a rule does and to spot that two different inputs are allowed to share an output.

  • f(4) means substitute 4 for every x in the rule
  • Each input gives exactly one output, but two different inputs may share an output
  • Put an expression in the brackets just as you would put a number: for f(x)=3x−5, f(a)=3a−5
Substitute the whole input, inside brackets. For f(x)=3x−5, f(x+1)=3(x+1)−5=3x−2. Dropping the bracket gives 3x+1−5, which is a different function.

Domain and range

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 those inputs. In 0580 you work with real numbers, and the domain is all real numbers unless the rule itself forbids some of them.

Two things forbid an input. Division forbids a zero denominator, so f(x)=1x has domain x≠0. A square root forbids a negative number inside it, so f(x)=x has domain x≥0. Every polynomial, and every other rule on this course, accepts every real number.

The range comes from the shape of the graph, not from the algebra. f(x)=x2 has domain 'all real numbers' but its range is f(x)≥0, because a square is never negative. f(x)=3x−5 produces every real number, so both its domain and its range are all real numbers.

A question can also restrict the domain on purpose. If you are told to use f(x)=3x−5 for 0≤x≤4, the domain is the interval 0≤x≤4, and the range is only the outputs that come from those inputs.

FunctionDomainRange
f(x)=3x−5all real numbersall real numbers
f(x)=x2all real numbersf(x)≥0
f(x)=1xx≠0f(x)≠0
f(x)=xx≥0f(x)≥0
f(x)=3x−5 for 0≤x≤40≤x≤4−5≤f(x)≤7
A range is a statement about outputs, so write it in terms of f(x) or y. 'The range is f(x)≥0' is right; 'the range is x≥0' describes a domain, not a range.

One-one functions, and why they matter

A function is one-one when no two different inputs give the same output. f(x)=3x−5 is one-one: different inputs always produce different outputs. f(x)=x2 is not one-one, because f(3)=f(−3)=9: two inputs, one output.

The horizontal line test reads this off a graph. If any horizontal line meets the curve more than once, the function is not one-one. A parabola fails the test; a straight line with a non-zero gradient passes it.

One-one functions matter because reversing a rule has to give a single answer. Undoing f(x)=3x−5 gives one value for each output, so the reverse is a function. Undoing f(x)=x2 would have to give two values for every positive output, and a rule with two outputs is not a function at all.

A restricted domain can rescue a function that fails the test. f(x)=x2 for x≥0 is one-one, because the negative inputs have been removed, and this version does have an inverse function.

  • One-one: different inputs always give different outputs
  • Horizontal line test: a second crossing means the function is not one-one
  • Only one-one functions have an inverse function, unless the domain is restricted first
This is the reason some functions have no inverse. It is not a rule to memorise for its own sake: the inverse has to be a function, and it can only be one if the original was one-one.

Composite functions: fg(x) means f(g(x))

A composite function is one rule applied after another. The notation fg(x) means f(g(x)): work out g first, then feed that answer into f. Cambridge writes the definition as gf(x)=g(f(x)), and the order is the whole point of the topic.

The function nearest the x acts first. In gf(x) you apply f and then g; in fg(x) you apply g and then f. The two are usually different, and there is no reason to expect them to match. With f(x)=2x+3 and g(x)=x2−1: fg(x)=f(x2−1)=2(x2−1)+3=2x2+1, while gf(x)=g(2x+3)=(2x+3)2−1=4x2+12x+8.

There are two ways to answer a composite question. For a number, work out the inner function first and substitute the result: fg(3) with f(x)=3x+2 and g(x)=x2−1 is f(8)=3(8)+2=26. For an expression, replace every x in the outer rule with the whole of the inner rule, keeping the bracket, and then simplify.

Simplify right to the end. The composite of a quadratic and a linear rule is usually a quadratic, and leaving the answer as (2x+3)2−1 keeps the method marks but loses the accuracy mark.

  • fg(x)=f(g(x)): apply g first, then f
  • gf(x)=g(f(x)): apply f first, then g
  • For a numerical answer, evaluate the inner function first and substitute that number into the outer one
Candidates are not expected to find the domains and ranges of composite functions, so you will not be asked for them. What you will be asked for is the order, and that comes straight from which letter is written next to the x.

Inverse functions

The inverse function f−1(x) undoes what f does. If f(4)=7 then f−1(7)=4. The notation f−1 does not mean 1f: f−1(x) is the reverse rule, not the reciprocal of the function.

The method has four steps. Write the function with y as the output, swap x and y, rearrange to make y the subject, then write the result as f−1(x). For f(x)=3x−4: write y=3x−4, swap to x=3y−4, rearrange to 3y=x+4, and finish with f−1(x)=x+43.

The swap is what does the work. Writing x=f(y) and solving for y asks the exact question the inverse answers: which input to f produces the output x? Rearranging without swapping gives you the original function back.

Check your answer by composing. f(f−1(x)) should return x. With f(x)=3x−4 and f−1(x)=x+43, the composition is 3×x+43−4=x+4−4=x. If it does not come back to x, one of the steps has gone wrong.

StepWhat to doFor f(x)=5x−2
1Write the rule with y as the outputy=5x−2
2Swap x and yx=5y−2
3Rearrange to make y the subject5y=x+2, so y=x+25
4Write it in the inverse notationf−1(x)=x+25
5Check with one easy valuef(2)=8 and f−1(8)=2
Read the notation carefully. For f(x)=5x−2, the inverse is f−1(x)=x+25, while 1f(x) is 15x−2. They are completely different functions and only one of them undoes f.

The graph of an inverse function

The graph of y=f−1(x) is the graph of y=f(x) reflected in the line y=x. Reflection in y=x swaps the coordinates of every point, so a point (a,b) on the graph of f becomes the point (b,a) on the graph of f−1.

That is the algebra of the previous block drawn as a picture. If f(4)=7 then (4,7) lies on the graph of f, and (7,4) lies on the graph of f−1. Swapping x and y in the equation is the same thing as swapping the coordinates of every point.

Any point where a curve crosses the line y=x stays exactly where it is, because swapping (a,a) returns (a,a). So a function and its inverse always meet each other on the line y=x, if they meet at all.

The inverse of the inverse is the original function, so (f−1)−1(x)=f(x). A function that is its own inverse has a graph symmetric about y=x; f(x)=6−x is one, because f(f(x))=6−(6−x)=x.

  • Reflection in y=x takes the point (a,b) to (b,a)
  • The domain of f−1 is the range of f, and the range of f−1 is the domain of f
  • A function and its inverse cross the line y=x at the same points
Only one-one functions have an inverse function, and the reflection explains why. Reflecting a curve that fails the horizontal line test produces a curve that fails the vertical line test, so it is not the graph of a function at all.

Key terms you must be able to define

Function
A rule that turns each input into exactly one output.
Function notation
Writing a function as f(x), read as 'f of x'. The letter names the rule and the brackets hold the input.
Input
The value put into a function, usually written x.
Output
The value a function produces, written f(x) or y.
Domain
The set of inputs a function is allowed to take. Division forbids a zero denominator and a square root forbids a negative input.
Range
The set of outputs a function produces from its domain.
Mapping diagram
A function drawn as a machine: inputs on the left, the rule in the middle, outputs on the right.
One-one function
A function in which no two different inputs give the same output. Only one-one functions have inverse functions.
Horizontal line test
If any horizontal line meets the graph of a function more than once, the function is not one-one.
Vertical line test
A curve is the graph of a function only if no vertical line meets it more than once.
Composite function
One function applied after another, written fg(x) or gf(x).
fg(x)
The composite function meaning f(g(x)): apply g first, then apply f to the result.
gf(x)
The composite function meaning g(f(x)): apply f first, then apply g to the result.
Inverse function
The function f−1(x) that undoes f, found by writing y=f(x), swapping x and y and rearranging. It is not the reciprocal of f.
Self-inverse function
A function that is its own inverse, so f(f(x))=x. Its graph is symmetric about the line y=x.
Reflection in y=x
The transformation that swaps the coordinates of every point, sending (a,b) to (b,a). The graph of f−1 is the graph of f reflected in this line.

In context

Cambridge sets 0580 in real situations - a recipe, a bank statement, a map, a garden, a graph of a car's journey. These show how the mathematics appears in a question, then you write your own working for the numbers you are given.

Reading function notation

For f(x)=3x−5: f(4)=12−5=7, f(−2)=−6−5=−11 and f(0)=−5. With a letter input, f(a)=3a−5. Every one of these is the same rule with a different value in the bracket.

Domain and range from the rule

For f(x)=1x−2 the denominator must not be zero, so x≠2 and the domain is every other real number. The output is never 0, because 1 divided by anything is never 0, so the range is f(x)≠0.

Composite functions both ways

With f(x)=2x+3 and g(x)=x2−1: fg(x)=f(x2−1)=2(x2−1)+3=2x2+1, and gf(x)=g(2x+3)=(2x+3)2−1=4x2+12x+8. They are different, and fg(3)=2(9)+1=19 is the same as working out g(3)=8 and then f(8)=19.

Finding an inverse function

For f(x)=3x−4: write y=3x−4, swap to x=3y−4, rearrange to 3y=x+4, so f−1(x)=x+43. Check it: f(5)=11, and f−1(11)=153=5. The inverse has returned the original input.

An inverse with a fraction in the rule

For f(x)=x+52: write y=x+52, swap to x=y+52, multiply by 2 to get 2x=y+5, so y=2x−5 and f−1(x)=2x−5. Check: f(3)=4 and f−1(4)=3.

Flashcards

Click a card to flip it. Mark honestly — the tracker uses this.

Q1What does f(4) mean?
Substitute 4 for every x in the rule. For f(x)=3x−5, f(4)=7.
Q2What is the domain of a function?
The set of inputs the function is allowed to take.
Q3What is the range of a function?
The set of outputs the function produces from its domain.
Q4What is the domain of f(x)=1x?
x≠0. A denominator must never be zero, so 0 is the one input that is not allowed.
Q5What is the domain of f(x)=x?
x≥0. There is no real number whose square is negative, so negative inputs are not allowed.
Q6What is the range of f(x)=x2?
f(x)≥0. The domain is all real numbers, but a square is never negative.
Q7What does one-one mean?
No two different inputs give the same output. Only one-one functions have inverse functions.
Q8How do you test from a graph whether a function is one-one?
The horizontal line test: if any horizontal line meets the graph more than once, the function is not one-one.
Q9What does fg(x) mean?
f(g(x)): apply g first, then apply f to the result.
Q10What does gf(x) mean?
g(f(x)): apply f first, then apply g to the result.
Q11How do you find an inverse function?
Write y=f(x), swap x and y, rearrange to make y the subject, then write f−1(x) in place of y.
Q12Is f−1(x) the same as 1f(x)?
No. f−1 is the reverse rule that undoes f; 1f(x) is the reciprocal of f.
Q13How is the graph of y=f−1(x) related to the graph of y=f(x)?
It is the reflection in the line y=x, so a point (a,b) on the graph of f becomes (b,a) on the graph of f−1.
Q14What is a self-inverse function?
A function that undoes itself, so f(f(x))=x. Its graph is symmetric about the line y=x.
Q15The point (3,8) is on the graph of y=f(x). Which point is on the graph of y=f−1(x)?
(8,3). Reflection in y=x swaps the coordinates over.
0 of 15 marked as known

Exam-style questions

7 questions, 17 marks. Write your answer, then reveal the mark scheme and tick each point you actually made. Answering honestly here is what makes the rest of the site useful.

Write downAO11 mark
f(x)=5x−3. Write down the value of f(4).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • B1f(4)=5(4)−3=17not checked yet
Examiner tip: Substitute 4 for x and do the arithmetic in the order the rule gives it: multiply first, then subtract. 'Write down' means the answer alone is enough.
CalculateAO22 marks
f(x)=3x+2 and g(x)=x2−1. Calculate the value of fg(3).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • A1f(8)=3(8)+2=26not checked yet
Examiner tip: fg(3) means f(g(3)), so g acts first. Starting with f(3)=11 reverses the order and gives the value of gf(3) instead.
Work outAO13 marks
f(x)=4x−1 and g(x)=2x+5. Work out fg(x) in its simplest form.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A1fg(x)=8x+19not checked yet
Examiner tip: Keep the bracket round the whole of 2x+5 before expanding. Dropping it and writing 8x+5−1 loses the method mark as well as the answer.
Work outAO13 marks
f(x)=5x−2. Work out f−1(x).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A1f−1(x)=x+25not checked yet
Examiner tip: Show the swap. The two method marks are for writing down y=f(x) and exchanging x and y, and for the rearrangement, so an answer with no working can only ever score the final mark.
Work outAO24 marks
f(x)=x+34 and g(x)=(2x−1)2. Work out fg(x) in its simplest form.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • M1
  • A1fg(x)=x2−x+1not checked yet
Examiner tip: The whole of (2x−1)2 is the input to f, so it goes into the numerator of the fraction and the +3 is added on top of it, not beside it. Expand the bracket before you divide by 4.
ExplainAO12 marks
f(x)=x2. Explain why f has no inverse function.

Mark scheme — tick each point you actually made

  • B1
  • B1
Examiner tip: This is a written answer, so give both halves: the fact that two inputs share an output, and the consequence that the reverse rule would not be a function. A single example on its own is only half the answer.
Write downAO12 marks
The graph of y=f(x) passes through the point (3,8). The graph of y=f−1(x) passes through the point (8,k). Write down the value of k.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • B1
  • B1k=3not checked yet
Examiner tip: The reflection swaps the two coordinates, so the x-coordinate 8 of the new point is the old y-coordinate and the new y-coordinate is the old x. No calculation is needed.

Exam technique for this topic

  • Read the order in a composite question before writing anything. fg(x) applies g first and gf(x) applies f first, and the two answers are different, so swapping them loses every mark on the question.
  • Keep the bracket when you substitute an expression. With f(x)=3x−5, f(x+1)=3(x+1)−5=3x−2. Writing 3x+1−5 multiplies only the x by 3 and turns a correct method into a wrong answer.
  • Show the swap in an inverse question. A mark scheme gives a method mark for writing y=f(x) and exchanging x and y, and another for making y the subject. A candidate who writes down a guessed inverse has nothing to show for the method marks.
  • Check an inverse with one easy value in both directions. If f(2)=8 then f−1(8) must be 2, and it takes ten seconds to test. It catches almost every rearrangement slip before the examiner does.
  • Answer a domain or range question in the right letter. The domain is about x and the range is about f(x), and quoting the domain when the question asked for the range is a common way to lose an easy mark.

Why students lose marks here

A student wroteWith f(x)=3x−5, f(x+1)=3x+1−5=3x−4.
Why it loses marksThe bracket was dropped. The whole input is multiplied by 3, so 3(x+1) is 3x+3, not 3x+1.
The answer that scoresf(x+1)=3(x+1)−5=3x+3−5=3x−2.
A student wroteWith f(x)=3x−5, the inverse is f−1(x)=13x−5.
Why it loses marksThe −1 in f−1(x) is notation for the inverse function, not a power of the function. 13x−5 is 1f(x), the reciprocal, which does not undo f.
The answer that scoresWrite y=3x−5, swap to x=3y−5, rearrange to 3y=x+5, so f−1(x)=x+53.
A student wroteWith f(x)=2x+3 and g(x)=x2−1, fg(x)=(2x+3)2−1.
Why it loses marksThe order was reversed. fg(x) means f(g(x)), so g is applied first. The expression given is gf(x), which is a different function.
The answer that scoresfg(x)=f(x2−1)=2(x2−1)+3=2x2+1.
A student wroteThe range of f(x)=x2 is all real numbers.
Why it loses marksThat is the domain. A square can never be negative, so the outputs stop at 0 and the two words have been swapped.
The answer that scoresThe domain of f(x)=x2 is all real numbers and the range is f(x)≥0.