A problem I have in my book is to prove that $z$ is real if and only if $\bar{z} = z$.
So far I have got that for $z = x + iy$, if $z$ is real, $y = 0$ and thus $z = x = \bar{z}$ as $\bar{z} = x - iy$ where $y = 0$ (if I'm right).
Now my book mentions something like converse of this, i.e, if $\bar{z} = z$ then $x+iy = x-iy$, where the last equality implies $y = -y$ and thus $y = 0$ (I don't get what equality it's talking about).
Also later it's explained that, therefore, $z = x$ and thus is real. (I don't get the second part at all).
Can someone please help me to understand this?