Skip to content

← Grade 10

Function

Unit 1 · CDC textbook pages 1–13

Hide the stories, facts, photos, activities and interactives, for revising before an exam
In this unit 7 sections
  1. 1.1 Introduction
  2. 1.2 Composite function
  3. Exercise 1.1
  4. 1.3 Inverse function
  5. Exercise 1.2
  6. Project work
  7. How the SEE asks it

Your SEE marksheet shows a grade such as A or B+, not your marks. Two rules made that grade. The first turns your marks into a percentage: on a paper marked out of 75, 60 marks is 60 ÷ 75 × 100 = 80%. The second turns the percentage into a grade: from 80% up to 90% is an A. A school’s spreadsheet can do both steps in one formula.

So here is this unit’s question: when can two rules be joined into one, and when can a rule be run backwards? Could anyone work out your exact marks from your A?

marks57606366× 100 ÷ 75percent76%80%84%88%grade tablegradeB+Aone rule
Figure 1.1 Four papers marked out of 75, their percentages and their grades. Each step gives every paper exactly one answer, and the two steps together make one rule. Three different marks end at the same A.

Two ideas will answer it: the composite function (1.2), one rule made of two, and the inverse function (1.3), a rule run backwards. The answer is at the end of 1.3.

1.1 Introduction

A function is a rule that gives each member (element) of a first set exactly one member of a second set. A school’s list of students and their roll numbers is a function: every student has one roll number. The list of students and their friends is not: a student can have many friends, or none in the class.

You met functions in Grade 9. Here is what this unit uses, in one place, for a function f:A → B.

Idea What it means Example: f = {(1, 4), (2, 5), (3, 5)} from A = {1, 2, 3} to B = {4, 5, 6}
Domain the first set, the inputs A = {1, 2, 3}
Codomain the second set, where the outputs must lie B = {4, 5, 6}
Image and pre-image f(1) = 4: 4 is the image of 1, and 1 the pre-image of 4 f(2) = 5
Range the images that really occur {4, 5}
One-to-one different inputs always give different images no: f(2) = f(3) = 5
Many-to-one two or more inputs share an image yes
Onto every member of the codomain is an image (range = codomain) no: nothing goes to 6
Into some member of the codomain is left out yes

A function that is both one-to-one and onto pairs the two sets off exactly, one with one, like the seats of a full bus and its passengers. That kind of function is the one that can be run backwards (1.3). The function I(x) = x, which gives every member back unchanged, is the identity function.

A function is often given by a formula. With f(x) = 2x + 1, the image of 3 is f(3) = 2 × 3 + 1 = 7: put the number in place of x everywhere.

A painted portrait of Leonhard Euler, a man in a dark coat and a cloth cap tied round his head
Figure 1.2 Leonhard Euler, whose f(x) is in every maths book since. Photo: Jakob Emanuel Handmann, Public domain

Which of these sets of ordered pairs is not a function from {1, 2, 3} to {5, 6, 7}?

Pick an answer to see why.

f = {(1, 4), (2, 6), (3, 8)} is a function from {1, 2, 3} to {4, 6, 8, 10}. What kind of function is it?

Pick an answer to see why.

1.2 Composite function

A1234f(x)B2345g(x)C3456g∘f(x)
Figure 1.3 f takes each member of A into B, and g takes it on into C. Following both arrows is a single function from A to C, the composite g ∘ f.

When two functions are done one after the other, the output of the first becomes the input of the second. If f:A → B and g:B → C, then following f and then g is a function from A to C. It is called the composite function of f and g, and written g ∘ f:

g∘f(x)=g(f(x)) g \circ f(x) = g(f(x))

It is read “g of f of x” or “the composite of g and f”, and is also written (g ∘ f)(x), gf(x) or just gf. In the activity, g ∘ f = {(1, 3), (2, 4), (3, 5), (4, 6)}.

When does a composite exist? Every output of the first function must be something the second function can take in: the range of f must lie inside the domain of g. In the activity every image under f (2, 3, 4, 5) is in B, the domain of g, so g ∘ f is defined. If f sent 4 to 7, and g had no image for 7, then g ∘ f(4) would not exist.

Try it

Two machines in a row

Pick a number to put in, and watch it go through one machine and then the other. Then press Swap the order: does the number that comes out change?

213inoutf(x) = 3xg(x) = 2x + 16g∘f
Machines
f first: g∘f(x) = 6x + 1
g∘f(2) = 13
g first: f∘g(x) = 6x + 3
f∘g(2) = 15

