Average of a collection of numbers equals the greatest of such numbers I would like to know the answer to this question: Suppose $a_1$, $a_2$, ... , $a_n$ are non-negative numbers so that $M$ is the greatest of such numbers. Is it true that if the average of $a_1$, $a_2$, ... , $a_n$ equals $M$, then every $a_i =M$?
I am sure it is true. If some $a_i$ were not equal to $M$, then $a_i < M$ (since $M$ is the greatest), and since all other $a_j \le M$, then $a_1 + ... + a_n < M + ... + M = nM$, so $\frac{a_1 + ... + a_n}{n} < M$, and the number on the left is the average of $a_1$, $a_2$, ... , $a_n$.
Is this correct???
Thank you
 A: Write the sequence as $$S = a_{1}, a_{2},a_{3},...,a_{n-1},M$$ where M is the maximum of $S$. Then the average $A$ of $S$ is 
$$A = \frac{a_{1} + a_{2} +.... + a_{n-1}+M}{n}$$ So then $$M = nA - a_{1} - a_{2} - ....-a_{n-1}$$
Lets set our 2 formulas for the maximum and the average together such that 
$$A = M$$
$$\frac{a_{1} + a_{2} +....+ a_{n-1} + M}{n} = nA - a_{1} - a_{2} - ....-a_{n-1} $$
$$a_{1} + a_{2} +....+ a_{n-1} + M = n^{2}A - na_{1} - na_{2} -....-na_{n-1}$$ $$M=n^{2}A - (n-1)a_{1} - (n-1)a_{2} -....-(n-1)a_{n-1}$$
Now lets get $A$ in terms of $M$
$$M=n^{2}(\frac{a_{1} + a_{2} +.... + a_{n-1}+M}{n}) - (n-1)a_{1} - (n-1)a_{2} -....-(n-1)a_{n-1} $$
$$M = (na_{1} + na_{2} +... + Mn + na_{n-1}) - (n-1)a_{1} - (n-1)a_{2} -....-(n-1)a_{n-1}$$
$$M = Mn - a_{1} - a_{2} -....-a_{n-1}$$
$$M(n-1) = a_{1} + a_{2} +...+a_{n-1}$$
$$M = \frac{a_{1} + a_{2} +...+a_{n-1}}{n-1}$$
So, if the average and maximum of the set are to be equal, then the maximum must be the average of all of the other elements. The only way for this to be true is if each element is equal to $M$, so yes, you are correct. 
