I have recently started a problem related to complex numbers. The topic is new to me, but I understand how do they work though. However there is one concept which is a little bit "intricate" to me, and this is the square of the magnitude of a complex number. I know how the square of the magnitude of a single complex number looks like, but what if i have an expression? Here's what I mean:
$$|a+b+2ab|^2$$
where $a$ and $b$ are complex numbers whose magnitude are 1.
Let's say $a=x_1+y_1i$ and $b=x_2+y_2i$, so the expression should be $$|x_1+y_1i+2(x_1+y_1i)(x_2+y_2i)+x_2+y_2i|^2$$
which is
$$|x_1+y_1i+x_2+y_2i+2x_1x_2+2x_1y_2i+2x_2y_1i-2y_1y_2|^2$$
right?
So what I don't know is how to use the magnitude here. Should the real parts and imaginary parts be squared as a whole respectively, or each term should be squared?