I have a dilemma. I have a task where I'm supposed to show that $|\cos z|^2+|\sin z|^2=1$ if and only if $z\in \mathbb{R} $. In my argument I have that $$\cos z\cdot\overline{\cos z} + \sin z\cdot\overline{\sin z}=\cos z\cdot \cos\overline{z} + \sin z\cdot \sin\overline{z}$$ but my teacher said that $\overline {\cos z} \neq \cos \overline{z}$.
Is this true?
But $$\overline{\cos(z)} = \overline{\frac{e^{iz}+e^{-iz}}{2}}=\frac{e^{-i\overline{z}}+e^{i\overline{z}}}{2}=\cos(\overline{z})$$