Lemma
← All topics
Further mathematics

Mathematical induction

Infinitely many cases, proved in finitely many lines.

Introduction

How can a finite argument establish a statement about every natural number? Mathematical induction is the answer. It is the formal version of the domino effect: if the first domino falls, and each falling domino knocks over the next, then all of them fall. Induction is the main proof technique for statements about sums, divisibility, recurrences, matrix powers and inequalities indexed by nn.

Mathematical motivation

Checking cases is not proof. The polynomial n2+n+41n^2 + n + 41 is prime for n=0,1,…,39n = 0, 1, \dots, 39, yet 402+40+41=41240^2 + 40 + 41 = 41^2. The statement "991n2+1991n^2 + 1 is never a perfect square" holds for every nn up to about 102810^{28} and then fails. No number of examples can replace an argument that covers all cases at once.

Intuitive explanation

IntuitionClimbing a ladder

To show you can reach every rung of an infinite ladder, it suffices to show (1) you can reach the first rung, and (2) from any rung you can reach the next. The inductive step is a conditional: if you are on rung kk, then you can reach rung k+1k+1. You do not need to know that rung kk is reachable when you prove the step. That comes from chaining the step to the base case.

The usual difficulty is in the inductive step: you must find the statement for kk inside the statement for k+1k+1. For sums, peel off the last term. For divisibility, rewrite the (k+1)(k+1) expression as a multiple of the kk expression plus something visibly divisible.

Formal definitions

TheoremPrinciple of mathematical induction

Let P(n)P(n) be a statement for each integer n≥n0n \ge n_0. If

  1. P(n0)P(n_0) is true (base case), and
  2. for every k≥n0k \ge n_0, P(k)⇒P(k+1)P(k) \Rightarrow P(k+1) (inductive step),

then P(n)P(n) is true for all integers n≥n0n \ge n_0.

TheoremStrong induction

If P(n0)P(n_0) holds and, for every k≥n0k \ge n_0, the truth of P(n0),P(n0+1),…,P(k)P(n_0), P(n_0+1), \dots, P(k) together implies P(k+1)P(k+1), then P(n)P(n) holds for all n≥n0n \ge n_0.

NoteWhy it is valid

Induction is equivalent to the well-ordering principle: every non-empty set of natural numbers has a least element. If PP failed somewhere, take the least failure mm. Then m>n0m > n_0 (the base case holds), and P(m−1)P(m-1) is true, so the inductive step forces P(m)P(m), a contradiction.

Important notation

  • P(n)P(n): the proposition being proved, written explicitly in a full solution.
  • ∑r=1nf(r)=f(1)+f(2)+⋯+f(n)\displaystyle\sum_{r=1}^{n} f(r) = f(1) + f(2) + \dots + f(n) and ∑r=1k+1f(r)=∑r=1kf(r)+f(k+1)\displaystyle\sum_{r=1}^{k+1} f(r) = \sum_{r=1}^{k}f(r) + f(k+1). The second identity is the engine of every sum proof.
  • a∣ba \mid b: "aa divides bb", i.e. b=amb = am for some integer mm.

Important identities

IdentitiesStandard sums (all provable by induction)
∑r=1nr=n(n+1)2,∑r=1nr2=n(n+1)(2n+1)6,∑r=1nr3=n2(n+1)24,∑r=0n−1xr=xn−1x−1.\sum_{r=1}^n r = \frac{n(n+1)}{2},\qquad \sum_{r=1}^n r^2 = \frac{n(n+1)(2n+1)}{6},\qquad \sum_{r=1}^n r^3 = \frac{n^2(n+1)^2}{4},\qquad \sum_{r=0}^{n-1} x^r = \frac{x^n - 1}{x - 1}.

Structure of a complete proof

