∑ Basic Mathematics

Menu and settings

Sound
Comfort
Companion color
Theme
Reading panel
Graphics quality

Part IV — Miscellaneous · Chapter 15

Induction and Summations

How do you prove something about every positive integer, when there are infinitely many of them and you have finite time? You prove the first case, and you prove that each case drags the next one along behind it.

A puzzle to carry through the chapter

Write $0.999\ldots$, with the nines going on forever. Is that number less than $1$, or equal to $1$?

  • A tiny bit less than $1$
  • Exactly equal to $1$
  • It depends how far you take it

People argue about this one. Section 15.3 turns the argument into a calculation.

By the end of this chapter you can write and check a proof by induction, identify where the inductive hypothesis is used, read and manipulate sigma notation, derive and apply the standard sums, and sum a geometric series both for finite $n$ and — when $|r| < 1$ — in the limit.
Before you start

You should be comfortable with proofs about all integers at once (Chapter 1) and with implication and quantifiers (the Interlude). Induction is a claim about an infinite chain of implications, so the shape of an implication has to be clear first.

Three quick ones from earlier chapters, to wake up what this chapter stands on. They are not scored. If one doesn't come to you, its solution says where to look.

To disprove a statement of the form “for every $n$, $S(n)$”, what is enough?

  • One counterexample.
  • A counterexample for each $n$.
  • Checking the first hundred cases.

Answer: one counterexample

A single $n$ for which $S(n)$ fails — the Interlude. Proving the statement is the hard direction, and this chapter gives a method for it.

Factor: $\dfrac{n(n+1)}{2} + (n+1) = (n+1) \cdot \dfrac{\;?\;}{2}$. What goes in place of the question mark?

Answer: $n + 2$

$\dfrac{n(n+1)}{2} + (n+1) = (n+1)\left(\dfrac n2 + 1\right) = (n+1) \cdot \dfrac{n+2}{2}$ — distributivity read backwards, §1.3. This exact step is the heart of the first induction proof below.

Simplify $2 \cdot 2^{n}$ to a single power of $2$. What is the exponent?

Answer: $n + 1$

$2^1 \cdot 2^n = 2^{n+1}$ — §3.5.

15.1 Induction

Suppose that for each positive integer $n$ there is a statement $S(n)$ — for instance, "$1 + 2 + \dots + n = \tfrac{n(n+1)}{2}$". We want to prove all of them.

The principle of induction

Suppose that

  1. Base case. $S(1)$ is true; and
  2. Inductive step. for every $n$, if $S(n)$ is true then $S(n+1)$ is true.

Then $S(n)$ is true for every positive integer $n$.

The image everyone uses is a row of dominoes: knock over the first, and make sure each one is close enough to topple its neighbor. Both parts are needed, and neither is enough alone. The statement "$n = n+1$" satisfies the inductive step perfectly — if $n = n+1$ then adding $1$ gives $n+1 = n+2$ — and is false throughout, because the base case fails. The dominoes are well placed; nobody pushed the first one.

Example 1. The sum of the first $n$ integers

Prove that $1 + 2 + \dots + n = \dfrac{n(n+1)}{2}$ for every $n \ge 1$.

  1. Base case. For $n=1$ the left side is $1$ and the right side is $\frac{1\cdot2}{2} = 1$. ✓
  2. Inductive step. Assume the formula holds for some $n$ — this assumption is the inductive hypothesis. We must deduce it for $n+1$.
  3. The sum to $n+1$ is the sum to $n$ plus one more term, and here the hypothesis enters: $$\underbrace{1 + \dots + n}_{= \frac{n(n+1)}{2}} + (n+1) = \frac{n(n+1)}{2} + (n+1).$$
  4. Factor out $(n+1)$: $$(n+1)\left(\frac n2 + 1\right) = (n+1)\cdot\frac{n+2}{2} = \frac{(n+1)(n+2)}{2}.$$
  5. That is exactly the formula with $n+1$ in place of $n$. Base case plus inductive step, so the formula holds for every $n$. $\blacksquare$

In the inductive step you assume $S(n)$. What must you then prove?

  • $S(n+1)$
  • $S(1)$
  • $S(n)$ again, by a different route
  • $S(2n)$

Answer: $S(n+1)$

$S(n+1)$ — the very next case, and nothing more. Together with the base case that is enough: $S(1)$ gives $S(2)$, which gives $S(3)$, and so on without end.

Induction proves, it does not discover