f first: −4 → −12 → −23, so g∘f(−4) = −23. The other order gives f∘g(−4) = −21: a different answer.

f first: −3 → −9 → −17, so g∘f(−3) = −17. The other order gives f∘g(−3) = −15: a different answer.

f first: −2 → −6 → −11, so g∘f(−2) = −11. The other order gives f∘g(−2) = −9: a different answer.

f first: −1 → −3 → −5, so g∘f(−1) = −5. The other order gives f∘g(−1) = −3: a different answer.

f first: 0 → 0 → 1, so g∘f(0) = 1. The other order gives f∘g(0) = 3: a different answer.

f first: 1 → 3 → 7, so g∘f(1) = 7. The other order gives f∘g(1) = 9: a different answer.

f first: 2 → 6 → 13, so g∘f(2) = 13. The other order gives f∘g(2) = 15: a different answer.

f first: 3 → 9 → 19, so g∘f(3) = 19. The other order gives f∘g(3) = 21: a different answer.

f first: 4 → 12 → 25, so g∘f(4) = 25. The other order gives f∘g(4) = 27: a different answer.

g first: −4 → −7 → −21, so f∘g(−4) = −21. The other order gives g∘f(−4) = −23: a different answer.

g first: −3 → −5 → −15, so f∘g(−3) = −15. The other order gives g∘f(−3) = −17: a different answer.

g first: −2 → −3 → −9, so f∘g(−2) = −9. The other order gives g∘f(−2) = −11: a different answer.

g first: −1 → −1 → −3, so f∘g(−1) = −3. The other order gives g∘f(−1) = −5: a different answer.

g first: 0 → 1 → 3, so f∘g(0) = 3. The other order gives g∘f(0) = 1: a different answer.

g first: 1 → 3 → 9, so f∘g(1) = 9. The other order gives g∘f(1) = 7: a different answer.

g first: 2 → 5 → 15, so f∘g(2) = 15. The other order gives g∘f(2) = 13: a different answer.

g first: 3 → 7 → 21, so f∘g(3) = 21. The other order gives g∘f(3) = 19: a different answer.

g first: 4 → 9 → 27, so f∘g(4) = 27. The other order gives g∘f(4) = 25: a different answer.

f first: −4 → 16 → 19, so g∘f(−4) = 19. The other order gives f∘g(−4) = 1: a different answer.

f first: −3 → 9 → 12, so g∘f(−3) = 12. The other order gives f∘g(−3) = 0: a different answer.

f first: −2 → 4 → 7, so g∘f(−2) = 7. The other order gives f∘g(−2) = 1: a different answer.

f first: −1 → 1 → 4, so g∘f(−1) = 4. The other order gives f∘g(−1) = 4: the same, just for this input. Try another.

f first: 0 → 0 → 3, so g∘f(0) = 3. The other order gives f∘g(0) = 9: a different answer.

f first: 1 → 1 → 4, so g∘f(1) = 4. The other order gives f∘g(1) = 16: a different answer.

f first: 2 → 4 → 7, so g∘f(2) = 7. The other order gives f∘g(2) = 25: a different answer.

f first: 3 → 9 → 12, so g∘f(3) = 12. The other order gives f∘g(3) = 36: a different answer.

f first: 4 → 16 → 19, so g∘f(4) = 19. The other order gives f∘g(4) = 49: a different answer.

g first: −4 → −1 → 1, so f∘g(−4) = 1. The other order gives g∘f(−4) = 19: a different answer.

g first: −3 → 0 → 0, so f∘g(−3) = 0. The other order gives g∘f(−3) = 12: a different answer.

g first: −2 → 1 → 1, so f∘g(−2) = 1. The other order gives g∘f(−2) = 7: a different answer.

g first: −1 → 2 → 4, so f∘g(−1) = 4. The other order gives g∘f(−1) = 4: the same, just for this input. Try another.

g first: 0 → 3 → 9, so f∘g(0) = 9. The other order gives g∘f(0) = 3: a different answer.

g first: 1 → 4 → 16, so f∘g(1) = 16. The other order gives g∘f(1) = 4: a different answer.

g first: 2 → 5 → 25, so f∘g(2) = 25. The other order gives g∘f(2) = 7: a different answer.

g first: 3 → 6 → 36, so f∘g(3) = 36. The other order gives g∘f(3) = 12: a different answer.

g first: 4 → 7 → 49, so f∘g(4) = 49. The other order gives g∘f(4) = 19: a different answer.

