I have a function $z=|\frac{-4i\pm2i\sqrt3}{2}|$
Now I would simplify this by doing:
$|\frac{-4i+2i\sqrt3}{2}|=|-2i+i\sqrt3|=|-2+\sqrt3|=2+\sqrt3$
However the book I am using gives: $|\frac{-4i+2i\sqrt3}{2}|=|2-\sqrt3|=2-\sqrt3$
and then $|\frac{-4i-2i\sqrt3}{2}|=|2+\sqrt3|=2+\sqrt3$
Could someone explain my mistake and how to work out the correct answer?
You're line $|-2+\sqrt3| = 2 + \sqrt3$ is incorrect. Remember taking the modulus multiplies by +1 or -1 to make the number inside positive. Therefore $|-2+\sqrt3| = -2 + \sqrt3$ or $|-2+\sqrt3| = 2-\sqrt3$, but since $\sqrt3<2$ we have that $$|-2+\sqrt3| = 2-\sqrt3$$ like the book says.
Hope this helps