Notice that the proof verified a formula someone already had. Induction is a checking machine: it will confirm a correct guess and refuse a wrong one, but it will not hand you the guess. Gauss's trick does that here — pair the sum $1+2+\dots+n$ with itself written backwards, so each of the $n$ columns totals $n+1$, giving $2S = n(n+1)$.

Where the formula comes from. The staircase has $1, 2, \dots, n$ blocks in its columns. A second copy, turned over, fits on top to make a rectangle $n$ wide and $n + 1$ tall. Twice the sum is $n(n+1)$ — no induction needed to find the formula, only to be certain of it.
Where the hypothesis must appear

In any honest inductive step there is one moment where you use the assumption for $n$ — in Example 1, replacing $1+\dots+n$ by $\frac{n(n+1)}2$. If you write out a step and find you never used it, you have either proved something stronger directly or made a mistake. Point at the moment of use; it is the thing a grader and a reader both look for.

Wrong turn. A perfect inductive step with nothing under it

“Prove” that $n^2 + n$ is odd for every positive integer $n$.

  1. The tempting move. Go straight to the inductive step. Assume $n^2 + n$ is odd.
  2. Then $(n+1)^2 + (n+1) = n^2 + 2n + 1 + n + 1 = (n^2 + n) + 2(n+1)$. That is an odd number plus an even number, which is odd. So the statement for $n$ gives the statement for $n + 1$, and the proof seems complete.
  3. The check. Try $n = 1$: $1 + 1 = 2$, which is even. Try $n = 2$: $4 + 2 = 6$, even again. The statement is false every single time.
  4. Why. The inductive step is correct — if the statement held for some $n$, it really would hold for the next. But it never holds anywhere, because no base case was checked. The dominoes are perfectly spaced and none was ever pushed.
  5. The repair. The truth is the opposite: $n^2 + n = n(n+1)$ is a product of two consecutive integers, one of which is even, so it is always even. $\blacksquare$

The base case usually takes one line and feels like a formality. This is what the formality is protecting you from.

Your turn, with help. The sum of the odd numbers

Prove that $1 + 3 + 5 + \dots + (2n - 1) = n^2$ for every $n \ge 1$. Try each step before opening it.

  1. Base case. For $n = 1$ the left side is $1$ and the right side is $1^2 = 1$ ✓.
  2. Set up the inductive step

    Assume $1 + 3 + \dots + (2n-1) = n^2$. The next odd number after $2n - 1$ is $2n + 1$, so we must show that adding it gives $(n+1)^2$.

  3. Use the hypothesis

    $\underbrace{1 + 3 + \dots + (2n-1)}_{=\,n^2} + (2n+1) = n^2 + 2n + 1$.

  4. Finish

    $n^2 + 2n + 1 = (n+1)^2$, by the key expansion of Chapter 1. That is the statement for $n + 1$. $\blacksquare$

Geometrically: an $n \times n$ square grows into an $(n+1) \times (n+1)$ square by adding an L-shaped border of $2n + 1$ blocks.

Put these lines in order to prove that $1 + 2 + \dots + n = \dfrac{n(n+1)}{2}$ for every $n \ge 1$.

  1. Base case: for $n = 1$ both sides equal $1$.
  2. Inductive hypothesis: suppose $1 + 2 + \dots + k = \dfrac{k(k+1)}{2}$ for some $k \ge 1$.
  3. Add $k + 1$ to both sides: $1 + \dots + k + (k+1) = \dfrac{k(k+1)}{2} + (k + 1)$.
  4. The right side equals $\dfrac{(k+1)(k+2)}{2}$, which is the formula for $n = k + 1$.
  5. So by induction the formula holds for every $n \ge 1$.

The order shown is the proof

The hypothesis is used exactly once, to replace $1 + \dots + k$. Everything after that is algebra.

15.2 Summations

Writing $1 + 2 + \dots + n$ is fine until the terms get complicated. The compact notation is

$$\sum_{k=1}^{n} a_k = a_1 + a_2 + \dots + a_n.$$

Here $k$ is the index, running over the integers from the bottom limit to the top one. The index is a dummy: $\sum_{k=1}^{n} k^2$ and $\sum_{j=1}^{n} j^2$ are the same number, just as the $x$ in $f(x) = x^2$ could have been anything.

Two rules, and three sums

$$\sum_{k=1}^{n}(a_k + b_k) = \sum_{k=1}^{n}a_k + \sum_{k=1}^{n}b_k, \qquad \sum_{k=1}^{n} c\,a_k = c\sum_{k=1}^{n}a_k.$$ And three standard results: $$\sum_{k=1}^{n} 1 = n, \qquad \sum_{k=1}^{n} k = \frac{n(n+1)}{2}, \qquad \sum_{k=1}^{n} k^{2} = \frac{n(n+1)(2n+1)}{6}.$$

