What's the best notation for the sum of a subset?

Given $S = \{1,2,3,4,5,6,7\}$, let's say I want to find the sum of the squares of elements less than 4.

Initially I used the following notation: $$\sum_{\{i \in S:i<4\}}i^2$$

But I thought there is missing information, since only the set is provided. Here's alternative #1: $$\sum_{i\in\{x \in S:x<4\}}i^2$$

That seems verbose, so here's alternative #2, with some reordering: $$\sum\{i^2:i \in S:i <4\}$$

Which of the above is best, and is there an even better notation?

  • 1
    $\begingroup$ If you use this sum more than once or twice, you should consider defining $T=\{x\in S:x<4\}$. Then your sum can be over $i\in T$. Also, your alternative#2 with the double colons, is highly nonstandard. $\endgroup$ – vadim123 Dec 14 '13 at 19:24
  • $\begingroup$ It's only used once in my case, but that is a good idea, thanks. $\endgroup$ – imsky Dec 14 '13 at 19:29
  • 1
    $\begingroup$ Yes, instead of $\{i^2 : i\in S : i< 4\}$, you should write $\{i^2 : i\in S\text{ and }i<4\}$. $\endgroup$ – Alex Kruckman Dec 14 '13 at 22:08

It's pretty common to see notation like $$\sum_{\substack{i \in S \\ i < 4}} i^2$$

Here the $i<4$ is a condition you're imposing on the $i$ appearing in the sum (in addition to $i\in S$).

  • $\begingroup$ Thanks, that seems to be the simplest option. $\endgroup$ – imsky Dec 14 '13 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.