Induction
Example #1: Using induction, we'll prove that $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$ (we presented this formula on slide 62 of Topic 2.)
Proof:
- Base case: The first number that we are summing is $1$, so the base case will show that the formula is true for $n = 1$. By plugging $n = 1$ into both sides of the formula, we get: $\sum_{i=1}^{n} i \;$$= \sum_{i=1}^{1} i \;$$= 1 \;$$= \frac{1(1+1)}{2}$.
- Inductive hypothesis: We assume that the formula is true for some $n = k$. That is, we assume that $\sum_{i=1}^{k} i \;$$= \frac{k(k+1)}{2}$. Note that the inductive hypothesis part doesn't need any proof: it's just an assumption that we explicitely make.
- Inductive step: We'll now prove that the formula is true also for $n = k+1$. We notice that $\sum_{i=1}^{k+1} i \;$$= \left(\sum_{i=1}^{k} i\right) + (k+1) \;$$= \frac{k(k+1)}{2} + (k+1) \;$ [According to the inductive hypothesis] $= \frac{(k+1)(k+2)}{2}$.
According to our proof by induction above, we showed that $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$ is true for any $n \ge 1$.◼