The machines show why the order matters. With f(x) = 3x and g(x) = 2x + 1, f first gives g(3x) = 6x + 1, but g first gives f(2x + 1) = 6x + 3. For most pairs of functions, g ∘ f and f ∘ g are different functions.

f = {(1, 4), (2, 6), (3, 5)} and g = {(4, 0), (5, 8), (6, 2)}. What is g ∘ f(2)?

Pick an answer to see why.

Worked examples

Exercise 1.1

Question 1

A. Which of these statements about composite functions is incorrect?

Pick an answer to see why.

AgBfC?
Figure 1.6 Exercise 1.1, 1B: g from A to B, then f from B to C.

B. In the mapping diagram Figure 1.6, g maps A to B and f maps B to C. How is the function from A to C written?

Pick an answer to see why.

C. If f = {(3, −1), (2, 0), (1, 1)} and g = {(−1, 4), (0, 5), (1, 6)}, what is gf?

Pick an answer to see why.

D. If f(x) = 3x − 1 and g(x) = x + 1, what is fg(x)?

Pick an answer to see why.

E. If f(x) = 1 − 3x and g(x) = 2x + 1, what is gf(12) gf\left(\frac{1}{2}\right) ?

Pick an answer to see why.

Questions 2 to 11

2.

Define a composite function, with a mapping diagram.

Answer
3.

In the mapping diagram, the functions g:A → B and f:B → C are shown.

A1234gB3425fC01−12f∘g
Figure 1.8 Exercise 1.1, question 3.
  • a.Write g:A → B as a set of ordered pairs.
  • b.Write f:B → C as a set of ordered pairs.
  • c.Find f ∘ g(1), f ∘ g(2), f ∘ g(3) and f ∘ g(4).
  • d.Write f ∘ g as a set of ordered pairs.
Answer
4.

If f = {(1, 2), (2, 3), (3, 4)} and g = {(2, 4), (3, 5), (4, 6)}, show gf in a mapping diagram and write it as a set of ordered pairs.

Answer
5.

If f(x) = 3x + 2 and g(x) = 5 − 3x, find:

  • a.gf(x)
  • b.fg(x)
  • c.ff(x)
  • d.ff(3)
Answer
6.

If f(x)=2x−1x+3 f(x) = \frac{2x - 1}{x + 3} (x ≠ −3) and g(x)=3x+2x−4 g(x) = \frac{3x + 2}{x - 4} (x ≠ 4), find fg(x).

Hint
Answer
7.

If f(x) = 2x + 5 and g(x)=x−52 g(x) = \frac{x - 5}{2} , prove that fg(x) is the identity function.

Answer
8.
  • a.If f(x)=x−32 f(x) = \frac{x - 3}{2} and fg(x) = x, find g(x).
  • b.If g(x) = 4 − x and gh(x) = 11 − 2x, find h(x).
Answer
9.
  • a.If f(x)=6x−2 f(x) = \frac{6}{x - 2} (x ≠ 2), g(x)=ax2−1 g(x) = ax^2 - 1 and gf(5) = 7, find a.
  • b.If f(x) = ax + 5, g(x) = 8x + 13 and gf(5) = 93, find a.
Answer
10.

If f(x) = kx + 1, g(x) = 3x − 7 and gf(1) = 2, find k.

Answer
11.

If f(x) = 3x − 2, fg(x) = 6x − 2 and gf(x) = 8, find x.

Hint
Answer

1.3 Inverse function

A1357f(x)B01−24
Figure 1.10 Activity 1, figure a: the function f from A to B.
X1234g(x)Y5436
Figure 1.11 Activity 1, figure b: the function g from X to Y.
B01−24R1​A1357
Figure 1.12 The arrows of f turned round: 0 has two images and −2 none (red), so R₁ is not a function.

Turn the arrows of f round and you get the relation R₁ = {(0, 1), (1, 3), (0, 5), (4, 7)} from B to A. It is not a function, for two reasons, one for each thing f lacks:

  • 0 is joined to two members, 1 and 5, because f was not one-to-one (f(1) = f(5) = 0);
  • −2 is joined to nothing, because f was not onto (nothing went to −2).
Y5436R2​X1234
Figure 1.13 The arrows of g turned round: still a function, the inverse g−1 g^{-1} .

Turn the arrows of g round and you get R₂ = {(3, 1), (4, 2), (5, 3), (6, 4)} from Y to X. This is a function: each member of Y has exactly one image. It works because g is one-to-one (no two arrows meet) and onto (every member of Y is reached).

