# How does $\frac{x^2 + y^2}{2} \geq |xy|$ come from $\frac{x + y}{2} \geq \sqrt{xy}$?

I know that the AM-GM inequality takes the form $$\frac{x + y}{2} \geq \sqrt{xy},$$ but I read in a book another form which is $$\frac{x^2 + y^2}{2} \geq |xy|,$$ but I am wondering how the second comes from the first? could anyone explain this for me, please?

If you plug $$x=X^2$$, $$y=Y^2$$ into the first inequality you get $$\frac{X^2+Y^2}{2} \ge \sqrt{X^2Y^2} = \sqrt{(XY)^2}=|XY|,$$ which is the second inequality (modulo capitalization).

The AM-GM inequality for $$n$$ non-negative values is

$$\frac1{n}(\sum_{k=1}^n x_k) \ge (\prod_{k=1}^n x_k)^{1/n}$$.

This can be rewritten in two ways.

First, by simple algebra,

$$(\sum_{k=1}^n x_i)^n \ge n^n(\prod_{k=1}^n x_k)$$.

Second, letting $$x_k = y_k^n$$, this becomes

$$\frac1{n}(\sum_{k=1}^n y_k^n) \ge \prod_{k=1}^n y_k$$.

It is useful to recognize these disguises.