The AM-GM inequality:

If we let \(\{a_i\}_{i=1}^n \subset \mathbb{R_{+}}\), then

\begin{equation} \frac{1}{n} \sum_{i=1}^n a_i \geq \big(\prod_{i=1}^n a_i \big)^{\frac{1}{n}} \end{equation}

Proof using Lagrange multipliers:

Given that (1) is homogeneous, we may de-homogenise it by assuming that:

\begin{equation} \sum_{i=1}^n a_i = n \end{equation}

without loss of generality.

Our inequality to be proven now becomes:

\begin{equation} \prod_{i=1}^n a_i \leq 1 \end{equation}

with the constraint:

\begin{equation} \sum_{i=1}^n a_i = n \end{equation}

We may now approach this as an optimisation problem:

\begin{equation} \max \prod_{i=1}^n a_i \end{equation}

with the constraint:

\begin{equation} \sum_{i=1}^n a_i - n = 0 \end{equation}

which leads to the Lagrange multiplier:

\begin{equation} \mathcal{L}(\vec{a}, \lambda) = \prod_{i=1}^n a_i - \lambda \big(\sum_{i=1}^n a_i - n \big) \end{equation}

This leads to the variations:

\begin{equation} \frac{\partial \mathcal{L}}{\partial a_i} = \frac{\prod_{i=1}^n a_i}{a_i} - \lambda = 0 \end{equation}

\begin{equation} \frac{\partial \mathcal{L}}{\partial \lambda} = \sum_{i=1}^n a_i - n = 0 \end{equation}

The first variation (8) leads us to the conclusion that (5) is maximised when:

\begin{equation} \forall i,j, a_i = a_j \end{equation}

and the second variation (9) tells us that (10) must satisfy:

\begin{equation} \forall i, a_i = 1 \end{equation}

It follows that:

\begin{equation} \big(\prod_{i=1}^n a_i \big)^{\frac{1}{n}} \leq 1 \end{equation}

and therefore:

\begin{equation} \prod_{i=1}^n a_i \leq \frac{1}{n} \sum_{i=1}^n a_i \end{equation}