<s>[INST] Showing $1+2+\cdots+n=\frac{n(n+1)}{2}$ by induction (stuck on inductive step) This is from  this website:

Use mathematical induction to prove that 
  $$1 + 2 + 3 +\cdots+ n = \frac{n (n + 1)}{2}$$
  for all positive integers $n$.
Solution to Problem 1: Let the statement $P(n)$ be 
  $$1 + 2 + 3 + \cdots + n = \frac{n (n + 1)}{2}.$$
STEP 1: We first show that $P(1)$ is true. 
Left Side $= 1$
Right Side $= \frac{1 (1 + 1)}{2} = 1$
Both sides of the statement are equal hence $P(1)$ is true. 
STEP 2: We now assume that $P(k)$ is true
  $$1 + 2 + 3 + \cdots + k = \frac{k (k + 1)}{2}$$
  and show that $P(k + 1)$ is true by adding $k + 1$ to both sides of the above statement 
  $$
\begin{align}
1 + 2 + 3 + \cdots + k + (k + 1) &= \frac{k (k + 1)}{2} + (k + 1) \\
&= (k + 1)\left(\frac{k}{2} + 1\right) \\
&= \frac{(k + 1)(k + 2)}{2}
\end{align}
$$
  The last statement may be written as 
  $$1 + 2 + 3 + \cdots + k + (k + 1) = \frac{(k + 1)(k + 2)}{2}$$
  Which is the statement $P(k + 1)$.

My question is how in the very last line is the statement $P(k + 1)$ equal to $\frac{(k + 1)(k + 2)}{2}$. I don't get the last step.
 [/INST] induction is basically saying that if it is true for this step, it is true for the next step. so assuming $1+2+3...+k=k(k+1)/2$, ie it is true for step k, we have to show that it must be true for step k+1, the next step. the final line shows how, by going through some algebra, adding all the numbers up to k+1 equals putting k+1 into the formula $n(n+1)/2$, written as $1+2+3...+k+[k+1]=[k+1]([k+1]+1)/2$. therefore, if it is true for step 1, it is for step 2, and 3...
</s>