# Is this (or when) does this equality hold?

Let $a,b,c,d \in \mathbb{R}$ and $x,y$ are variables which are also real numbers

$$|ax + by|^2 + |cx + dy|^2 + 2|ax + by||cx + dy| = (ax + by)^2 + (cx + dy)^2 + 2(ax + by)(cx + dy)$$

Is this always an equality? Under what circumstances does this equality hold?

-
Realize that this is the same as asking if $|a|^2 + |b|^2 + 2|a||b| = a^2+b^2+2ab$! – Twiceler Mar 21 '13 at 4:00
So am I allow to expand for instance, $|ax + by|^2 = a^2 x^2 + 2abxy + b^2 y^2$? – Hawk Mar 21 '13 at 4:04
No! That's only true if you replace the absolute value with parentheses (or put absolute values around the entire right hand side). – Twiceler Mar 23 '13 at 2:41

So, the equality holds iff $(ax+by)(cx+dy)\geq0$