When the domain and codomain of a function f are swapped (every arrow turned round) and the result is still a function, it is called the inverse function of f, written f−1 f^{-1} and read “f inverse”. A function has an inverse exactly when it is one-to-one and onto; such a function is called invertible. If y = f(x), then x=f−1(y) x = f^{-1}(y) : the inverse takes every image back to its pre-image.

Finding the inverse from a formula

For a function given by a formula, turning the arrows round means swapping the roles of input and output. So:

  1. Write y = f(x).
  2. Swap x and y.
  3. Solve the new equation for y. That y is f−1(x) f^{-1}(x) .

Why it works: a point (a, b) on the graph of f means f(a) = b; the inverse must take b back to a, so (b, a) is on the graph of f−1 f^{-1} . Swapping x and y swaps every pair at once. On a graph, swapping the coordinates is the reflection in the line y = x, so the graph of f−1 f^{-1} is the mirror image of the graph of f in y = x.

Try it

Mirror images in y = x

Drag the yellow point P along the graph of f. P′ has P’s two coordinates the other way round. Where does P′ always lie?

−4−224−4−224XYOP′​P

f f−1 y = x

The function f(x)
On f(x) = 2x − 3
P(1, −1)
On f−1(x) = (x + 3)/2
P′(−1, 1)

Swapping the coordinates reflects P in y = x: PP′ meets it at right angles and is cut in half.

There is another way to see the inverse: as undoing the steps of f in the reverse order. f(x) = 3x − 5 multiplies by 3 and then takes away 5. To undo it, add 5 back first, then divide by 3: f−1(x)=x+53 f^{-1}(x) = \frac{x + 5}{3} . It is like getting undressed: the shoes, put on last, come off first.

undo the last step firstf4127× 3− 5f−14127÷ 3+ 5the same numbers, passed through backwards
Figure 1.14 f(x) = 3x − 5 takes 4 to 7 in two steps. f−1 f^{-1} undoes the last step first and takes 7 back to 4.

Doing a function and then its inverse gets you back where you started, whichever comes first:
f−1(f(x))=xandf(f−1(x))=x f^{-1}(f(x)) = x \quad \text{and} \quad f(f^{-1}(x)) = x
So f−1∘f f^{-1} \circ f and f∘f−1 f \circ f^{-1} are both the identity function. This is a quick check of any inverse you find: in Exercise 1.1, question 7, g(x)=x−52 g(x) = \frac{x - 5}{2} was the inverse of f(x) = 2x + 5.

f(x) = 4x + 1. What is f−1(9) f^{-1}(9) ?

Pick an answer to see why.

Which of these functions from the real numbers to the real numbers has an inverse?

Pick an answer to see why.

Worked examples

Back to the marksheet

The question at the start: can anyone work out your exact marks from your grade? No: many different marks give the same grade, so the rule from marks to grade has no inverse.

Here is why, in this unit’s words. Out of 75, the percentage is p(m)=100m75=4m3 p(m) = \frac{100m}{75} = \frac{4m}{3} . That rule is one-to-one, and it can be undone: p−1(x)=3x4 p^{-1}(x) = \frac{3x}{4} , so 80% means exactly 60 marks. The grade rule G is the one that can’t: every percentage from 80 up to 90 gives A. The marksheet shows the composite G ∘ p (p first), and it is many-to-one: whole marks from 60 to 67 all give A (67 marks is 89.3%, and 68 is 90.7%, an A+). From an A, the most anyone can say is that the marks were between 60 and 67.

Exercise 1.2

Question 1

A. Which statement about the inverse function is correct?

Pick an answer to see why.

B. If f = {(1, 1), (2, 4), (3, 9), (4, 16)} is one-to-one and onto, what is f−1 f^{-1} ?

Pick an answer to see why.

C. If f(x) = 4x + 5 is one-to-one and onto, what is f−1(x) f^{-1}(x) ?

Pick an answer to see why.

D. If g(x)=1−3x5 g(x) = \frac{1 - 3x}{5} is one-to-one and onto, what is g−1(x) g^{-1}(x) ?

Pick an answer to see why.

E. If h(x)=1+2x3 h(x) = \frac{1 + 2x}{3} is one-to-one and onto, what is h−1(−1) h^{-1}(-1) ?

Pick an answer to see why.

Questions 2 to 7

2.

Define an inverse function, with a mapping diagram.

Answer
3.

