Example: Prove by induction that 1+2+3+...+n = n(n+1)/2 for all positive integers, n.
If n=1,
LHS=1
RHS=1(1+1)/2
=2/2
=1
.'. the statement is true for n=1
Now we assume that the statement is true for n=k, where k is some random positive integer. In other words, we asssume that
1+2+3+...+k =
k(k+1)/2
We want to show that the statement is true for n=k+1 because k+1 is the next integer after k. In the same way 3 is the integer right after 2 and 12 is the integer right after 11, but we use k+1 and k as a general case when proving the statement.
So we want to prove the statement is true for n=k+1, so we substitute n=k+1 into the original statement. For the left side of the statement, we originally had
1+2+3+...+n, which is the sum of all the integers from 1 to n. We want to find the sum of the integers from 1 to k+1 so we write
1+2+3+...+ k + (k+1), which is an expression for the sum of all the integers from 1 to k+1.
On the right side of the equation, we originally had n(n+1)/2, which was what the sum of the integers from 1 to n was equal to. But we want the RHS to be an expression for the sum of all the integers from 1 to k+1, so instead of using n, we substitute k+1:
(k+1)([k+1] + 1)/2 = (k+1)(k+2)/2
Putting it together, we are required to prove that for n=k+1:
1+2+3+...+ k + (k+1) =
(k+1)(k+2)/2
So we start with LHS:
LHS=
1+2+3+...+ k + (k+1)
We stop here momentarily, observing that the highlighted bit in red is
identical to what we had assumed previously (above). Since we assumed that the statement is true for n=k, we can use this in our proof for n=k+1 by substituting the assumption:
LHS=
1+2+3+...+ k + (k+1)
=
k(k+1)/2 + (k+1)
We stop here again. Looking at our assumption (highlighted in blue and red above), and observing that the blue bit is equal to the red bit, so in the last line we simply replace the red bit with the blue bit which is allowed since we assumed them to be equal at the start.
LHS=
1+2+3+...+ k + (k+1)
=
k(k+1)/2 + (k+1)
= k(k+1)/2 + 2(k+1)/2
= [k(k+1) + 2(k+1)]/2, by adding the fractions with a common denominator
= [k
2 + k + 2k + 2]/2
= [k
2 + 3k + 2]/2
=
(k+1)(k+2)/2 => notice we have arrived at what we wanted to prove (highlighted in green in this line and further up)
= RHS
.'. The statement is true for n=k+1.
At the start, we proved that the statement was true for n=1. We assumed it was true for n=k and successfully used this assumption to prove that it was true for n=k+1.
Remembering that k can be ANY positive integer, it could be 1, it could be 2, 3, etc. we can say that:
If the statement is true for n=k, then it is true for n=k+1 (we have just proved this).
Since the statement is true for n=1 (we proved this at the very start), then it must also be true for n=1+1=2 (because of the orange bit).
So we have just deduced that the statement must be true for n=2, so since it is true for n=2, then the statement is also true for n=2+1=3 (because of the orange bit).
So we have just deduced that the statement must be true for n=3, so since it is true for n=3, then the statement is also true for n=3+1=4 (because of the orange bit).
So we have just deduced that the statement must be true for n=4, so since it is true for n=4, then the statement is also true for n=4+1=5 (because of the orange bit).
As you can see, this will continue on and on and on until we get to:
......... so we have just deduced that the statement must be true for n=k-2, so since it is true for n=k-2, then the statement is also true for n=k-2+1=k-1 (because of the orange bit).
So we have just deduced that the statement must be true for n=k-1, so since it is true for n=k-1, then the statement is also true for n=k-1+1=k (because of the orange bit).
.'. We can now deduce that the statement is true for all positive integers, n, by the principal of mathematical induction.
I hope you understand mathematical induction better now.