Skip to content

← Grade 11 Mathematics

Function

Unit 3 · Algebra

Hide the stories, facts, photos, activities and interactives, for revising before an exam
What this builds on from class
In this unit 6 sections
  1. 3.1 Domain and range of a function
  2. 3.2 Inverse function
  3. 3.3 Composite function
  4. 3.4 Algebraic functions
  5. 3.5 Transcendental functions
  6. Exercise

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 f(x)=x−2 f(x) = \sqrt{x - 2} . 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 (  \sqrt{\ } ,  4 \sqrt[4]{\ } ) 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 f(x)=x+5 f(x) = \sqrt{x + 5} is:

Pick an answer to see why.

The range of f(x)=3−x2 f(x) = 3 - x^2 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 f−1:B→A f^{-1}: B \to A is defined by f−1(y)=x  ⟺  f(x)=y f^{-1}(y) = x \iff f(x) = y .

Then the domain of f−1 f^{-1} is the range of f, and the range of f−1 f^{-1} is the domain of f; and f−1(f(x))=x f^{-1}(f(x)) = x and f(f−1(y))=y f(f^{-1}(y)) = y . On a graph, (a, b) on f means (b, a) on f−1 f^{-1} : the graph of f−1 f^{-1} is the mirror image of the graph of f in the line y = x.

Try it

Mirror images in y = x

Drag P along f: its mirror image P′ traces f−1 f^{-1} .

−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.

To find f−1 f^{-1} : write y = f(x), solve for x, then swap the letters so the inverse is a function of x.

Restricting the domain. f(x)=x2 f(x) = x^2 on R \mathbb{R} 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 x \sqrt{x} . The same trick gives the inverse trigonometric functions of Unit 9.

If f(x)=x−53 f(x) = \dfrac{x - 5}{3} , then f−1(2) f^{-1}(2) 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 f−1 f^{-1} ?

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:
(g∘f)(x)=g(f(x)) (g \circ f)(x) = g(f(x))
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
(g∘f)−1=f−1∘g−1 (g \circ f)^{-1} = f^{-1} \circ g^{-1}
To undo “f, then g”, undo g first, then f, as socks go on before shoes and come off after them. Proof: (f−1∘g−1)(g(f(x)))=f−1(g−1(g(f(x))))=f−1(f(x))=x (f^{-1} \circ g^{-1})(g(f(x))) = f^{-1}(g^{-1}(g(f(x)))) = f^{-1}(f(x)) = x , each inverse undoing its own function; and the same way (g∘f)(f−1(g−1(y)))=g(g−1(y))=y (g \circ f)(f^{-1}(g^{-1}(y))) = g(g^{-1}(y)) = y . So f−1∘g−1 f^{-1} \circ g^{-1} undoes g ∘ f from both sides: it is its inverse.

f(x) = x + 2 and g(x)=x2 g(x) = x^2 . 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 R \mathbb{R} R \mathbb{R} a straight line of slope m
quadratic f(x)=ax2+bx+c f(x) = ax^2 + bx + c , a ≠ 0 R \mathbb{R} [f(−b2a),∞) \left[f\left(-\frac{b}{2a}\right), \infty\right) if a > 0; (−∞,f(−b2a)] \left(-\infty, f\left(-\frac{b}{2a}\right)\right] if a < 0 a parabola, turning at x=−b2a x = -\frac{b}{2a}
cubic f(x)=ax3+bx2+cx+d f(x) = ax^3 + bx^2 + cx + d , a ≠ 0 R \mathbb{R} R \mathbb{R} 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 R \mathbb{R} ; it is one-to-one only if it never turns back (x3 x^3 is, x3−3x x^3 - 3x is not). Rational functions such as 2x+1x−3 \frac{2x + 1}{x - 3} and roots such as 4−x2 \sqrt{4 - x^2} are algebraic too. Their graphs, and how to sketch them, are Unit 4.