MethodThe four parts examiners look for
  1. Base case. Verify P(n0)P(n_0) explicitly; show both sides.
  2. Assumption. "Assume P(k)P(k) is true for some integer k≥n0k \ge n_0", and write P(k)P(k) out.
  3. Inductive step. Using the assumption, show P(k+1)P(k+1). State the target first so the algebra has a destination.
  4. Conclusion. "Since P(n0)P(n_0) is true and P(k)⇒P(k+1)P(k) \Rightarrow P(k+1), by mathematical induction P(n)P(n) is true for all n≥n0n \ge n_0."

Proofs of important results

Proof∑r=1nr2=n(n+1)(2n+1)6\displaystyle\sum_{r=1}^n r^2 = \frac{n(n+1)(2n+1)}{6}

Base: n=1n = 1: LHS =1= 1, RHS =1⋅2⋅36=1= \frac{1\cdot2\cdot3}{6} = 1.

Step: assume true for n=kn = k. Then

∑r=1k+1r2=k(k+1)(2k+1)6+(k+1)2=(k+1)[k(2k+1)+6(k+1)]6=(k+1)(2k2+7k+6)6=(k+1)(k+2)(2k+3)6,\begin{aligned}\sum_{r=1}^{k+1}r^2 &= \frac{k(k+1)(2k+1)}{6} + (k+1)^2 = \frac{(k+1)\big[k(2k+1) + 6(k+1)\big]}{6}\\ &= \frac{(k+1)(2k^2 + 7k + 6)}{6} = \frac{(k+1)(k+2)(2k+3)}{6},\end{aligned}

which is the formula with n=k+1n = k+1. By induction the result holds for all n≥1n \ge 1.

∎
ProofEvery integer n≥2n \ge 2 is a product of primes (strong induction)

22 is prime. Assume every integer mm with 2≤m≤k2 \le m \le k is a product of primes. If k+1k+1 is prime we are done. Otherwise k+1=abk + 1 = ab with 2≤a,b≤k2 \le a, b \le k; each of a,ba, b is a product of primes by hypothesis, hence so is abab.

∎
ProofStrong induction follows from ordinary induction

Suppose P(n0)P(n_0) holds and, for each k≥n0k \ge n_0, the truth of P(n0),…,P(k)P(n_0), \dots, P(k) implies P(k+1)P(k+1). Let Q(n)Q(n) be the statement "P(n0),P(n0+1),…,P(n)P(n_0), P(n_0 + 1), \dots, P(n) are all true". Then Q(n0)Q(n_0) is P(n0)P(n_0), which holds; and if Q(k)Q(k) holds then P(k+1)P(k+1) holds by assumption, so Q(k+1)Q(k+1) holds. By ordinary induction Q(n)Q(n) is true for all n≥n0n \ge n_0, and in particular so is P(n)P(n). So strong induction is not a stronger axiom, only a more convenient way to use the same one (Q38, Q47, Q54).

∎
ProofInduction implies well-ordering

The formal definitions note shows that well-ordering implies induction. Conversely, suppose S⊆NS \subseteq \mathbb N has no least element. Let P(n)P(n): "none of 0,1,…,n0, 1, \dots, n is in SS". P(0)P(0) holds, since otherwise 00 would be the least element of SS. If P(k)P(k) holds and k+1∈Sk + 1 \in S, then k+1k + 1 would be the least element of SS; so k+1∉Sk + 1 \notin S and P(k+1)P(k + 1) holds. By induction no natural number is in SS: SS is empty. Hence every non-empty subset of N\mathbb N has a least element. The two principles are equivalent.

∎
ProofThe general divisibility template

Suppose f(n)=an+g(n)f(n) = a^n + g(n) and you want d∣f(n)d \mid f(n). Then f(k+1)−af(k)=g(k+1)−ag(k)f(k+1) - af(k) = g(k+1) - ag(k): the exponential always cancels, leaving something without ana^n that has to be checked for divisibility by dd. That is the move in Q21, Q28 and Q45. For two exponentials, f(n)=can+c′bnf(n) = ca^n + c'b^n, use f(k+1)−af(k)=c′(b−a)bkf(k+1) - af(k) = c'(b - a)b^k, so the step works whenever d∣c′(b−a)d \mid c'(b - a) (Q25, Q15, Q36).