The two rules are just the commutative and distributive laws of Chapter 1, applied to a long but finite sum. What you may not do is pull a sum through a product: $\sum a_kb_k$ is not $\left(\sum a_k\right)\left(\sum b_k\right)$, as $1\cdot1 + 2\cdot2 = 5$ against $(1+2)(1+2) = 9$ makes clear.

The second standard sum came from fitting two staircases into a rectangle in §15.1. The third comes the same way, one dimension up. Stack squares of cubes, $1^2, 2^2, \dots, n^2$, into a stepped pyramid; it holds $\sum_{k=1}^{n} k^2$ cubes. Copies of it fit together into a box, and a box is easy to count.

A pyramid with layers $1^2$, $2^2$ and $3^2$ holds $1 + 4 + 9 = 14$ cubes. Six copies fit together, with no gaps, into a box $3$ wide and $4$ tall. How long is the box?Decide, then open

Seven. The box holds six pyramids, $6 \times 14 = 84$ cubes, and each slice across it has $3 \times 4 = 12$, so there are $84 \div 12 = 7$ slices. The figure below shows how the pieces go together.

Where the $6$ comes from. Choose three copies and fit them together: they make a block with a staircase of cubes on one side. Choose six, and the other three make the same block turned over; its staircase fills the gaps in the first one, so the two blocks share a single layer, the rectangle of two staircases from §15.1 (look at a block of three from the end to see it). Six pyramids fill the box exactly, so six times the sum is the volume of the box. Drag the picture to turn it.

Six pyramids with layers $1^2, 2^2, \dots, 6^2$, one size past the largest in the figure above. Set $n = 6$ and the three sides of the box they fill exactly.

Answer: $n = 6$ and a box $6 \times 7 \times 13$

Each block of three pyramids is $6$ wide and $7$ tall: six full layers of $6 \times 7$ cubes, and a staircase layer of $1 + 2 + \dots + 6 = 21$. The second block is the first one turned over, and its staircase fills the gaps in the first, so the two staircases make one layer between them. The long side is $6 + 1 + 6 = 13$. The box holds $6 \times 7 \times 13 = 546$ cubes, six pyramids' worth, so one pyramid holds $546 \div 6 = 91 = 1 + 4 + 9 + 16 + 25 + 36$.

The same count for any $n$ gives sides $n$, $n + 1$ and $n + 1 + n = 2n + 1$, so $6\sum_{k=1}^{n} k^2 = n(n+1)(2n+1)$: the formula above.

Example 2. Using the standard sums

Compute $\displaystyle\sum_{k=1}^{20} (3k^2 - 2k + 4)$.

  1. Split the sum and pull out the constants: $$3\sum_{k=1}^{20}k^2 \;-\; 2\sum_{k=1}^{20}k \;+\; \sum_{k=1}^{20}4.$$
  2. $\sum k^2 = \frac{20\cdot21\cdot41}{6} = 2870$.
  3. $\sum k = \frac{20\cdot21}{2} = 210$.
  4. $\sum 4 = 4\times20 = 80$. A constant summed $n$ times is $cn$ — not $c$.
  5. Total: $3(2870) - 2(210) + 80 = 8610 - 420 + 80 = 8270$. $\blacksquare$

Compute $\displaystyle\sum_{k=1}^{10} (2k + 1)$.

Answer: $120$

$2\sum_{k=1}^{10} k + \sum_{k=1}^{10} 1 = 2 \cdot 55 + 10 = 120$. The constant $1$, summed ten times, contributes $10$.

15.3 Geometric series

A geometric sum is one where each term is a fixed multiple of the one before:

$$S_n = 1 + r + r^2 + \dots + r^{n} = \sum_{k=0}^{n} r^{k}.$$

There is a closed form, and the derivation is a trick worth keeping.

Let $S = 1 + 2 + 4 + 8$. Write out $2S$ term by term underneath it. What is left when you subtract $S$ from $2S$?Write both out, then open

$2S = 2 + 4 + 8 + 16$. The terms $2$, $4$, $8$ appear in both and cancel, leaving $2S - S = 16 - 1$, so $S = 15$. Multiplying by the ratio shifts the whole sum along by one place, and that is the entire trick. The example below does it with $r$ in place of $2$.

Example 3. Summing it, by subtraction

