# Double Summations

• March 23rd 2010, 04:10 PM
vlai9180
Double Summations
How would you expand the double summation:

$\sum\limits_{i}^2{\sum\limits_{j}^2{y_{i}y_{j}a_{i j}}}$

I understand that:

$\sum\limits_{i}^2{\sum\limits_{j}^2{y_{i}y_{j}}}$

Gets you something like:

$
y_{1}^{2}+y_{12}+ y_{21}+y_{2}^{2}
$

and

$\sum\limits_{i}^2{\sum\limits_{j}^2{a_{ij}}}$

is

$
a_{11}+a_{12}+a_{21}+a_{22}
$

But how can you combine these two? Is it as simple as foiling the entire thing?
• March 23rd 2010, 11:03 PM
Haven
If you're familiar with programming, double summations work like nested for loops. Ever time we iterate the outer summation, we run the entire inner summation. So every time i increases by 1, we go through all the possible values of j. In this case, every time i increases, we sum j from 1 to 2.

So $\sum_i^2 \sum_j^2 y_iy_ja_{ij} = \sum_j^2 y_1y_ja_{1j} + \sum_j^2 y_2y_ja_{2j} = (y_1)^2a_{11} + y_1y_2a_{12} + y_2y_1a_{21} + (y_2)^2a_{22}$
• March 23rd 2010, 11:12 PM
mr fantastic