∎

Step-by-step derivations

The divisibility template

To show f(n)f(n) is divisible by dd: assume f(k)=dmf(k) = dm. Express f(k+1)f(k+1) as c⋅f(k)+(something visibly divisible by d)c\cdot f(k) + (\text{something visibly divisible by } d).

Example6∣7n−16 \mid 7^n - 1

Assume 7k−1=6m7^k - 1 = 6m. Then 7k+1−1=7⋅7k−1=7(6m+1)−1=42m+6=6(7m+1)7^{k+1} - 1 = 7\cdot7^k - 1 = 7(6m + 1) - 1 = 42m + 6 = 6(7m + 1).

Matrix powers

For A=(1101)A = \begin{pmatrix}1 & 1\\0 & 1\end{pmatrix}, conjecture An=(1n01)A^n = \begin{pmatrix}1 & n\\ 0 & 1\end{pmatrix} and prove it by multiplying the assumed AkA^k by AA: (1k01)(1101)=(1k+101)\begin{pmatrix}1 & k\\0 & 1\end{pmatrix}\begin{pmatrix}1 & 1\\0&1\end{pmatrix} = \begin{pmatrix}1 & k+1\\0 & 1\end{pmatrix}.

Worked examples

ExampleAn inequality with a later base case

Claim: 2n>n22^n > n^2 for all n≥5n \ge 5. Base: 32>2532 > 25. Step: assume 2k>k22^k > k^2 with k≥5k \ge 5. Then 2k+1=2⋅2k>2k22^{k+1} = 2\cdot2^k > 2k^2, and 2k2≥(k+1)2  ⟺  k2−2k−1≥0  ⟺  (k−1)2≥22k^2 \ge (k+1)^2 \iff k^2 - 2k - 1 \ge 0 \iff (k-1)^2 \ge 2, which holds for k≥3k \ge 3. So 2k+1>(k+1)22^{k+1} > (k+1)^2.

The claim fails at n=2,3,4n = 2, 3, 4 (4=44 = 4, 8<98 < 9, 16=1616 = 16), so the base case must be n=5n = 5.

Common mistakes

Common mistakeAssuming what you want to prove

"Assume P(n)P(n) is true for all nn" is circular. Assume it for one arbitrary kk.

Common mistakeWorking backwards from P(k+1)P(k+1)

Starting with the P(k+1)P(k+1) equation and simplifying until you reach a true statement proves nothing unless every step is reversible. Start from one side and transform it into the other.

Common mistakeA step that silently needs a larger kk

In the "all horses are the same colour" fallacy, the step from kk to k+1k+1 uses two overlapping groups of kk horses. They only overlap when k≥2k \ge 2, so the step 1→21 \to 2 fails (question Q34).

Common mistakeOmitting the conclusion

Many mark schemes award a mark specifically for the concluding sentence.

Applications

  • Closed forms for sums and recurrences (complexity analysis of algorithms).
  • Correctness of recursive algorithms and loop invariants in computer science.
  • Formulae for AnA^n, which are used in Markov chains and linear recurrences.
  • nnth derivatives (see differentiation question Differentiation Q44) and De Moivre's theorem.
  • Structural induction over trees, formulas and data types in logic and programming.

Connections to other topics

Summary

  • Base case + (P(k) ⟹ P(k+1)) + conclusion = proof for all n≥n0n \ge n_0.
  • For sums, split off the last term; for divisibility, write f(k+1)f(k+1) in terms of f(k)f(k).
  • Choose the base case where the statement actually starts being true.
  • If the step won't go through, try strong induction or strengthen the statement.
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.

Where induction comes from: the Peano axioms (university)