Find a closed form for $S_n = 1 + r + \dots + r^n$, assuming $r \neq 1$.

  1. Multiply through by $r$: $$rS_n = r + r^2 + \dots + r^{n} + r^{n+1}.$$
  2. Subtract. Almost everything cancels — the two sums share every term but the first of one and the last of the other: $$S_n - rS_n = 1 - r^{n+1}.$$
  3. Factor the left side: $S_n(1-r) = 1 - r^{n+1}$.
  4. Divide by $1-r$, legal since $r\neq1$: $$\boxed{\;S_n = \frac{1-r^{n+1}}{1-r}\;}$$ $\blacksquare$

At $r = 1$ the formula is $0/0$ and the sum is simply $n+1$, every term being $1$. The excluded case is excluded for a reason.

Use the closed form to compute $1 + 3 + 9 + 27 + 81$.

Answer: $121$

$\dfrac{1 - 3^{5}}{1 - 3} = \dfrac{1 - 243}{-2} = \dfrac{-242}{-2} = 121$. Adding directly: $1 + 3 + 9 + 27 + 81 = 121$ ✓.

Now let $n$ grow. If $|r| < 1$ then $r^{n+1}$ shrinks toward $0$ — each multiplication by $r$ makes it smaller — so the partial sums close in on a single number:

The infinite geometric series

For $|r| < 1$, $$1 + r + r^2 + r^3 + \dots = \frac{1}{1-r}.$$ For $|r| \ge 1$ the terms do not shrink and the sum has no limit.

Partial sums closing in. Each bar is one more term added. With $|r| < 1$ they settle against the dashed line at $1/(1-r)$; push $r$ past $1$ and they escape upward, while a negative $r$ makes them oscillate on their way in.

What is $1 + \tfrac14 + \tfrac1{16} + \tfrac1{64} + \dots$?

Answer: $\tfrac43$

$r = \tfrac14$, so the sum is $\dfrac{1}{1 - \frac14} = \dfrac{1}{3/4} = \dfrac43$.

$0.999\ldots = 1$, settled

The decimal $0.999\dots$ means $\frac9{10} + \frac9{100} + \frac9{1000} + \dots$, which is $\frac9{10}$ times a geometric series with $r = \frac1{10}$: $$\frac{9}{10}\cdot\frac{1}{1 - \frac1{10}} = \frac{9}{10}\cdot\frac{10}{9} = 1.$$ Not "nearly $1$" and not "$1$ by convention" — the infinite decimal is defined as the limit of its partial sums, and that limit is exactly $1$.

Example 4. An inequality by induction

Prove that $2^n > n$ for every positive integer $n$.

  1. Base case. $n=1$: $2^1 = 2 > 1$ ✓.
  2. Inductive step. Assume $2^n > n$.
  3. Then $2^{n+1} = 2\cdot 2^n > 2n$, using the hypothesis.
  4. And $2n \ge n+1$ whenever $n \ge 1$, since $2n - (n+1) = n - 1 \ge 0$.
  5. Chaining: $2^{n+1} > 2n \ge n+1$, which is the statement for $n+1$. $\blacksquare$

Induction is not only for equalities. The pattern is identical: establish the first case, then show each case forces the next.

$1 + 3 + 9 + 27 = \dfrac{3^n - 1}{3 - 1}$ with $n = {}$ , which comes to .

Answer: $n = 4$, sum $40$

$\dfrac{3^4 - 1}{2} = \dfrac{80}{2} = 40$, and indeed $1 + 3 + 9 + 27 = 40$.

Practice

Give numerical answers as exact numbers or fractions.

Compute $1 + 2 + 3 + \dots + 100$.

Answer: $5050$

$\dfrac{100 \times 101}{2} = 5050$. This is the sum the young Gauss is said to have done in his head, by pairing $1$ with $100$, $2$ with $99$, and so on — fifty pairs each totaling $101$.

Compute $\displaystyle\sum_{k=1}^{10} k^{2}$.

Answer: $385$

$\dfrac{10 \times 11 \times 21}{6} = \dfrac{2310}{6} = 385$.

Rough check: the average of $1, 4, 9, \ldots, 100$ is a bit under $40$, and there are ten terms — so a few hundred is the right size.

What is $1 + \tfrac12 + \tfrac14 + \tfrac18 + \dots$?

Answer: $2$

$\dfrac{1}{1-\frac12} = 2$. Each term covers half of the remaining distance to $2$, so the partial sums $1, 1.5, 1.75, 1.875, \dots$ approach $2$ without ever reaching it.

