Proof of: if $x^2+y^2=2xy$ then $x=y$ I am trying to prove $x^2+y^2=2xy$ then $x=y$
What I have done is suppose $x^2+y^2=2xy$
then $x^2+y^2+(-2xy)=0\iff
x^2+(-xy)+(-xy)+y^2=0
\iff (x+(-y))\cdot x+(x+(-y))\cdot-y=0
\iff (x+(-y))^2=0$
i then square root both sides but i'm not sure if that's mathematically correct?
which gives me: $(x+(-y))=0$
so $x=y$

The claim as written is incorrect:
$$
y=\sqrt{2},x=2+\sqrt{2}\implies x^2-y^2=4+4\sqrt{2}+2-2=2\times\sqrt{2}(2+\sqrt{2})=2xy.
$$
Perhaps the problem was meant to be $x^2+y^2=2xy$ implies $x=y$. In this case
$$
0=x^2+y^2-2xy=(x-y)^2\implies x=y.
$$
