Mathematical Induction
To prove something for every n ≥ 1, you don't check infinitely many cases. You show it's true for n = 1, and that being true for any n = k forces it to be true for n = k + 1. Like dominoes: the first one falls, and each one knocks over the next, so they all go down.
What the symbols mean
- Last term
How many integers are added.
Explanation
Mathematical induction is simply a way to prove that something is true for every whole number by showing just two things: it's true for the first one, and each one passes the truth along to the next. The name borrows from everyday "inductive reasoning," going from particular cases to a general rule, but don't let that fool you: guessing a rule from a pattern isn't a proof, and mathematical induction is a full, airtight proof. It's how you nail down formulas for sums, the running time of algorithms and anything else built up one step at a time. The formula above looks like a lot, but it's just (add up the whole numbers from 1 to ) on one side and (a shortcut that gives the same answer) on the other. Induction is how we'll show the shortcut never fails.
Direct proof and contradiction handle one statement at a time. But "" is really infinitely many statements, one for each , and you can't check them all. Here's the way around it.
Structure of an induction proof of " is true for all ":
- Base case: check .
- Inductive hypothesis: assume for an arbitrary .
- Inductive step: use that assumption to prove .
Example: . For both sides are 1. Assume . The sum up to is the sum up to with one more term on the end, so the assumption does most of the work:
which is the formula with . Done.
A common mistake. It's tempting to think the inductive step is cheating, because you assume the very formula you're trying to prove. It isn't. You never assume for all ; you prove an implication, , the "if ... then" from the logic unit. On its own that proves nothing, like a row of dominoes nobody has pushed. Together with the base case, though, the chain reaches every .
Two other ways induction goes wrong: skipping the base case (the dominoes never start), or an inductive step that secretly fails for small . The famous "all horses are the same color" fake proof breaks exactly that way, going from 1 to 2.
See it
Worked examples
Prove by induction that .
- 1
Base case: gives , so the first domino falls.
Practice
Type your answer and check it. Solve them all to complete the lesson.
Use the formula: ?
In the inductive step for , which term do you add to both sides?
?
Prove by induction that for all .
A game gives you 1 coin on day 1, 3 on day 2, 5 on day 3, and so on through the odd numbers. Induction proves the total after days is . On which day does the total first pass 1000 coins?
Induction also proves . Use it to find .
The hardest one here. Get it, and you've got this lesson.
To prove by induction that 3 divides for every , the inductive step looks at the difference . Simplify it, as an expression in .
Where it's used
Programmers prove loops correct with induction: the loop invariant is the inductive hypothesis, and each pass through the loop is an inductive step.