Let $a_1, a_2,\cdots a_n$ be positive real numbers. The A.M-G.M inequality states that $$(a_1a_2\cdots a_n)^\frac{1}{n}\leq\frac{a_1+a_2+\cdots +a_n}{n}$$ with equality if and only if $a_1=a_2=a_3\cdots =a_n$.
I was able to prove the inequality using Lagrange Multipliers method. Can anyone help me prove the Equality part. i.e if A.M=G.M then $a_1=a_2=a_3\cdots =a_n$.