Question:
If $z^{2}+|z|^{2}=0$, show that $z$ is purely imaginary.
Solution:
Let $z=a+i b$
$\left.\Rightarrow|z|=\sqrt{(} a^{2}+b^{2}\right)$
Now, $z^{2}+|z|^{2}=0$
$\Rightarrow(a+i b)^{2}+a^{2}+b^{2}=0$
$\Rightarrow a^{2}+2 a b i+i^{2} b^{2}+a^{2}+b^{2}=0$
$\Rightarrow a^{2}+2 a b i-b^{2}+a^{2}+b^{2}=0$
$\Rightarrow 2 a^{2}+2 a b i=0$
$\Rightarrow 2 a(a+i b)=0$
Either a = 0 or z = 0
Since $z \neq 0$
$a=0 \Rightarrow z$ is purely imaginary.