When given a equation containing complex numbers such as
$$ \frac{a+ib}{c+id} = x + iy$$
and required to prove
$$ \frac{a^2 +b^2}{c^2+d^2} = x^2 + y^2$$
Is taking the mod of both sides a legal mathematical step? I ask so because my textbook first finds the conjugate of both sides and multiplies the conjugate with the initial equation. This is done everywhere a case like the above one occurs. Hence im a bit confused if the way im thinking of proceeding is mathematically legal.