Modulus of a complex number I am now encountering a problem regarding on complex analysis
Lets say we have $w=u+iv$
What would it be for
$$|w|^{2}$$
I check a lot of videos and lecture notes, and realize the answer is
$$u^{2}+v^{2}$$
Can someone explain to me why is it like that instead of doing $$u^{2}+2iuv+v^{2}$$ Where did the $2iuv$ go? How to deduce $u^{2}+v^{2}$?
Thank you.

The modulus of a complex number is defined as $\lvert z\rvert = \sqrt{x^2+y^2}$ where $z=x+iy$. That is, the modulus is the distance. Another way $z$ can be written is in polar form which lends itself to this form $z = re^{i\theta} = \lvert z\rvert e^{i\theta}$. What you are confusing is the square of $z$ with the modulus squared.
$$
z^2 = (x+iy)^2 = x^2 - y^2 + 2iyx\neq x^2 + y^2 = z\bar{z} = \lvert z\rvert^2
$$
