Simplify an expression with complex numbers [duplicate]

How can I get a simplify expression of following when all a,b, .., f are real numbers?

FullSimplify[Abs[(a+I b)+(c+I d)(e+I f)]^2]


marked as duplicate by b3m2a1, Henrik Schumacher, Bob Hanlon, m_goldberg, Kuba♦Jan 19 '18 at 6:48

• Use ComplexExpand. – Henrik Schumacher Jan 18 '18 at 22:28
• Thanks @HenrikSchumacher – Frey Jan 18 '18 at 22:32
• You're welcome! – Henrik Schumacher Jan 18 '18 at 22:53

PowerExpand also works in this case:

FullSimplify[PowerExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2],
Assumptions -> Element[{a, b, c, d, e, f}, Reals]]


$(b+d e+c f)^2+(a+c e-d f)^2$

FullSimplify@Assuming[{a, b, c, d, e, f} \[Element] Reals,
ComplexExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2]]


$a^2+2 a (c e-d f)+b^2+2 b (c f+d e)+\left(c^2+d^2\right) \left(e^2+f^2\right)$

• By default, ComplexExpand will assume that all variables are real. Consequently, the simpler FullSimplify@ComplexExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2] is equivalent to your proposed solution. Further, you will get the same result with Simplify in the place of FullSimplify – Bob Hanlon Jan 19 '18 at 5:30