Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$

I am having trouble with this problem from my latest homework.

Prove the arithmetic-geometric mean inequality. That is, for two positive real
numbers $x,y$, we have
$$ \sqrt{xy}≤ \frac{x+y}{2} .$$
Furthermore, equality occurs if and only if $x = y$.

Any and all help would be appreciated.

Solutions Collecting From Web of "Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$"

Since $x$ and $y$ are positive, we can write them as $x=u^2$, $y=v^2$. Then

$$(u-v)^2 \geq 0 \Rightarrow u^2 + v^2 \geq 2uv$$

which is precisely it.

Note that
$$\frac{x+y}{2}-\sqrt{xy}=\frac{(\sqrt{x}-\sqrt{y})^2}{2}.$$

$$0\le ({\sqrt x}-{\sqrt y})^{2}$$
$$0\le x-2{\sqrt {xy}}+y$$
$$2{\sqrt {xy}}\le x+y$$
$${\sqrt {xy}}\le {x+y\over2}$$

$\phantom{Proof without words………}$
enter image description here

I am surprised no one has given the following very straightforward algebraic argument:
\begin{align}
0\leq(x-y)^2&\Longleftrightarrow 0\leq x^2-2xy+y^2\tag{expand}\\[0.5em]
&\Longleftrightarrow 4xy\leq x^2+2xy+y^2\tag{add $4xy$ to both sides}\\[0.5em]
&\Longleftrightarrow xy\leq\left(\frac{x+y}{2}\right)^2\tag{div. sides by 4 & factor}\\[0.5em]
&\Longleftrightarrow \sqrt{xy}\leq\frac{x+y}{2}.\tag{since $x,y\in\mathbb{R}^+$}
\end{align}
In regards to equality, notice that $\sqrt{xy}\leq\frac{x+y}{2}\leftrightarrow 2\sqrt{xy}\leq x+y$, and it becomes clear that equality holds if and only if $x=y$. $\blacksquare$