If that is confusing you , you can also define the modulus $|z| $ as ;
$|z| = \sqrt{z\cdot \bar z}\qquad$$\qquad$ where $\bar z $ is the complex conjugate of $z$
let $z =a + ib$
$\bar z = a-ib$
$|z| = \sqrt{(a+ib)(a-ib)}$
$|z| = \sqrt{a^2-iab+iab-(ib)^2}$
$|z| = \sqrt{a^2-i^2\cdot b^2}$
$|z| = \sqrt{a^2+b^2}$