Proof of AM-GM Inequality (setting $a_n$ in the last step) I have been reading this and this, but I don't understand how one of the steps works.

Let $a_n=\frac{a_1+a_2+\cdots+a_{n-1}}{n-1}.$

How do you set $a_n$ to meet certain criteria and not lose generality?

Let $P(n)$ state that the AM-GM inequality holds for the given $n$.
The idea of this proof is to prove the following three statements:


*

*$P(1)$.

*$P(n) \longrightarrow P(2n)$.

*$P(n) \longrightarrow P(n-1)$ for $n\geq 1$.


Using the first two, you can prove by induction that $P(2^n)$ holds for all $n \geq 0$. The third then implies that $P(n)$ holds for all $n \geq 0$, since every integer is smaller than some power of two.
The step you are worried about is step 3. We are assuming the AM-GM inequality for $n$ and proving it for $n-1$. So given $a_1,\ldots,a_{n-1}$, we are free to choose any $b_1,\ldots,b_n$ we want and apply AM-GM. In this case, we choose $b_1 = a_1,\ldots,b_{n-1}=a_{n-1}$, and $b_n$ we set to the average of $a_1,\ldots,a_{n-1}$.
