TITLE: Prove: (arithmetic mean $=$ geometric mean) $\Rightarrow$ all variables are equal for $n>2$
QUESTION [7 upvotes]: Given: $\{x_1,x_2,\ldots,x_n\}\subset \Bbb R^+$ and 
  $$\text{(AM)}\ \ \ \frac{x_1+x_2+\ldots+x_n}{n}=\sqrt[n]{x_1 x_2 \ldots x_n}\ \ \  \text{(GM)}$$
Prove: $x_1=x_2=\ldots=x_n$

Background: I am a 9th grader with some experience in math contests. I always see this result but was wondering on how to prove it using simple arguments in the general $n>2$. I know how to prove the converse... it's straightforward.
My attempt (for $n=2$):
It is given that:
$$\frac{x_1+x_2}{2}=\sqrt[2]{x_1 x_2}$$
Squaring both terms and rearranging leads to:
$$x_1^2+x_2^2+2x_1x_2=4x_1x_2 \ \ \Rightarrow\ \ x_1^2+x_2^2-2x_1x_2=0 \ \ \Rightarrow\ \ (x_1-x_2)^2=0$$
This last result is true only if: $x_1=x_2$, completing the proof.
Question: How to prove when $n>2$ ? (9th grader understandable arguments please)

REPLY [5 votes]: This answer presumes $\text{AM}\ge\text{GM}$ is true. In other words, we consider $\text{AM}\ge\text{GM}$ as a black box, which we uses without proof. If we already know some proof of this inequality, however, the result would immediately follow from it.
Now suppose for some $x_1\ne x_2$ we have $\text{AM}(x_1,x_2,\cdots,x_n)=\text{GM}(x_1,x_2,\cdots,x_n)$. Let $x_1'=x_2'=(x_1+x_2)/2$, we see $$\text{AM}(x_1',x_2',\cdots,x_n)=\text{AM}(x_1,x_2,\cdots,x_n)$$ Meanwhile, we have $x_1'x_2'-x_1x_2=(x_1-x_2)^2/4>0$, hence $$\text{GM}(x_1',x_2',\cdots,x_n)>\text{GM}(x_1,x_2,\cdots,x_n)$$
Combining these results, we find 
$$\text{AM}(x_1',x_2',\cdots,x_n)<\text{GM}(x_1',x_2',\cdots,x_n)$$
Contradicting $\text{AM}-\text{GM}$ inequality. So $x_1=x_2$ if the equality holds. For the same reason, all $x_i$ is equal.