Lemma
← All topics
Pure mathematics

Functions and graphs

Machines that turn inputs into outputs, and the pictures they draw.

Introduction

A function is a rule that takes each input from a set called the domain and gives exactly one output. This topic covers how to combine functions (composition), undo them (inverses), the modulus function ∣x∣|x|, and how changing a formula moves its graph (transformations). It finishes with the standard graphs of y=kxy = \frac{k}{x} and y=kx2y = \frac{k}{x^2} and direct and inverse proportion.

Why it matters

Real processes are chains of simpler steps. Converting Celsius to Fahrenheit, then applying a tax, then rounding, is a composite function. Decoding a message means applying the inverse of the encoding. And if you know what y=f(x)y = f(x) looks like, transformations let you sketch y=3f(x−2)+1y = 3f(x - 2) + 1 immediately, without plotting a single point.

Intuitive explanation

IntuitionFunctions are machines

Think of ff as a machine. Put in xx, get out f(x)f(x). The composite fg(x)fg(x) means: put xx into gg first, then put the result into ff. Read it from the inside out, like getting dressed: socks before shoes.

IntuitionInverses undo

f−1f^{-1} is the machine that runs ff backwards. Its graph is the reflection of y=f(x)y = f(x) in the line y=xy = x, because reflecting swaps the roles of inputs and outputs.

IntuitionTransformations: inside versus outside

Changes outside the function act on yy and do what you expect: f(x)+3f(x) + 3 moves the graph up 3. Changes inside act on xx and do the opposite: f(x+3)f(x + 3) moves the graph left 3.

Formal definitions

DefinitionFunction, domain and range

A function ff assigns to each element xx of its domain exactly one value f(x)f(x). The range is the set of all outputs. A function is one-to-one if different inputs always give different outputs.

DefinitionComposite function

fg(x)=f(g(x))fg(x) = f(g(x)). It is defined only where g(x)g(x) lies in the domain of ff.

DefinitionInverse function

If ff is one-to-one, f−1f^{-1} is the function with f−1(f(x))=xf^{-1}(f(x)) = x. The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.

DefinitionModulus

∣x∣=x|x| = x if x≥0x \ge 0 and ∣x∣=−x|x| = -x if x<0x < 0. It is the distance of xx from 00.

Notation

  • f:x↦3x−1f: x \mapsto 3x - 1 means f(x)=3x−1f(x) = 3x - 1.
  • f(x)=x2, x∈R, x≥0f(x) = x^2,\ x \in \mathbb{R},\ x \ge 0 states the domain.
  • f−1(x)f^{-1}(x) is the inverse, not 1f(x)\dfrac{1}{f(x)}.
  • f2(x)f^2(x) means ff(x)ff(x) in this topic.

Transformation rules

EquationEffect on y=f(x)y = f(x)
y=f(x)+ay = f(x) + atranslate by (0a)\binom{0}{a} (up aa)
y=f(x+a)y = f(x + a)translate by (−a0)\binom{-a}{0} (left aa)
y=af(x)y = af(x)stretch parallel to the yy-axis, scale factor aa
y=f(ax)y = f(ax)stretch parallel to the xx-axis, scale factor 1a\frac1a
y=−f(x)y = -f(x)reflect in the xx-axis
y=f(−x)y = f(-x)reflect in the yy-axis
y=∣f(x)∣y = \lvert f(x) \rvertreflect the parts below the xx-axis upwards
y=f(∣x∣)y = f(\lvert x \rvert)copy the right-hand half onto the left

Key results

TheoremInverse graphs

The graph of y=f−1(x)y = f^{-1}(x) is the reflection of y=f(x)y = f(x) in the line y=xy = x.

PropositionProportion
  • yy is directly proportional to xx: y=kxy = kx, a straight line through the origin.
  • yy is inversely proportional to xx: y=kxy = \dfrac kx, a hyperbola with asymptotes x=0x = 0 and y=0y = 0.