What are the natural numbers? In 1889 Giuseppe Peano answered with a short list of axioms. There is a set N\mathbb N with an element 00 and a successor function SS (think S(n)=n+1S(n) = n + 1) such that:

  1. 00 is not the successor of anything;
  2. SS is injective: S(m)=S(n)S(m) = S(n) implies m=nm = n;
  3. (the induction axiom) if a subset A⊆NA \subseteq \mathbb N contains 00 and contains S(n)S(n) whenever it contains nn, then A=NA = \mathbb N.

So induction is not a theorem about the natural numbers: it is part of what "natural number" means. Axiom 3 says that N\mathbb N has nothing in it except what you can reach from 00 by repeatedly adding 11.

Addition and multiplication are then defined by recursion: m+0=mm + 0 = m, m+S(n)=S(m+n)m + S(n) = S(m + n); and m⋅0=0m \cdot 0 = 0, m⋅S(n)=m⋅n+mm \cdot S(n) = m\cdot n + m. Every familiar law must then be proved, by induction.

TheoremAddition is commutative

For all m,n∈Nm, n \in \mathbb N, m+n=n+mm + n = n + m.

Proof

Lemma 1: 0+n=n0 + n = n. By induction on nn: 0+0=00 + 0 = 0, and if 0+n=n0 + n = n then 0+S(n)=S(0+n)=S(n)0 + S(n) = S(0 + n) = S(n).

Lemma 2: S(m)+n=S(m+n)S(m) + n = S(m + n). By induction on nn: for n=0n = 0 both sides are S(m)S(m). If it holds for nn, then S(m)+S(n)=S(S(m)+n)=S(S(m+n))=S(m+S(n))S(m) + S(n) = S(S(m) + n) = S(S(m + n)) = S(m + S(n)).

Main result, by induction on nn: m+0=m=0+mm + 0 = m = 0 + m by Lemma 1. If m+n=n+mm + n = n + m, then m+S(n)=S(m+n)=S(n+m)=S(n)+mm + S(n) = S(m + n) = S(n + m) = S(n) + m by Lemma 2. ■\blacksquare

∎

It took three inductions to prove m+n=n+mm + n = n + m. Associativity, distributivity and the commutativity of multiplication follow in the same way; Edmund Landau's book Foundations of Analysis (1930) builds all of arithmetic, then the rationals, reals and complex numbers, from these axioms.

IntuitionWhy axiom 3 is needed

Without it, N\mathbb N could contain "extra" numbers that are never reached from 00: for example a second copy of the integers, …,a−1,a,a+1,…\dots, a - 1, a, a + 1, \dots, sitting beyond all the ordinary numbers. Such non-standard models really exist when the induction axiom is weakened to the first-order version (Skolem, 1934), and statements can be true in the standard natural numbers yet unprovable from the weaker axioms: this is one face of Gödel's incompleteness theorem.

Solving linear recurrences (university)

Induction proves formulae like un=3n−2nu_n = 3^n - 2^n (Q47), but where do they come from? For linear recurrences with constant coefficients there is a complete method.

TheoremSecond-order linear recurrences

Let un+2=pun+1+qunu_{n+2} = pu_{n+1} + qu_n and suppose the characteristic equation x2=px+qx^2 = px + q has distinct roots α\alpha and β\beta. Then there are constants AA, BB (fixed by u0u_0 and u1u_1) with

un=Aαn+Bβnfor all n≥0.u_n = A\alpha^n + B\beta^n\quad\text{for all } n \ge 0.

If instead α\alpha is a repeated root, un=(A+Bn)αnu_n = (A + Bn)\alpha^n.

Proof

Choose AA, BB so that the formula is right for n=0n = 0 and n=1n = 1: this needs A+B=u0A + B = u_0 and Aα+Bβ=u1A\alpha + B\beta = u_1, which has a unique solution since α≠β\alpha \ne \beta. Now use induction with two base cases. If the formula holds for n=kn = k and n=k+1n = k + 1, then