Compute $1 + 2 + 4 + 8 + 16$.

Answer: $31$

By the formula with $r = 2$ and $n = 4$: $\dfrac{1-2^5}{1-2} = \dfrac{-31}{-1} = 31$. Directly: $1+2+4+8+16 = 31$ ✓.

The general pattern $2^{n+1} - 1$ is why $m$ binary digits reach exactly $2^m - 1$.

A student "proves" $n = n+1$ by noting that if $n = n+1$ then adding $1$ gives $n+1 = n+2$. What is wrong?

  • The inductive step is invalid.
  • There is no base case — no value of $n$ where the statement is known true.
  • Induction only works for statements about sums.
  • The statement should have been checked for negative $n$ as well.

Answer: there is no base case

The inductive step really is valid: the implication "if $n = n+1$ then $n+1=n+2$" is true. But an implication tells you nothing until you know its hypothesis holds somewhere — the point the interlude in Part I made about implication and its converse.

The dominoes are perfectly spaced, and nobody ever pushed the first.

What is $1 + \tfrac13 + \tfrac19 + \tfrac1{27} + \dots$?

Answer: $\tfrac32$

$\dfrac{1}{1-\frac13} = \dfrac{1}{\frac23} = \dfrac32$.

Compute $\displaystyle\sum_{k=1}^{5} (2k - 1)$.

Answer: $25$

$2\sum_{k=1}^{5}k - \sum_{k=1}^{5}1 = 2(15) - 5 = 25$. Directly: $1+3+5+7+9 = 25$.

The first $n$ odd numbers always sum to $n^2$ — which is worth a moment: a square of side $n$ can be built from $n$ L-shaped strips of sizes $1, 3, 5, \dots$

In an inductive step, what role does the inductive hypothesis play?

  • It is what you are trying to prove, so it may not be assumed.
  • It replaces the base case.
  • It is assumed true for $n$ and used to derive the statement for $n+1$.
  • It must be verified separately for each $n$.

Answer: assumed for $n$, used to derive $n+1$

You are not assuming what you set out to prove. What is being proved is the implication $S(n) \Rightarrow S(n+1)$, and the standard way to prove an implication is to assume the hypothesis and derive the conclusion.

If you finish an inductive step without ever having used $S(n)$, something is wrong — or you have proved the result directly and do not need induction.

Compute $\displaystyle\sum_{k=5}^{10} k$.

Answer: $45$

$\sum_{k=1}^{10}k - \sum_{k=1}^{4}k = 55 - 10 = 45$. Directly: $5+6+7+8+9+10 = 45$ ✓.

Shifting the lower limit is the most common source of off-by-one errors here. Subtract the sum up to one below the new starting point — up to $4$, not up to $5$.

For which $r$ does the infinite series $1 + r + r^2 + \dots$ have a finite sum?

  • Every $r$.
  • Exactly when $|r| < 1$.
  • Exactly when $r > 0$.
  • Exactly when $r$ is rational.

Answer: exactly when $|r| < 1$

The partial sum is $\frac{1-r^{n+1}}{1-r}$, and this settles down only if $r^{n+1}\to0$, which happens precisely when $|r| < 1$. At $r = 1$ the sum is $n+1$ and grows without bound; at $r = -1$ the partial sums alternate $1, 0, 1, 0, \dots$ and never settle.

Recap

Back to the puzzle

Exactly equal. $0.999\ldots$ means the sum $\frac{9}{10} + \frac{9}{100} + \frac{9}{1000} + \dots$, a geometric series with first term $\frac{9}{10}$ and ratio $\frac{1}{10}$. Its sum is $\frac{9}{10} \cdot \frac{1}{1 - 1/10} = 1$. Every finite stretch of nines falls short of $1$ — but the infinite decimal is defined as the limit of those stretches, and the limit is $1$. One number, two names.

  • Induction proves $S(n)$ for all $n$ from two ingredients: a base case, and $S(n)\Rightarrow S(n+1)$. Drop either and it collapses.
  • The inductive hypothesis must actually be used somewhere in the step — find the moment and point at it.
  • Sigma notation packages a long sum; sums split over addition and let constants out, but never distribute over products.
  • $\sum k = \frac{n(n+1)}2$ and $\sum k^2 = \frac{n(n+1)(2n+1)}6$ are worth knowing.
  • $1+r+\dots+r^n = \frac{1-r^{n+1}}{1-r}$, and for $|r|<1$ the infinite sum is $\frac1{1-r}$ — which is what makes $0.999\dots$ equal to $1$.