On 25 April 2015 the Gorkha earthquake, of magnitude 7.8, shook Nepal; on 12 May came an aftershock of magnitude 7.3. Half a step on the scale sounds small. But magnitude is not a measure of energy: it is a function of the energy, and seismologists work it both ways, from the energy to the magnitude and back.
So here is this unit’s question: how much more energy did the main shock release than the aftershock, and why is the answer not “a little”? It needs a function’s domain and range, its inverse, and two functions that are not built from +, −, ×, ÷ at all: the exponential and the logarithm. The answer comes at the end of 3.5.
3.1 Domain and range of a function
What you need
From Grade 9 Optional Math, 1.1 and Grade 10 Optional Math, Unit 1: a function f:A → B gives each element of A exactly one image in B. A is the domain, B the codomain, and the set of images that really occur, f(A), the range. A function is one-to-one if different inputs always have different images, onto if the range is the whole codomain. On a graph, a curve is a function of x when no vertical line meets it twice.
Real functions and their natural domain
From now on most functions are real functions: the inputs and outputs are real numbers, and f is given by a formula, such as . When no domain is stated, the domain is the largest set of real numbers for which the formula gives a real number, its natural domain. Three things remove numbers from it:
- a denominator that is 0;
- an even root (, ) of a negative number;
- a logarithm of 0 or a negative number (3.5).
Finding the range
The range is harder to read off than the domain. Write y = f(x) and solve for x: y is in the range exactly when that gives a real x in the domain.
The domain of is:
Pick an answer to see why.
The range of is:
Pick an answer to see why.
3.2 Inverse function
A function takes x to y. Its inverse takes y back to x. That works only if no two inputs share an output (else which one would it go back to?) and every element of the codomain is an output (else some y would have nowhere to go). So:
If f:A → B is one-to-one and onto, its inverse is defined by .
Then the domain of is the range of f, and the range of is the domain of f; and and . On a graph, (a, b) on f means (b, a) on : the graph of is the mirror image of the graph of f in the line y = x.
To find : write y = f(x), solve for x, then swap the letters so the inverse is a function of x.
Restricting the domain. on is not one-to-one (f(−2) = f(2)), so it has no inverse. On [0, ∞) it is one-to-one onto [0, ∞), and there its inverse is . The same trick gives the inverse trigonometric functions of Unit 9.
If , then is:
Pick an answer to see why.
The point (2, 7) is on the graph of f. Which point must be on the graph of ?
Pick an answer to see why.
3.3 Composite function
The composite of f and g, g ∘ f (read “g of f” or “g circle f”), applies f first, then g:
It is defined for the x in the domain of f whose image f(x) is in the domain of g. Grade 10 Optional Math worked it for formulas; here the domain matters too.
Composite and inverse. If f and g both have inverses, so has g ∘ f, and
To undo “f, then g”, undo g first, then f, as socks go on before shoes and come off after them. Proof: , each inverse undoing its own function; and the same way . So undoes g ∘ f from both sides: it is its inverse.
f(x) = x + 2 and . Then (f ∘ g)(3) is:
Pick an answer to see why.
If f(x) = 3x − 1 and (f ∘ g)(x) = 6x + 5, then g(x) is:
Pick an answer to see why.
3.4 Algebraic functions
A function is algebraic if its formula is built from x and numbers with +, −, ×, ÷ and roots. The simplest are the polynomial functions:
| Function | Form | Domain | Range | Graph |
|---|---|---|---|---|
| linear | f(x) = mx + c, m ≠ 0 | a straight line of slope m | ||
| quadratic | , a ≠ 0 | if a > 0; if a < 0 | a parabola, turning at | |
| cubic | , a ≠ 0 | an S-shape, with or without a hump and a dip |
A linear function is one-to-one, so it always has an inverse. A quadratic never is: its parabola turns, and the two sides share values. A cubic goes from −∞ to ∞, so its range is all of ; it is one-to-one only if it never turns back ( is, is not). Rational functions such as and roots such as are algebraic too. Their graphs, and how to sketch them, are Unit 4.
The range of f(x) = 4x − 7, , is:
Pick an answer to see why.
The range of on the domain [0, 4] is:
Pick an answer to see why.
3.5 Transcendental functions
A function that is not algebraic is transcendental: no finite formula of +, −, ×, ÷ and roots gives it. The ones in this course are the trigonometric, exponential and logarithmic functions.
Trigonometric functions
With x in radians ( radians = 180°), sin x and cos x are defined for every real x, as the y- and x-coordinates of the point at angle x on a circle of radius 1. So:
| Function | Domain | Range |
|---|---|---|
| sin x, cos x | [ −1, 1] | |
| , | tan: ; : (−∞, −1] ∪ [1, ∞) | |
| , | : ; : (−∞, −1] ∪ [1, ∞) |
The values repeat every ( for tan and ): they are periodic, the reason sound, tides and alternating current are described by them. Their graphs and periods are Unit 4.
Exponential functions
For a number a > 0, a ≠ 1, the exponential function is , with x up in the power. Its domain is (powers like are filled in between the rational ones, so the graph has no gaps) and, since a positive number to any power is positive, its range is (0, ∞). Every graph passes through (0, 1), as . For a > 1 it rises ever faster; for 0 < a < 1 it falls. The most important base is e = 2.71828…, and is called the exponential function (why e: Unit 18 shows is its own slope).
An exponential grows by the same factor for each equal step in x: . That is how money grows at compound interest, a population with a steady birth rate, or a culture of bacteria that keeps doubling in the same time.
Logarithmic functions
is one-to-one from onto (0, ∞), so it has an inverse: the logarithm to base a,
Its domain is (0, ∞) and its range , the exponential’s swapped. is the common logarithm ( in most books), the natural logarithm. Every graph passes through (1, 0), and it is the mirror image of in y = x.
The laws of logarithms come from the laws of indices: , , . A logarithm turns a multiplication into an addition: that is what it is for.
The domain of is:
Pick an answer to see why.
The range of f(x) = 2 sin x + 1 is:
Pick an answer to see why.
Back to the earthquake
Seismologists relate an earthquake’s magnitude M to the energy E its waves carry (in joules), roughly, by a relation Beno Gutenberg and Charles Richter proposed:
an exponential function of M, whose inverse is a logarithmic function of E. For the two shocks of 2015:
The main shock released about 5.6 times the aftershock’s energy, about joules. Each whole step of magnitude multiplies the energy by , so a magnitude 7.8 releases about 32 times the energy of a 6.8 and about 1000 times that of a 5.8. A scale of energy itself would run from about two million joules (magnitude 1) to about two million million million (magnitude 9); the logarithm squeezes that into 1 to 9. That is why the magnitude is a function, and a logarithmic one.
For the engineering entrance
IOE’s BE entrance names three kinds of function that NEB’s exam does not ask by name: injective, surjective and bijective.
Exercise
Choose the correct option
The domain of is:
Pick an answer to see why.
The range of is:
Pick an answer to see why.
If and , then (f ∘ g)(x) is:
Pick an answer to see why.
The inverse of is:
Pick an answer to see why.
The domain of is:
Pick an answer to see why.
Which function has an inverse on ?
Pick an answer to see why.
The graph of crosses the x-axis at:
Pick an answer to see why.
If , x ≠ −1, then is:
Pick an answer to see why.
The range of is:
Pick an answer to see why.
f(x) = ax + b and g(x) = cx + d. Then f ∘ g = g ∘ f exactly when:
Pick an answer to see why.
and . Which statement is true?
Pick an answer to see why.
Short questions
Find the domain and range of
- a. (2 marks)
- b. (2 marks)
- c.h(x) = 3 − 2 cos x (1 mark)
Answer
f(x) = 2x − 3 and .
- a.Find f ∘ g and g ∘ f, and show they are different. (2 marks)
- b.Find x such that (f ∘ g)(x) = (g ∘ f)(x). (3 marks)
Answer
, .
- a.Find . (3 marks)
- b.Show that (f ∘ f)(x) = x, and say what that means for . (2 marks)
Answer
- a.Find the domain of . (2 marks)
- b.Find the inverse of , and state the domain and range of . (3 marks)
Answer
Long question
and g(x) = 2x − 1.
- a.Find the domain and range of f. (2 marks)
- b.Find and . (2 marks)
- c.Find in two ways, and show they agree. (4 marks)
Answer
Project work
For the engineering entrance
Questions of the kind IOE sets on injective, surjective and bijective functions.
Printable PDFs
- Study notes 2 pages
- Worksheet 4 pages Answer key
- Harder practice questions 1 page Answer key
Practice every question in the book, and keep track of the ones you miss →
Where these facts come from
- The Gorkha earthquake of 25 April 2015, 7.8, and the aftershock of 12 May 2015, 7.3 (opening, 3.5): USGS event pages us20002926 (M 7.8, 25 April 2015, 06:11 UTC) and us20002ejl (M 7.3, 12 May 2015, 07:05 UTC), read November 2026.
- (E in joules), and each whole magnitude step releasing about 32 times the energy (3.5): Wikipedia, “Moment magnitude scale”, “Relations between seismic moment, potential energy released and radiated energy” (, as Gutenberg and Richter suggested), and Wikipedia, “Richter magnitude scale” (a factor of 31.6 per magnitude), read November 2026. The relation is for surface-wave magnitude; using it with the moment magnitudes USGS gives is the usual approximation.
- Nepal’s earthquake catalog (project work): National Earthquake Monitoring and Research Center, Department of Mines and Geology.
- Napier’s Descriptio (1614), Briggs’s visits (summer 1615 and 1616), log 1 = 0 and base 10, and Arithmetica Logarithmica (1624, the logarithms of 1 to 20,000 and 90,000 to 100,000 to 14 places) (story in 3.5): MacTutor, “Henry Briggs”, Wikipedia, “John Napier” and “Henry Briggs (mathematician)” (first professor of geometry at Gresham College, 1596), read November 2026. (Wikipedia’s Briggs article dates the visits 1616 and 1617; MacTutor and the Napier article give 1615, and Napier died in April 1617.)
- Definitions checked against OpenStax, Precalculus 2e, 1.1, 1.4, 1.7, 4.1 and 4.3 (CC BY 4.0).
- The unit’s items: CDC, Secondary Education Curriculum 2078, Mathematics, Grades 11–12, 1.3; the marks: CDC, Specification Grid 2078, Mathematics, Grade 11; IOE, BE/BArch Entrance Syllabus 2083, Mathematics 1.2.
Found a mistake? Please tell us.