uk+2=p(Aαk+1+Bβk+1)+q(Aαk+Bβk)=Aαk(pα+q)+Bβk(pβ+q)=Aαk+2+Bβk+2,u_{k+2} = p(A\alpha^{k+1} + B\beta^{k+1}) + q(A\alpha^k + B\beta^k) = A\alpha^k(p\alpha + q) + B\beta^k(p\beta + q) = A\alpha^{k+2} + B\beta^{k+2},

since α2=pα+q\alpha^2 = p\alpha + q and β2=pβ+q\beta^2 = p\beta + q. ■\blacksquare

∎
ExampleBinet's formula

For the Fibonacci numbers, x2=x+1x^2 = x + 1 has roots φ=1+52\varphi = \frac{1 + \sqrt5}{2} and ψ=1−52\psi = \frac{1 - \sqrt5}{2}. With F0=0F_0 = 0, F1=1F_1 = 1: A+B=0A + B = 0 and Aφ+Bψ=1A\varphi + B\psi = 1, so A=−B=15A = -B = \frac{1}{\sqrt5} and

Fn=φn−ψn5.F_n = \frac{\varphi^n - \psi^n}{\sqrt5}.

Irrational numbers combine to give integers every time. Since ∣ψ∣<1|\psi| < 1, FnF_n is simply the nearest integer to φn5\frac{\varphi^n}{\sqrt5}, and the ratio Fn+1Fn→φ\frac{F_{n+1}}{F_n} \to \varphi, the golden ratio.

IntuitionThe matrix view

Writing the recurrence as (un+1un)=(pq10)(unun−1)\begin{pmatrix}u_{n+1}\\u_n\end{pmatrix} = \begin{pmatrix}p & q\\1 & 0\end{pmatrix}\begin{pmatrix}u_n\\u_{n-1}\end{pmatrix} turns it into a matrix power (Q39). The characteristic equation is exactly the eigenvalue equation of that matrix, and Aαn+BβnA\alpha^n + B\beta^n is what you get by diagonalising it. The same method solves linear differential equations, where eλxe^{\lambda x} plays the role of αn\alpha^n.

Sums of powers and the Bernoulli numbers (university)

The formulae for ∑r\sum r, ∑r2\sum r^2, ∑r3\sum r^3 and ∑r4\sum r^4 (Q60) follow a pattern. In general Sk(n)=∑r=1nrkS_k(n) = \sum_{r=1}^n r^k is a polynomial in nn of degree k+1k + 1 with leading term nk+1k+1\frac{n^{k+1}}{k+1}, which is the integral ∫0nxk dx\int_0^n x^k\,dx; the remaining terms are corrections.

TheoremExistence (by strong induction on kk)

For every k≥0k \ge 0, Sk(n)S_k(n) is a polynomial in nn of degree k+1k + 1, with leading coefficient 1k+1\frac{1}{k+1}.

Proof

True for k=0k = 0: S0(n)=nS_0(n) = n. Assume it for all powers below kk. Telescoping as in Q60,

(n+1)k+1−1=∑r=1n[(r+1)k+1−rk+1]=∑j=0k(k+1j)Sj(n)=(k+1)Sk(n)+∑j=0k−1(k+1j)Sj(n).\begin{aligned}(n+1)^{k+1} - 1 &= \sum_{r=1}^n\left[(r+1)^{k+1} - r^{k+1}\right] = \sum_{j=0}^{k}\binom{k+1}{j}S_j(n)\\ &= (k+1)S_k(n) + \sum_{j=0}^{k-1}\binom{k+1}{j}S_j(n).\end{aligned}

By hypothesis the last sum is a polynomial of degree at most kk, so Sk(n)=1k+1[(n+1)k+1−1−(degree≤k)]S_k(n) = \frac{1}{k+1}\left[(n+1)^{k+1} - 1 - (\text{degree} \le k)\right], a polynomial of degree k+1k + 1 with leading coefficient 1k+1\frac{1}{k+1}. ■\blacksquare