Why the rules work

ProofWhy f(x+a)f(x + a) moves left

On y=f(x+a)y = f(x + a), the point with xx-coordinate x0−ax_0 - a has height f(x0)f(x_0). So every height that y=f(x)y = f(x) reaches at x0x_0 is reached by the new graph at x0−ax_0 - a, which is aa units to the left.

∎
ProofWhy the inverse is a reflection in y=xy = x

(p,q)(p, q) lies on y=f(x)y = f(x)   ⟺  q=f(p)  ⟺  p=f−1(q)  ⟺  (q,p)\iff q = f(p) \iff p = f^{-1}(q) \iff (q, p) lies on y=f−1(x)y = f^{-1}(x). Swapping coordinates is reflection in y=xy = x.

∎

Why the graph of an inverse is a reflection in y = x

A point (a,b)(a, b) lies on y=f(x)y = f(x) exactly when f(a)=bf(a) = b, which is exactly when f−1(b)=af^{-1}(b) = a, i.e. when (b,a)(b, a) lies on y=f−1(x)y = f^{-1}(x). Swapping the coordinates of every point is precisely reflection in the line y=xy = x: the midpoint of (a,b)(a, b) and (b,a)(b, a) is (a+b2,a+b2)\left(\frac{a + b}2, \frac{a + b}2\right), on the line, and the segment joining them has gradient −1-1, perpendicular to it.

The triangle inequality for the modulus

TheoremTriangle inequality

For all real a,ba, b:  ∣a+b∣≤∣a∣+∣b∣\ |a + b| \le |a| + |b|, with equality exactly when aa and bb have the same sign (or one is 00).

Proof

Both sides are non-negative, so it is enough to compare squares. ∣a+b∣2=a2+2ab+b2|a + b|^2 = a^2 + 2ab + b^2 and (∣a∣+∣b∣)2=a2+2∣a∣∣b∣+b2\left(|a| + |b|\right)^2 = a^2 + 2|a||b| + b^2. Since ab≤∣ab∣=∣a∣∣b∣ab \le |ab| = |a||b|, the first is at most the second. Equality needs ab=∣ab∣ab = |ab|, i.e. ab≥0ab \ge 0.

∎

A useful consequence is the reverse triangle inequality ∣∣a∣−∣b∣∣≤∣a−b∣\big||a| - |b|\big| \le |a - b|: apply the inequality to a=(a−b)+ba = (a - b) + b.

Why |x − a| < r is an interval

∣x−a∣|x - a| is the distance between xx and aa on the number line, so ∣x−a∣<r|x - a| < r describes the points within rr of aa: the open interval (a−r,a+r)(a - r, a + r). This "ball" picture is how analysis defines limits and continuity, and it generalises to any space where distance makes sense.

Methods

MethodFinding an inverse
  1. Write y=f(x)y = f(x).
  2. Rearrange to make xx the subject.
  3. Swap xx and yy (or just rename) to get f−1(x)f^{-1}(x).
  4. State the domain of f−1f^{-1}: it is the range of ff.
MethodSolving modulus equations

For ∣f(x)∣=g(x)|f(x)| = g(x): solve f(x)=g(x)f(x) = g(x) and f(x)=−g(x)f(x) = -g(x), then check each solution in the original equation (a sketch helps).

MethodFinding the range

Sketch the graph over the given domain and read off the lowest and highest yy-values. For a quadratic, completing the square gives the minimum.

Sketching any transformation from four rules

Every transformation in this topic is built from these four, applied to the equation:

Change to the equationEffect on the graph
y=f(x)+ay = f(x) + atranslate (0a)\binom 0a
y=f(x+a)y = f(x + a)translate (−a0)\binom{-a}0
y=af(x)y = af(x)stretch parallel to the yy-axis, factor aa
y=f(ax)y = f(ax)stretch parallel to the xx-axis, factor 1a\frac1a

To handle a combination such as y=af(bx+c)+dy = af(bx + c) + d, write it as y=af(b(x+cb))+dy = af\big(b(x + \frac cb)\big) + d: inside, stretch by 1b\frac1b in xx and then translate (−c/b0)\binom{-c/b}{0}; outside, stretch by aa in yy and then translate (0d)\binom 0d. The cleanest way to avoid confusion is the substitution test: a point (p,q)(p, q) on y=f(x)y = f(x) goes to the point whose new xx solves bx+c=pbx + c = p, and whose new yy is aq+daq + d.

Examples

ExampleA quick composite

f(x)=x2f(x) = x^2, g(x)=x+3g(x) = x + 3. Then fg(2)=f(5)=25fg(2) = f(5) = 25, but gf(2)=g(4)=7gf(2) = g(4) = 7. Order matters.

The Worked examples tab has full step-by-step solutions on inverses, modulus equations and transformations.

Common mistakes

Common mistakeWrong order in a composite

fg(x)fg(x) applies gg first.

Common mistakef−1f^{-1} is not 1/f1/f

The inverse undoes ff; the reciprocal is a different thing.

Common mistakeForgetting domain restrictions

f(x)=x2f(x) = x^2 on R\mathbb{R} has no inverse because it is not one-to-one. Restricting to x≥0x \ge 0 fixes this.

Common mistakeModulus "solutions" that do not work

Always substitute back. Squaring both sides or splitting cases can introduce false solutions.

Common mistakeStretch factor for f(ax)f(ax)

y=f(2x)y = f(2x) is a stretch of scale factor 12\frac12 (it squashes), not 22.

Applications

  • Unit conversion and pricing: chains of functions and their inverses.
  • Physics: Boyle's law PV=kPV = k is inverse proportion; inverse-square laws give F=kr2F = \frac{k}{r^2}.
  • Signal processing: shifting and stretching a waveform is a graph transformation.

Connections

Summary

  • fg(x)=f(g(x))fg(x) = f(g(x)): apply gg first.
  • Inverse: rearrange y=f(x)y = f(x); domain of f−1f^{-1} = range of ff; graph reflected in y=xy = x.
  • Only one-to-one functions have inverses.
  • ∣f(x)∣=g(x)|f(x)| = g(x): solve both cases and check.
  • Outside changes act on yy as expected; inside changes act on xx the opposite way.
  • y=kxy = kx direct proportion, y=kxy = \frac kx inverse proportion.

Worked examples

Try each one yourself first, then open the solution.

Example 1Composite and its domain

f(x)=x−2f(x) = \sqrt{x - 2} for x≥2x \ge 2 and g(x)=x2+1g(x) = x^2 + 1 for x∈Rx \in \mathbb{R}. Find fg(x)fg(x) and solve fg(x)=3fg(x) = 3.

Show the solution
  1. 1Apply gg first

    fg(x)=f(x2+1)=x2+1−2=x2−1fg(x) = f(x^2 + 1) = \sqrt{x^2 + 1 - 2} = \sqrt{x^2 - 1}.

  2. 2Set equal to 3

    x2−1=3⇒x2−1=9\sqrt{x^2 - 1} = 3 \Rightarrow x^2 - 1 = 9.

  3. 3Solve

    x2=10⇒x=±10x^2 = 10 \Rightarrow x = \pm\sqrt{10}. Both give g(x)=11≥2g(x) = 11 \ge 2, so both are valid.

Answer

fg(x)=x2−1fg(x) = \sqrt{x^2 - 1}; x=±10x = \pm\sqrt{10}

Example 2Inverse of a rational function

f(x)=2x+1x−3f(x) = \dfrac{2x + 1}{x - 3}, x≠3x \ne 3. Find f−1(x)f^{-1}(x).

Show the solution
  1. 1Write y=f(x)y = f(x)

    y=2x+1x−3y = \dfrac{2x + 1}{x - 3}.

  2. 2Clear the fraction

    y(x−3)=2x+1⇒xy−3y=2x+1y(x - 3) = 2x + 1 \Rightarrow xy - 3y = 2x + 1.

  3. 3Collect xx terms

    xy−2x=3y+1⇒x(y−2)=3y+1xy - 2x = 3y + 1 \Rightarrow x(y - 2) = 3y + 1.

  4. 4Make xx the subject and rename

    x=3y+1y−2x = \dfrac{3y + 1}{y - 2}, so f−1(x)=3x+1x−2f^{-1}(x) = \dfrac{3x + 1}{x - 2}, x≠2x \ne 2.

Answer

f−1(x)=3x+1x−2, x≠2f^{-1}(x) = \dfrac{3x + 1}{x - 2},\ x \neq 2

Example 3Restricting the domain

f(x)=x2−4x+1f(x) = x^2 - 4x + 1, x≥2x \ge 2. Find f−1(x)f^{-1}(x) and state its domain.

Show the solution
  1. 1Complete the square

    f(x)=(x−2)2−3f(x) = (x - 2)^2 - 3. On x≥2x \ge 2 it is increasing, so one-to-one, with range f(x)≥−3f(x) \ge -3.

  2. 2Rearrange

    y=(x−2)2−3⇒x−2=y+3y = (x - 2)^2 - 3 \Rightarrow x - 2 = \sqrt{y + 3} (positive root, since x≥2x \ge 2).

  3. 3Write the inverse

    f−1(x)=2+x+3f^{-1}(x) = 2 + \sqrt{x + 3}, with domain x≥−3x \ge -3.

Answer

f−1(x)=2+x+3f^{-1}(x) = 2 + \sqrt{x + 3}, x≥−3x \ge -3

The domain restriction tells you which square root to take.

Example 4A modulus equation

Solve ∣2x−3∣=x+1|2x - 3| = x + 1.

Show the solution
  1. 1Positive case

    2x−3=x+1⇒x=42x - 3 = x + 1 \Rightarrow x = 4.

  2. 2Negative case

    2x−3=−(x+1)⇒3x=2⇒x=232x - 3 = -(x + 1) \Rightarrow 3x = 2 \Rightarrow x = \tfrac23.

  3. 3Check both

    x=4x = 4: ∣5∣=5|5| = 5 ✓. x=23x = \tfrac23: ∣−53∣=53\left|-\tfrac53\right| = \tfrac53 ✓.

Answer

x=4x = 4 or x=23x = \tfrac23

Example 5A modulus inequality

Solve ∣x−1∣<3|x - 1| < 3.

Show the solution
  1. 1Interpret as distance

    ∣x−1∣<3|x - 1| < 3 means xx is less than 3 away from 1.

  2. 2Write as a double inequality

    −3<x−1<3-3 < x - 1 < 3.

  3. 3Solve

    −2<x<4-2 < x < 4.

Answer

−2<x<4-2 < x < 4

Example 6Combining transformations

The curve y=f(x)y = f(x) has a maximum at (2,5)(2, 5). Find the coordinates of the maximum on (a) y=f(x−3)y = f(x - 3) (b) y=2f(x)+1y = 2f(x) + 1 (c) y=f(2x)y = f(2x).

Show the solution
  1. 1Part (a): inside, so act on xx

    f(x−3)f(x - 3) moves right 3: (5,5)(5, 5).

  2. 2Part (b): outside, so act on yy

    Stretch by 2, then up 1: yy-coordinate 2(5)+1=112(5) + 1 = 11. Point (2,11)(2, 11).

  3. 3Part (c): stretch in xx

    f(2x)f(2x) halves xx-coordinates: (1,5)(1, 5).

Answer

(a) (5,5)(5, 5) (b) (2,11)(2, 11) (c) (1,5)(1, 5)

Example 7Range of a function

Find the range of f(x)=x2+6x+4f(x) = x^2 + 6x + 4 for −5≤x≤1-5 \le x \le 1.

Show the solution
  1. 1Complete the square

    f(x)=(x+3)2−5f(x) = (x + 3)^2 - 5: minimum −5-5 at x=−3x = -3, which lies inside the domain.

  2. 2Check the endpoints

    f(−5)=4−5=−1f(-5) = 4 - 5 = -1; f(1)=16−5=11f(1) = 16 - 5 = 11.

  3. 3Read off

    Lowest value −5-5, highest 1111.

Answer

−5≤f(x)≤11-5 \le f(x) \le 11

Always check whether the vertex is inside the domain, and test both endpoints.

Example 8Inverse proportion

yy is inversely proportional to the square of xx. When x=2x = 2, y=10y = 10. Find yy when x=5x = 5.

Show the solution
  1. 1Write the model

    y=kx2y = \dfrac{k}{x^2}.

  2. 2Find kk

    10=k4⇒k=4010 = \dfrac k4 \Rightarrow k = 40.

  3. 3Use it

    y=4025=1.6y = \dfrac{40}{25} = 1.6.

Answer

y=1.6y = 1.6

Beyond the specification

University-level ideas and the deeper mathematics behind this topic. Not needed for exams, but this is where the subject really opens up.

Functions as sets: injections, surjections and bijections (university)

At university a function is not a formula but a set of ordered pairs.

DefinitionFunction

A function f:A→Bf: A \to B is a subset f⊆A×Bf \subseteq A \times B such that every a∈Aa \in A appears in exactly one pair (a,b)∈f(a, b) \in f. We write f(a)=bf(a) = b. AA is the domain, BB the codomain, and f(A)={f(a):a∈A}f(A) = \{f(a) : a \in A\} the image (what A level calls the range).

So f(x)=x2f(x) = x^2 on R\mathbb R and g(x)=x2g(x) = x^2 on [0,∞)[0, \infty) are different functions, even though the formula is the same. This is why A level questions insist on stating the domain.

DefinitionThree key properties
  • ff is injective (one-to-one) if f(a1)=f(a2)⇒a1=a2f(a_1) = f(a_2) \Rightarrow a_1 = a_2.
  • ff is surjective (onto) if every b∈Bb \in B equals f(a)f(a) for some aa.
  • ff is bijective if it is both.
TheoremInverses exist exactly for bijections

f:A→Bf: A \to B has an inverse g:B→Ag: B \to A (with g∘f=idAg\circ f = \mathrm{id}_A and f∘g=idBf \circ g = \mathrm{id}_B) if and only if ff is bijective. The inverse is then unique.

Proof

If gg exists: f(a1)=f(a2)⇒a1=g(f(a1))=g(f(a2))=a2f(a_1) = f(a_2) \Rightarrow a_1 = g(f(a_1)) = g(f(a_2)) = a_2, so ff is injective; and any b=f(g(b))b = f(g(b)), so ff is surjective. Conversely, if ff is bijective, each bb has exactly one aa with f(a)=bf(a) = b; define g(b)=ag(b) = a. Uniqueness: if gg and hh are both inverses, g=g∘(f∘h)=(g∘f)∘h=hg = g\circ(f\circ h) = (g \circ f)\circ h = h.

∎

The last line used associativity of composition, (f∘g)∘h=f∘(g∘h)(f\circ g)\circ h = f \circ (g \circ h), which holds because both sides send xx to f(g(h(x)))f(g(h(x))). Composition is associative but not commutative: exactly like matrix multiplication, and for a deep reason, since matrices are functions (linear maps).

IntuitionRestricting the domain, revisited

x2:R→Rx^2: \mathbb R \to \mathbb R fails both tests: it is not injective ((−2)2=22(-2)^2 = 2^2) and not surjective (nothing maps to −1-1). Restricting the domain to [0,∞)[0, \infty) fixes injectivity; restricting the codomain to [0,∞)[0, \infty) fixes surjectivity. The result is a bijection with inverse x\sqrt x.

Counting infinite sets

Two sets have the same cardinality if there is a bijection between them. Surprising consequences:

  • N\mathbb N and the even numbers have the same size, via n↦2nn \mapsto 2n.
  • N\mathbb N and Q\mathbb Q have the same size: list the fractions along diagonals of a grid.
  • (0,1)(0, 1) and R\mathbb R have the same size, via x↦tan⁡(π(x−12))x \mapsto \tan\big(\pi(x - \tfrac12)\big).
TheoremCantor (1891)

There is no surjection from N\mathbb N onto R\mathbb R. The reals are "more infinite" than the natural numbers.

ProofDiagonal argument

Suppose f:N→(0,1)f: \mathbb N \to (0, 1) were onto, and write each f(n)f(n) as a decimal 0.dn1dn2dn3…0.d_{n1}d_{n2}d_{n3}\ldots Build x=0.e1e2e3…x = 0.e_1e_2e_3\ldots with en=5e_n = 5 if dnn≠5d_{nn} \ne 5 and en=4e_n = 4 otherwise. Then xx differs from f(n)f(n) in the nnth digit for every nn (and avoids the 0.4999…=0.50.4999\ldots = 0.5 ambiguity), so xx is not in the list. Contradiction.

∎

Continuity and the inverse function theorem (university)

When does a function of a real variable have a well-behaved inverse? The answer links this topic to calculus.

TheoremContinuous injections are monotonic

If ff is continuous and injective on an interval II, then ff is strictly increasing or strictly decreasing on II.

ProofSketch

If not, there are a<b<ca < b < c in II with f(b)f(b) above (or below) both f(a)f(a) and f(c)f(c). Take any value vv strictly between max⁡(f(a),f(c))\max(f(a), f(c)) and f(b)f(b). By the intermediate value theorem, vv is attained once in (a,b)(a, b) and once in (b,c)(b, c): two different inputs with the same output, contradicting injectivity.

∎

This is why, at A level, "find the largest domain on which ff has an inverse" always means "cut at a turning point".

TheoremThe inverse of a continuous monotonic function is continuous

If f:I→Jf: I \to J is continuous, strictly increasing and onto the interval JJ, then f−1:J→If^{-1}: J \to I is continuous and strictly increasing.

Geometrically clear (reflecting an unbroken curve in y=xy = x gives an unbroken curve), but the proof needs the completeness of R\mathbb R.

TheoremInverse function theorem (one variable)

Let ff be differentiable and strictly monotonic near aa, with f′(a)≠0f'(a) \ne 0, and let b=f(a)b = f(a). Then f−1f^{-1} is differentiable at bb, and

