1
$\begingroup$

this is one of those things that I know how to do in a programming environment but not sure how it translates into mathematics. I'm trying to express a sum so that it is easily visible that certain elements can be seen to be equal. Here is the original sum:

$$ s=\sum_{\alpha = 0}^{3}\sum_{\beta = 0}^{3}M_{\alpha \beta}(\Delta x ^ \alpha)(\Delta x ^ \beta) $$

where the greek characters are indices not exponents. Here is my reformulated version:

$$ s = \sum_{\alpha=0}^{3} M_{\alpha\alpha}(\Delta x^\alpha)^2 + \sum_{\alpha=0}^{3}\sum_{\beta = \alpha + 1}^{3} (M_{\alpha\beta} + M_{\beta\alpha}) (\Delta x^\alpha)(\Delta x^\beta) $$

This would make sense in something like a for loop where the order of summation is clear, but I'm not really sure how to express it in the context of the summation symbols. As a specific question, could someone tell me if this is mathematically valid?

$\endgroup$
3
  • $\begingroup$ There is nothing wrong with either of your sums and they are clearly identical. Changing the order of summation is not an issue when the sum is finite. $\endgroup$
    – DRF
    Apr 20, 2015 at 15:52
  • $\begingroup$ Oh I think I understand what you are asking now.:) Yes it's ok that $\beta$ is dependent on $\alpha$ the order of summation is actually well defined. if you look at how $\sum$ is defined as a limit of partial sums. $\endgroup$
    – DRF
    Apr 20, 2015 at 15:54
  • $\begingroup$ Ah okay, yeah that makes sense, it's just usually the order of addition doesn't matter, so $\sum_{a=0}^{2}$ would be the same as $\sum_{a=2}^{0}$. But just because two things are equal does not mean the notation denotes the same thing ;) $\endgroup$
    – Alex DB
    Apr 23, 2015 at 22:46

1 Answer 1

1
$\begingroup$

Note: It's perfectly valid to treat finite sums in the same way as for-loops in programs. You can multiple sums reshuffle in the same way as you may reorganise nested for-loops.

Two hints:

  • You mention that certain elements are equal. This is not obvious. If an element is $$M_{\alpha \beta}(\Delta x ^ \alpha)(\Delta x ^ \beta),\qquad 0\leq \alpha,\beta\leq 3$$ no two of them have to be equal. Maybe you mean symmetrical with respect to indices instead.

  • The reformulated expression

\begin{align*} s =\sum_{\alpha=0}^{3} M_{\alpha\alpha}(\Delta x^\alpha)^2 + \sum_{\alpha=0}^{3}\sum_{\beta = \alpha + 1}^{3} (M_{\alpha\beta} + M_{\beta\alpha}) (\Delta x^\alpha)(\Delta x^\beta)\tag{1} \end{align*} is correct, but we can see that the double sum in (1) with $\alpha=3$ gives an inner sum equal to zero $$\sum_{\beta = \mathbb{4}}^{3} (M_{\alpha\beta} + M_{\beta\alpha}) (\Delta x^\alpha)(\Delta x^\beta)=0$$ since it is an empty sum. This corresponds precisely to a nested for-loop and a setting of the outer index variable so that the inner for-loop is not executed. \begin{array}{l} \text{sum} \leftarrow 0\\ \text{for } \alpha \text{ in } (0:3) \,\{\\ \qquad\text{for }\beta \text{ in } ((\alpha+1):3) \,\{\\ \qquad \qquad\text{sum} \leftarrow \text{sum}+(M_{\alpha\beta} + M_{\beta\alpha}) (\Delta x^\alpha)(\Delta x^\beta)\\ \qquad\}\\ \} \end{array}

You may observe that the inner loop is not executed when $\alpha=3$.

Therefore you would presumably change the outer for-loop to iterate from $(0:2)$ and in the same way you could simplify the reformulated expression to

\begin{align*} s =\sum_{\alpha=0}^{3} M_{\alpha\alpha}(\Delta x^\alpha)^2 + \sum_{\alpha=0}^{\mathbb{2}}\sum_{\beta = \alpha + 1}^{3} (M_{\alpha\beta} + M_{\beta\alpha}) (\Delta x^\alpha)(\Delta x^\beta) \end{align*}

$\endgroup$
2
  • $\begingroup$ That's very true, thank you for your insightful comment, I did mean that they are symmetrical with respect to their indices, i was mistakenly trying to convey that $M_{\alpha \beta}=M_{\beta \alpha}$ is a valid solution, but truly, it is not the only one. Thank you for pointing out the mistake in my formula, I thought I may have missed something, I suppose it is akin to double counting since the $M_{33}$ term is already in the first term. $\endgroup$
    – Alex DB
    May 6, 2015 at 20:22
  • $\begingroup$ You're welcome! Good to see, my answer was helpful. :-) $\endgroup$ May 6, 2015 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .