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$
 A: 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.
$$
A: The original question cannot be right. Counterexample: $x = 1, y = \sqrt 2 - 1$. Solves the equation, but clearly $x \neq y$. 
You've now clarified that the question is actually $x^2 + y^2 = 2xy$ (note the sign change on the left hand side). 
That's trivial to solve by noting that this can be rearranged to $(x-y)^2 = 0$. Now take the square root of both sides.
A: This isn't true: Consider $$x = \cos \frac{\pi}{8}, \qquad y = \sin \frac{\pi}{8}. \qquad(\ast)$$ Then, substituting gives
$$x^2 - y^2 = \left(\cos \frac{\pi}{8}\right)^2 - \left(\sin \frac{\pi}{8}\right)^2 = \cos\left[2 \left( \cos \frac{\pi}{8}\right)\right] = \cos \frac{\pi}{4} = \frac{1}{\sqrt{2}}.$$ On the other hand,
$$2xy = 2 \left(\sin \frac{\pi}{8}\right) \left(\cos \frac{\pi}{8}\right) = \sin\left[2\left(\frac{\pi}{8}\right)\right] = \sin \frac{\pi}{4} = \frac{1}{\sqrt{2}}.$$
So, we have $x^2 - y^2 = 2xy$ but, since $\cos \theta > \sin \theta$ on $\left[0, \frac{\pi}{4}\right) \ni \frac{\pi}{8}$, we have $x \neq y$.
Note that the original equation just says that
$$\Re(z^2) = \Im(z^2)$$
for some complex number $z := x + iy$, so, we must have $\arg (z^2) = \frac{\pi}{4} + \pi k$ for some integer $k$ (or $z = 0$). Thus, the solutions $(x, y)$ to the given equation correspond exactly to the points $z := x + iy$ with $\arg z = \frac{\pi}{8} + \pi k$ for some integer $k$ (and $(0, 0)$), and so $(\ast)$ is actually the unique solution up to a common scaling of $x, y$.
Edit The condition has been changed by OP to $$x^2 \color{red}{+} y^2 = 2xy,$$ and handling this is much easier: Rearranging gives $$0 = x^2 - 2xy + y^2 = (x - y)^2,$$
so $x - y = 0$ and thus $x = y$ as desired.