(f−1)′(b)=1f′(a)=1f′(f−1(b)).\left(f^{-1}\right)'(b) = \frac{1}{f'(a)} = \frac{1}{f'\big(f^{-1}(b)\big)}.
Proof

Write y=f(x)y = f(x) and k=f−1(b+h)−ak = f^{-1}(b + h) - a, so f(a+k)=b+hf(a + k) = b + h. By continuity of f−1f^{-1}, k→0k \to 0 as h→0h \to 0, and k≠0k \ne 0 when h≠0h \ne 0 (injectivity). So

f−1(b+h)−f−1(b)h=kf(a+k)−f(a)=1f(a+k)−f(a)k→1f′(a).\frac{f^{-1}(b + h) - f^{-1}(b)}{h} = \frac{k}{f(a + k) - f(a)} = \frac{1}{\dfrac{f(a + k) - f(a)}{k}} \to \frac{1}{f'(a)}.
∎

In Leibniz notation this is the memorable dxdy=1/dydx\dfrac{dx}{dy} = 1 \Big/ \dfrac{dy}{dx}. The reflection picture explains it: reflecting in y=xy = x swaps rise and run, so gradients become reciprocals.

ExampleDerivatives you already know, derived
  • ln⁡\ln is the inverse of exe^x:  (ln⁡)′(y)=1ex=1y\ (\ln)'(y) = \dfrac{1}{e^{x}} = \dfrac1y.
  • arcsin⁡\arcsin is the inverse of sin⁡\sin on [−π2,π2]\left[-\frac\pi2, \frac\pi2\right]:  (arcsin⁡)′(y)=1cos⁡x=11−y2\ (\arcsin)'(y) = \dfrac{1}{\cos x} = \dfrac{1}{\sqrt{1 - y^2}}, taking the positive root because cos⁡x≥0\cos x \ge 0 there.
  • y3\sqrt[3]{y} is the inverse of x3x^3: the derivative 13x2\frac{1}{3x^2} blows up at 00, matching the vertical tangent of y=x3y = \sqrt[3]x at the origin. The hypothesis f′(a)≠0f'(a) \ne 0 really is needed.

Iteration, fixed points and Möbius maps (university)

Several Extreme questions in this topic apply a function again and again. This is the start of dynamical systems.

Möbius transformations

Functions f(x)=ax+bcx+df(x) = \dfrac{ax + b}{cx + d} with ad−bc≠0ad - bc \ne 0 are Möbius transformations. Their secret is that composing them is the same as multiplying matrices:

TheoremComposition is matrix multiplication

If f↔Mf=(abcd)f \leftrightarrow M_f = \begin{pmatrix} a & b \\ c & d \end{pmatrix} and g↔Mgg \leftrightarrow M_g, then f∘g↔MfMgf \circ g \leftrightarrow M_f M_g. Scalar multiples of a matrix give the same map.

Proof

If g(x)=px+qrx+sg(x) = \frac{px + q}{rx + s} then f(g(x))=apx+qrx+s+bcpx+qrx+s+d=(ap+br)x+(aq+bs)(cp+dr)x+(cq+ds)f(g(x)) = \dfrac{a\frac{px + q}{rx + s} + b}{c\frac{px + q}{rx + s} + d} = \dfrac{(ap + br)x + (aq + bs)}{(cp + dr)x + (cq + ds)}, and the coefficients are exactly the entries of MfMgM_fM_g.

∎

This explains the questions at once:

  • f(x)=x+1x−1↔(111−1)f(x) = \frac{x + 1}{x - 1} \leftrightarrow \begin{pmatrix} 1 & 1 \\ 1 & -1\end{pmatrix}, whose square is 2I2I: so ffff is the identity (self-inverse). Generally M2M^2 is a multiple of II iff the trace a+da + d is 00 (Cayley–Hamilton: M2=(a+d)M−(ad−bc)IM^2 = (a + d)M - (ad - bc)I).
  • f(x)=11−x↔(01−11)f(x) = \frac{1}{1 - x} \leftrightarrow \begin{pmatrix} 0 & 1 \\ -1 & 1\end{pmatrix}, whose cube is −I-I: so f3f^3 is the identity.
  • Over C\mathbb C, Möbius maps are exactly the conformal bijections of the Riemann sphere; they map circles and lines to circles and lines.

Fixed points and cobwebs

A fixed point of ff is a solution of f(x)=xf(x) = x: where y=f(x)y = f(x) meets y=xy = x. Iterating xn+1=f(xn)x_{n+1} = f(x_n) is drawn as a cobweb diagram: go vertically to the curve, horizontally to the line, repeat.

TheoremAttracting and repelling fixed points

Let ff be continuously differentiable with fixed point pp. If ∣f′(p)∣<1|f'(p)| < 1, iterates starting close enough to pp converge to pp. If ∣f′(p)∣>1|f'(p)| > 1, nearby iterates are pushed away.

ProofSketch

By the mean value theorem, xn+1−p=f(xn)−f(p)=f′(ξn)(xn−p)x_{n+1} - p = f(x_n) - f(p) = f'(\xi_n)(x_n - p) for some ξn\xi_n between xnx_n and pp. Near pp, ∣f′(ξn)∣≤K<1|f'(\xi_n)| \le K < 1, so ∣xn−p∣≤Kn∣x0−p∣→0|x_n - p| \le K^n|x_0 - p| \to 0.

∎

This is the theory behind the iteration method in Numerical methods. Its abstract form, the Banach fixed-point theorem, says that every contraction of a complete metric space has exactly one fixed point; it is used to prove that differential equations have unique solutions.

Chaos from a quadratic

The logistic map f(x)=rx(1−x)f(x) = rx(1 - x) on [0,1][0, 1] is just a transformed parabola, yet:

  • for 1<r<31 < r < 3, iterates settle on the fixed point 1−1r1 - \frac1r;
  • at r=3r = 3 that point becomes repelling and a 2-cycle appears (points with f(a)=bf(a) = b, f(b)=af(b) = a, exactly the "swapped pairs" of question Q54);
  • the cycles keep doubling, 2,4,8,…2, 4, 8, \ldots, at values of rr whose gaps shrink by a ratio approaching the Feigenbaum constant δ≈4.669\delta \approx 4.669;
  • by r=4r = 4 the behaviour is chaotic: two starting points 10−1010^{-10} apart become unrelated within about 35 steps.
TheoremSharkovskii (1964), special case "period three implies chaos"

If a continuous map of an interval to itself has a point of period 33, it has points of every period n≥1n \ge 1.

So x↦11−xx \mapsto \frac{1}{1 - x} (period 3 everywhere) would be wildly complicated if it were a continuous self-map of an interval, but it is not: it jumps across the asymptote at x=1x = 1.

Why does this work?

Why does this work?Why does f(x+a)f(x + a) move the graph left?

The new graph at xx shows the height the old graph had at x+ax + a, which is aa units to the right. So each feature appears aa units earlier, to the left. Inside the bracket you change the input, and the graph has to move the opposite way to compensate.

Beyond the syllabus

Beyond the syllabusFunctional equations

Find all functions f:R→Rf: \mathbb R \to \mathbb R with f(x+y)=f(x)+f(y)f(x + y) = f(x) + f(y) (Cauchy's equation). Putting x=y=0x = y = 0 gives f(0)=0f(0) = 0; by induction f(nx)=nf(x)f(nx) = nf(x), and then f(q)=qf(1)f(q) = qf(1) for every rational qq. If ff is also continuous, then f(x)=cxf(x) = cx for all real xx. Remarkably, without continuity there are wild solutions whose graphs are dense in the plane; constructing them needs the axiom of choice.

Beyond the syllabusBijections and the size of sets

A function is a bijection if it is one-to-one and onto. f(x)=tan⁡(π(x−12))f(x) = \tan\left(\pi\left(x - \tfrac12\right)\right) is a bijection from (0,1)(0, 1) to all of R\mathbb R, so a short interval has "as many" points as the whole real line. This is how mathematicians compare infinite sets.

Mathematical curiosities

Mathematical curiosityA function continuous everywhere and differentiable nowhere

Weierstrass's function W(x)=∑n=0∞ancos⁡(bnπx)W(x) = \sum_{n=0}^{\infty} a^n\cos(b^n\pi x) (with 0<a<10 < a < 1 and ab>1+3π2ab > 1 + \frac{3\pi}2, bb an odd integer) is continuous but has no tangent anywhere: zoom in and the wiggles never smooth out.

Further exploration

Further explorationInvestigations
  • Find all functions with f(x)+2f(1−x)=x2f(x) + 2f(1 - x) = x^2. (Substitute 1−x1 - x for xx and solve simultaneously.)
  • For which kk does f(x)=x3+kxf(x) = x^3 + kx have an inverse function on R\mathbb R?
Now practise60 questions from Very easy to Extreme →