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?
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.
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
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:
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.
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.
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 ?
Pick an answer to see why.
Questions 2 to 11
Define a composite function, with a mapping diagram.
Answer
In the mapping diagram, the functions g:A → B and f:B → C are shown.
- 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
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
If f(x) = 3x + 2 and g(x) = 5 − 3x, find:
- a.gf(x)
- b.fg(x)
- c.ff(x)
- d.ff(3)
Answer
If (x ≠ −3) and (x ≠ 4), find fg(x).
Hint
Answer
If f(x) = 2x + 5 and , prove that fg(x) is the identity function.
Answer
- a.If and fg(x) = x, find g(x).
- b.If g(x) = 4 − x and gh(x) = 11 − 2x, find h(x).
Answer
- a.If (x ≠ 2), and gf(5) = 7, find a.
- b.If f(x) = ax + 5, g(x) = 8x + 13 and gf(5) = 93, find a.
Answer
If f(x) = kx + 1, g(x) = 3x − 7 and gf(1) = 2, find k.
Answer
If f(x) = 3x − 2, fg(x) = 6x − 2 and gf(x) = 8, find x.
Hint
Answer
1.3 Inverse 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).
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 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 : 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:
- Write y = f(x).
- Swap x and y.
- Solve the new equation for y. That y is .
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 . 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 is the mirror image of the graph of f in y = x.
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: . It is like getting undressed: the shoes, put on last, come off first.
Doing a function and then its inverse gets you back where you started, whichever comes first:
So and are both the identity function. This is a quick check of any inverse you find: in Exercise 1.1, question 7, was the inverse of f(x) = 2x + 5.
f(x) = 4x + 1. What is ?
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 . That rule is one-to-one, and it can be undone: , 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 ?
Pick an answer to see why.
C. If f(x) = 4x + 5 is one-to-one and onto, what is ?
Pick an answer to see why.
D. If is one-to-one and onto, what is ?
Pick an answer to see why.
E. If is one-to-one and onto, what is ?
Pick an answer to see why.
Questions 2 to 7
Define an inverse function, with a mapping diagram.
Answer
If f = {(1, 2), (2, 4), (3, 6)} is a one-to-one and onto function, find as ordered pairs and show it in a mapping diagram.
Answer
f(x) = 2x − 3, with (the real numbers). Is this function one-to-one and onto? If so, find .
Answer
Find x in each case.
- a.f(x) = 5x − 2 and .
- b. and .
- c. and .
- d. and .
Hint
Answer
- a.f(x) = 7x − 1 and are one-to-one and onto. Find .
- b.f(x) = 4x − 3 and are one-to-one and onto. Find .
- c. (x ≠ 1) and (x ≠ 3). Find and .
Hint
Answer
- a.f(x) = 2x − 3 and are one-to-one and onto, and . Find x.
- b.f(x) = 2x − 5 and are one-to-one and onto, and . Find x.
- c. and are one-to-one and onto, and . Find x.
Answer
Practice every question in the book, and keep track of the ones you miss →
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 (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 , the condition for an inverse, or which statement about f and is true. For , 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
- SEE letter grades by percentage (A: 80% up to 90%, A+: 90% and over) (the opening, 1.3): Wikipedia, “Secondary Education Examination (Nepal)”, Grading System, and Onlinekhabar, “Nepal schools to adopt letter grading system from grade 1”, read October 2026.
- Leibniz’s “function” of 1673; Euler and Clairaut’s f(x) in the 1730s (1.1): Wikipedia, “History of the function concept”, read October 2026.
- Herschel’s of 1813 and his warning that it is not 1 divided by the function (1.1): Wikipedia, “Inverse function”, and Cajori, A History of Mathematical Notations, §533, quoted there, read October 2026.
- The exact conversions between kelvin, Celsius and Fahrenheit, including (k − 273.15) × 1.8 + 32 (1.2, 1.3): NIST, “SI Units – Temperature”, read October 2026.
- Caesar’s shift of three, according to Suetonius (1.3): Wikipedia, “Caesar cipher”, read October 2026.
- Passwords stored as hashes, “a one-way function” (1.3): OWASP, “Password Storage Cheat Sheet”, read October 2026.
- Excel’s nested functions, up to 64 levels, and nested IFs giving a letter grade (1.3): Microsoft Support, “Use nested functions in a formula”, read October 2026.
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.