−2−112−3−1234XYOlinearquadraticcubic
Figure 3.1 The linear y = 2x + 1, the quadratic y=x2+2x−2 y = x^2 + 2x - 2 (lowest point (−1, −3), range [ −3, ∞)) and the cubic y=x3−3x y = x^3 - 3x , which turns twice but still runs from −∞ to ∞.

The range of f(x) = 4x − 7, x∈R x \in \mathbb{R} , is:

Pick an answer to see why.

The range of f(x)=x2−6x+10 f(x) = x^2 - 6x + 10 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 (π \pi 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 R \mathbb{R} [ −1, 1]
tan⁡x=sin⁡xcos⁡x \tan x = \frac{\sin x}{\cos x} , sec⁡x=1cos⁡x \sec x = \frac{1}{\cos x} R−{(2n+1)π2:n∈Z} \mathbb{R} - \left\{(2n + 1)\frac{\pi}{2} : n \in \mathbb{Z}\right\} tan: R \mathbb{R} ; sec⁡ \sec : (−∞, −1] ∪ [1, ∞)
cot⁡x \cot x , csc⁡x \csc x R−{nπ:n∈Z} \mathbb{R} - \{n\pi : n \in \mathbb{Z}\} cot⁡ \cot : R \mathbb{R} ; csc⁡ \csc : (−∞, −1] ∪ [1, ∞)

The values repeat every 2π 2\pi (π \pi for tan and cot⁡ \cot ): they are periodic, the reason sound, tides and alternating current are described by them. Their graphs and periods are Unit 4.

π/2π3π/22π−11XYOy = sin xy = cos x
Figure 3.2 y =  sin x and y =  cos x over one turn, 0 to 2π 2\pi , and a little either side: every value between −1 and 1, and nothing outside.

Exponential functions

For a number a > 0, a ≠ 1, the exponential function is f(x)=ax f(x) = a^x , with x up in the power. Its domain is R \mathbb{R} (powers like 23 2^{\sqrt{3}} 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 a0=1 a^0 = 1 . For a > 1 it rises ever faster; for 0 < a < 1 it falls. The most important base is e = 2.71828…, and ex e^x is called the exponential function (why e: Unit 18 shows ex e^x is its own slope).

An exponential grows by the same factor for each equal step in x: 2x+1=2⋅2x 2^{x + 1} = 2 \cdot 2^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

ax a^x is one-to-one from R \mathbb{R} onto (0, ∞), so it has an inverse: the logarithm to base a,
y=log⁡ax  ⟺  ay=x(x>0) y = \log_a x \iff a^y = x \quad (x > 0)
Its domain is (0, ∞) and its range R \mathbb{R} , the exponential’s swapped. log⁡10x \log_{10} x is the common logarithm (log⁡x \log x in most books), log⁡ex=ln⁡x \log_e x = \ln x the natural logarithm. Every log⁡a \log_a graph passes through (1, 0), and it is the mirror image of ax a^x in y = x.

−2−134−2−1234XYO(0, 1)(1, 0)y = xy = ex​y = ln x
Figure 3.3 y=ex y = e^x (domain R \mathbb{R} , range (0, ∞)) and its inverse y=ln⁡x y = \ln x (domain (0, ∞), range R \mathbb{R} ): mirror images in y = x.

The laws of logarithms come from the laws of indices: log⁡a(xy)=log⁡ax+log⁡ay \log_a(xy) = \log_a x + \log_a y , log⁡axy=log⁡ax−log⁡ay \log_a \frac{x}{y} = \log_a x - \log_a y , log⁡axk=klog⁡ax \log_a x^k = k\log_a x . A logarithm turns a multiplication into an addition: that is what it is for.

The domain of f(x)=log⁡2(5−x) f(x) = \log_2(5 - x) 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:
log⁡10E=1.5M+4.8,soE=101.5M+4.8 \log_{10} E = 1.5M + 4.8, \quad \text{so} \quad E = 10^{1.5M + 4.8}
an exponential function of M, whose inverse M=log⁡10E−4.81.5 M = \dfrac{\log_{10} E - 4.8}{1.5} is a logarithmic function of E. For the two shocks of 2015:
E(7.8)E(7.3)=101.5×7.8+4.8101.5×7.3+4.8=101.5×0.5=100.75≈5.6 \frac{E(7.8)}{E(7.3)} = \frac{10^{1.5 \times 7.8 + 4.8}}{10^{1.5 \times 7.3 + 4.8}} = 10^{1.5 \times 0.5} = 10^{0.75} \approx 5.6
The main shock released about 5.6 times the aftershock’s energy, about 1016.5≈3×1016 10^{16.5} \approx 3 \times 10^{16} joules. Each whole step of magnitude multiplies the energy by 101.5≈32 10^{1.5} \approx 32 , 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 f(x)=1x−4 f(x) = \dfrac{1}{x - 4} is:

Pick an answer to see why.

The range of f(x)=ex f(x) = e^x is:

Pick an answer to see why.

If f(x)=1x f(x) = \dfrac{1}{x} and g(x)=x2+1 g(x) = x^2 + 1 , then (f ∘ g)(x) is:

Pick an answer to see why.

The inverse of f(x)=2x f(x) = 2^x is:

Pick an answer to see why.

The domain of f(x)=x2−4x+3 f(x) = \sqrt{x^2 - 4x + 3} is:

Pick an answer to see why.

Which function has an inverse on R \mathbb{R} ?

Pick an answer to see why.

The graph of y=log⁡3(x−2) y = \log_3(x - 2) crosses the x-axis at:

Pick an answer to see why.

If f(x)=3x−2x+1 f(x) = \dfrac{3x - 2}{x + 1} , x ≠ −1, then f−1(x) f^{-1}(x) is:

Pick an answer to see why.

The range of f(x)=x2x2+1 f(x) = \dfrac{x^2}{x^2 + 1} 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.

f(x)=ln⁡x f(x) = \ln x and g(x)=ex g(x) = e^x . Which statement is true?

Pick an answer to see why.

Short questions

1.

Find the domain and range of

  • a.f(x)=x+2x−1 f(x) = \dfrac{x + 2}{x - 1} (2 marks)
  • b.g(x)=9−x2 g(x) = \sqrt{9 - x^2} (2 marks)
  • c.h(x) = 3 − 2 cos x (1 mark)
Answer
2.

f(x) = 2x − 3 and g(x)=x2+2 g(x) = x^2 + 2 .

  • 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
3.

f(x)=4x+36x−4 f(x) = \dfrac{4x + 3}{6x - 4} , x≠23 x \ne \frac{2}{3} .

  • a.Find f−1(x) f^{-1}(x) . (3 marks)
  • b.Show that (f ∘ f)(x) = x, and say what that means for f−1 f^{-1} . (2 marks)
Answer
4.
  • a.Find the domain of f(x)=ln⁡(x2−5x+6) f(x) = \ln(x^2 - 5x + 6) . (2 marks)
  • b.Find the inverse of g(x)=log⁡3(2x+1) g(x) = \log_3(2x + 1) , and state the domain and range of g−1 g^{-1} . (3 marks)
Answer

Long question

5.

f(x)=x+1x−2 f(x) = \dfrac{x + 1}{x - 2} and g(x) = 2x − 1.

  • a.Find the domain and range of f. (2 marks)
  • b.Find f−1 f^{-1} and g−1 g^{-1} . (2 marks)
  • c.Find (g∘f)−1 (g \circ f)^{-1} 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.

Where these facts come from
  • The Gorkha earthquake of 25 April 2015, Mw M_w 7.8, and the aftershock of 12 May 2015, Mw M_w 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.
  • log⁡10E=1.5M+4.8 \log_{10} E = 1.5M + 4.8 (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” (log⁡10Es≈4.8+1.5MS \log_{10} E_s \approx 4.8 + 1.5M_S , 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.