∎
TheoremFaulhaber's formula
∑r=1nrk=1k+1∑j=0k(k+1j)Bj nk+1−j,\sum_{r=1}^{n} r^k = \frac{1}{k+1}\sum_{j=0}^{k}\binom{k+1}{j}B_j\,n^{k+1-j},

where the Bernoulli numbers B0=1B_0 = 1, B1=12B_1 = \frac12, B2=16B_2 = \frac16, B3=0B_3 = 0, B4=−130B_4 = -\frac1{30}, B5=0B_5 = 0, B6=142,…B_6 = \frac1{42}, \dots are defined by t1−e−t=∑j≥0Bjtjj!\frac{t}{1 - e^{-t}} = \sum_{j \ge 0} B_j\frac{t^j}{j!}.

Check with k=2k = 2: 13(n3+3⋅12n2+3⋅16n)=n33+n22+n6=n(n+1)(2n+1)6\frac13\left(n^3 + 3\cdot\frac12n^2 + 3\cdot\frac16n\right) = \frac{n^3}{3} + \frac{n^2}{2} + \frac n6 = \frac{n(n+1)(2n+1)}{6} ✓. And k=4k = 4 gives n55+n42+n33−n30\frac{n^5}{5} + \frac{n^4}{2} + \frac{n^3}{3} - \frac{n}{30}, which factorises to the answer of Q60.

IntuitionAda Lovelace's program

In 1843 Ada Lovelace published an algorithm for computing Bernoulli numbers on Charles Babbage's (never built) Analytical Engine, now often called the first computer program. The Bernoulli numbers reappear across mathematics: in the Euler–Maclaurin formula relating sums to integrals, in the values ζ(2k)=(−1)k+1(2π)2kB2k2(2k)!\zeta(2k) = \frac{(-1)^{k+1}(2\pi)^{2k}B_{2k}}{2(2k)!} (so ζ(2)=π26\zeta(2) = \frac{\pi^2}{6}, the limit behind Q51), and in Kummer's work on Fermat's Last Theorem.

Why does this work?

Why does this work?Why is induction valid?

It is equivalent to the well-ordering principle: every non-empty set of positive integers has a least element. If the statement failed for some nn, take the smallest failure mm. The base case shows m≠1m \ne 1, so m−1m - 1 is a positive integer where it holds, and the inductive step then forces it to hold at mm: a contradiction.

Beyond the syllabus

Beyond the syllabusStrong induction and transfinite induction

Strong induction assumes the result for all k<nk < n to prove it for nn, which is how one proves every integer n≥2n \ge 2 is a product of primes. Beyond the integers, transfinite induction works along well-ordered infinite sequences (the ordinals), and structural induction proves properties of recursively defined objects such as trees and formulas in computer science.

Mathematical curiosities

ParadoxAll horses are the same colour

"Proof": one horse is one colour. Given n+1n + 1 horses, the first nn share a colour and the last nn share a colour, and these groups overlap, so all n+1n + 1 match. The flaw: when n=1n = 1, the groups {1}\{1\} and {2}\{2\} do not overlap. The inductive step fails from 11 to 22.

Unsolved problemThe Collatz conjecture

Start with any positive integer. If even, halve it; if odd, take 3n+13n + 1. Does every starting number eventually reach 1? Checked for all numbers below 2682^{68}, but unproved. Paul Erdős said: "Mathematics may not be ready for such problems."

Further exploration

Further explorationInvestigations
  • Prove by induction that nn lines in general position divide the plane into n2+n+22\frac{n^2 + n + 2}{2} regions.
  • Prove Bernoulli's inequality (1+x)n≥1+nx(1 + x)^n \ge 1 + nx for x≥−1x \ge -1.
Now practise60 questions from Very easy to Extreme →