Help me to understand the summation notation

I am having following expression, limits of summations are given in terms of set, can someone help me to interpret this summation. where $$d_{1}$$ and $$d_{2}$$ are distances.

$$\sum_{i_1,i_2 \in \{1,2\}} d_{i_1} e^{-d_{i_1}} * d_{i_2} e^{-d_{i_2}}$$

• The sum is taken over all combinations of $i_1$ and $i_2$ taking the values 1 or 2. So (1,1), (1,2), (2,1), and (2,2) for these indices. Is that what you mean? – MPW May 18 at 15:46
• The notation is equivalent to $\sum\limits_{i_1 \in \{1,2\}} \sum\limits_{i_2 \in \{1,2\}}(\cdots) = \sum\limits_{i_1=1}^2 \sum\limits_{i_2 = 1}^2 (\cdots)$ – achille hui May 18 at 15:48

It's $$\sum_{i_1,i_2\in \{1,2\}}d_{i_1}e^{-d_{i_1}}d_{i_2}e^{-d_{i_2}}$$ $$=d_1e^{-d_1}d_1e^{-d_1}+d_1e^{-d_1}d_2e^{-d_2}+d_2e^{-d_2}d_1e^{-d_1}+d_2e^{-d_2}d_2e^{-d_2}$$ $$=d_1^2e^{-2d_1}+2d_1e^{-d_1}d_2e^{-d_2}+d_2e^{-2d_2}$$ $$=(d_1e^{-d_1}+d_2e^{-d_2})^2$$