# Adding/multiplying summations of different indices to prove Cauchy-Schwarz

$\sum_{i=1}^{n}\sum_{j=1}^{n}(a_ib_j-a_jb_i)^2 = \sum_{i=1}^{n}a_i^2\sum_{j=1}^{n}b_j^2 + \sum_{i=1}^{n}b_i^2 \sum_{j=1}^{n}a_j^2 - 2\sum_{i=1}^{n}a_ib_i \sum_{j=1}^{n}b_ja_j$

Can someone walk me through this. The different summation indices is throwing me off. The Cauchy-Schwarz inequality is generally written as

$\sum_{i=1}^{n} a_ib_i \le (\sum_{i=1}^{n}a_i^2)^{1/2}(\sum_{i=1}^{n}b_i^2)^{1/2}.$

So I'm not 100% sure what the elements $b_j$ and $a_j$ are.

Hint: start off by expanding the square: $$\sum_{i=1}^{n}\sum_{j=1}^{n}(a_ib_j-a_jb_i)^2 =\sum_{i=1}^{n}\sum_{j=1}^{n}(a_i^2b_j^2-2a_ib_ja_jb_i+a_j^2b_i^2)$$ Now split the sum: $$\sum_{i=1}^{n}\sum_{j=1}^{n}(a_ib_j-a_jb_i)^2 =\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2 -\sum_{i=1}^{n}\sum_{j=1}^{n}2a_ib_ja_jb_i +\sum_{i=1}^{n}\sum_{j=1}^{n}a_j^2b_i^2\ .$$ The reason this RHS equals the previous RHS is that you are adding up the same things, only in a different order. Now for the first sum, think about what happens when $j$ varies from $1$ to $n$. As this happens, the $a_i^2$ never changes, so it is a constant factor and can be taken out of the sum: $$\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2 =\sum_{i=1}^{n}\Bigl(\sum_{j=1}^{n}a_i^2b_j^2\Bigr) =\sum_{i=1}^{n}a_i^2\Bigl(\sum_{j=1}^{n}b_j^2\Bigr)\ .$$ And now the sum over $j$ adds up to a fixed quantity which does not depend on $i$, so it can be taken outside the sum over $i$ to give $$\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2 =\Bigl(\sum_{i=1}^{n}a_i^2\Bigr)\Bigl(\sum_{j=1}^{n}b_j^2\Bigr)\ .$$
The last two steps are really just the same as $$\sum_{j=1}^3ab_j=ab_1+ab_2+ab_3=a(b_1+b_2+b_3)=a\sum_{j=1}^3b_j\ .$$
• So how do I get from $\sum_{i=1}^{n}a_i^2\sum_{j=1}^{n}b_j^2 + \sum_{i=1}^{n}b_i^2 \sum_{j=1}^{n}a_j^2 - 2\sum_{i=1}^{n}a_ib_i \sum_{j=1}^{n}b_ja_j$ to $2(\sum_{i=1}^{n}a_i^2)(\sum_{i=1}^{n}b_i^2) - 2(\sum_{i=1}^{n}a_ib_i)^2$ @David Jan 28, 2014 at 4:13
• What do you get if you write out $\sum_{i=1}^{n}a_i^2\sum_{j=1}^{n}b_j^2$ and $\sum_{i=1}^{n}b_i^2 \sum_{j=1}^{n}a_j^2$ in full, without using summation signs? Jan 28, 2014 at 4:20
• $a_1^2 + a_2^2 + ... + a_n^2 \times b_1^2 + b_2^2 +...+ b_n^2$ and $b_1^2 + b_2^2 + ... + b_n^2 \times a_1^2 + a_2^2 +...+ a_n^2$ ?? Jan 28, 2014 at 4:37
• Okay so I see how the right hand side is reduced. $(-2\sum_{i=1}^{n} a_ib_i)^2$ but I'm not quite seeing the left hand side @David Jan 28, 2014 at 4:41
• You need brackets in your previous comment: $(a_1^2+\cdots+a_n^2)(b_1^2+\cdots+b_n^2)$ and $(b_1^2+\cdots+b_n^2)(a_1^2+\cdots+a_n^2)$. Now what do you notice about these two expressions? Jan 28, 2014 at 4:48