If f = {(1, 2), (2, 4), (3, 6)} is a one-to-one and onto function, find f−1 f^{-1} as ordered pairs and show it in a mapping diagram.

Answer
4.

f(x) = 2x − 3, with x∈R x \in \mathbb{R} (the real numbers). Is this function one-to-one and onto? If so, find f−1(x) f^{-1}(x) .

Answer
5.

Find x in each case.

  • a.f(x) = 5x − 2 and f−1(x)=2 f^{-1}(x) = 2 .
  • b.g(x)=3x−74 g(x) = \frac{3x - 7}{4} and g−1(x)=5 g^{-1}(x) = 5 .
  • c.h(x)=2x−33x−5 h(x) = \frac{2x - 3}{3x - 5} and h−1(x)=2 h^{-1}(x) = 2 .
  • d.f(x)=x3+2x f(x) = \frac{x}{3 + 2x} and f−1(x)=f(x) f^{-1}(x) = f(x) .
Hint
Answer
6.
  • a.f(x) = 7x − 1 and g(x)=2x−35 g(x) = \frac{2x - 3}{5} are one-to-one and onto. Find g−1f(x) g^{-1}f(x) .
  • b.f(x) = 4x − 3 and g(x)=x+25 g(x) = \frac{x + 2}{5} are one-to-one and onto. Find f−1g−1(2) f^{-1}g^{-1}(2) .
  • c.g(x)=3x−1x−1 g(x) = \frac{3x - 1}{x - 1} (x ≠ 1) and h(x)=2x−1x−3 h(x) = \frac{2x - 1}{x - 3} (x ≠ 3). Find (gh)−1(x) (gh)^{-1}(x) and (hg)−1(x) (hg)^{-1}(x) .
Hint
Answer
7.
  • a.f(x) = 2x − 3 and g(x)=2x−73 g(x) = \frac{2x - 7}{3} are one-to-one and onto, and ff(x)=g−1(x) ff(x) = g^{-1}(x) . Find x.
  • b.f(x) = 2x − 5 and g(x)=3x+52 g(x) = \frac{3x + 5}{2} are one-to-one and onto, and ff(x)=g−1(x) ff(x) = g^{-1}(x) . Find x.
  • c.f(x)=x+12 f(x) = \frac{x + 1}{2} and g(x)=x−52 g(x) = \frac{x - 5}{2} are one-to-one and onto, and fg−1(x)=6 fg^{-1}(x) = 6 . Find x.
Answer

Project work

How the SEE asks it

In the SEE’s Optional Mathematics paper (75 marks, 3 hours), Function is one of the units of Algebra (Units 1 to 6 of this book). CDC’s specification grid gives Algebra 17 marks, in three kinds of question:

Group Kind of question Algebra’s marks Levels
A multiple choice, 1 mark each 2 knowledge 1, application 1
B within the content area: questions on Algebra alone, each of 2 to 4 parts 10 knowledge 2, understanding 2, application 4, higher ability 2
C across content areas: one question joining Algebra with another area 5 understanding 2, application 2, higher ability 1

In CDC’s model paper, functions appear three times: a 1-mark choice, “if f(x) = 3x − 2, which is true?”, where the answer is a statement about f−1 f^{-1} (group A); the first part of a group B question, a composite f(g(x)) of a linear function and a quadratic (1 mark), whose other parts go on to the quadratic’s graph; and one part of a group C question joining Algebra with Trigonometry, where a hill’s height is a linear function of the distance walked and its inverse gives the distance for a given height (2 marks).

What each kind asks, and where its marks are:

  • 1-mark questions: a composite from ordered pairs or formulas, a value f−1(a) f^{-1}(a) , the condition for an inverse, or which statement about f and f−1 f^{-1} is true. For f−1(a) f^{-1}(a) , solve f(x) = a: no formula needed.
  • Composites: write g ∘ f(x) = g(f(x)), substitute with brackets, simplify. A missing constant or function follows from the composite with the letter left in (Examples 4 and 5 of 1.2).
  • Inverses: y = f(x), swap x and y, make y the subject; then use it in a composite or an equation (Examples 4 and 5 of 1.3).
  • Definitions: a composite or inverse function, “with a mapping diagram”: the definition in words, a small example, and a labeled diagram.

Here is a question of the longer kind, written for this book, with how it is marked.

Where these facts come from

A companion to your textbook, not a replacement for it: study from the book your school uses, and where the two differ, follow your teacher. Found a mistake? Please tell us.