I was trying to understand why the absolute value of the sum/difference of two complex numbers to the second power (squared) can be given as:
$$\left| |a| \exp(-i c)+|b| \exp(-i d) \right|^2=|a|^2+2\cos(c-d)|a||b| +|b|^2$$
$$\left| |a| \exp(-i c)-|b| \exp(-i d) \right|^2=|a|^2-2\cos(c-d)|a||b| +|b|^2$$
I found this answer to a similar question, where I understand all steps except this: $$\left| |a| \exp(-i c)-|b| \exp(-i d) \right|^2=(|a| \exp(-i c)-|b| \exp(-i d) )\times( |a| \exp(i c)-|b| \exp(i d))$$
Could you help me understand why the last equation is true?
$a, b, c, d$ are real numbers in this scenario.