28

Given a set of numbers $S=\{x_1,\dotsc,x_{|S|}\}$, where $|S|$ is the size of the set, what would be the appropriate notation for the sum of this set of numbers? Is it

$$\sum_{x_i \in S} x_i \qquad\text{or}\qquad \sum_{i=1}^{|S|} x_i$$ or something else?

Mike Pierce
  • 18,938
Aaron
  • 385
  • 2
  • 4
  • 6

3 Answers3

41

I'd write either $\displaystyle\quad\sum_{i=1}^{|S|} x_i\quad$ or $\displaystyle\quad\sum_{x\in S} x$.

If the second form is used, then the subscript is just clutter.

Some mathematicians (perhaps especially set theorists?) might write $\displaystyle \sum S$. This would parallel the way set theorists write $\displaystyle \bigcup S$ where others might write $\displaystyle \bigcup_{x\in S} x$.

  • 7
    The set theorist's notation is useful, because it does not invoke dummy variables. The idea is that $\sum$ should be a function of type $\mathscr{P} \mathbb{R} \to \mathbb{R}$ (or replace $\mathbb{R}$ with your favourite ring). This idea eventually leads to the general notion higher-order functions and functors and monads... – Zhen Lin Feb 21 '12 at 17:46
  • What does $x_i$ mean, considering that a set doesn't have any order (and hence not any "$i$th" element)? – HelloGoodbye Jul 01 '20 at 21:15
  • 2
    @HelloGoodbye : Often one specifies the members of a set by means of a sequence or other indexed family. For example $\left{\frac 1 i : i\in\mathbb N\right}.$ That doesn't mean that that way of putting the members of the set in one-to-one correspondence with the members of $\mathbb N$ is an attribute of the set itself. $\qquad$ – Michael Hardy Jul 02 '20 at 18:50
  • That makes sense. But is this a more colloquial way of writing or is it generally accepted also in formal contexts? – HelloGoodbye Jul 03 '20 at 14:00
  • When it comes to your example, though, I don't really understand what you are trying to illustrate, as that expression works even without sequencing the natural numbers (i.e. it doesn't require the natural numbers to have any specific order). – HelloGoodbye Jul 03 '20 at 14:03
  • @HelloGoodbye : "Sequencing" here would just mean putting into one-to-one correspondence with $\mathbb N. \qquad$ – Michael Hardy Jul 03 '20 at 21:37
  • Hm, maybe I misinterpreted you. What if the members of the set are not specified by means of a sequence or other indexed family? In the general case, I guess they are not. So only in special cases you could use the first notation with the indexed elements, right? – HelloGoodbye Jul 03 '20 at 21:54
  • @HelloGoodbye : Yes. $\qquad$ – Michael Hardy Jul 03 '20 at 21:55
5

Both expressions are acceptable with the second being more usual in this context.

The expression $$\sum_{x \in S} x$$ is more common when $S$ is implicitly defined, e.g., when one is summing over all prime numbers. The expression $$\sum_{i =1}^{|S|} x_i$$ would be more common here because you are explicitly given the list of elements of the set $S$.

Tom Cooney
  • 4,597
-1

Say I had a set A, under an operation with the properties of $+$, then $$\sum_{i\in A} x_i$$ is how I write it.

sdf
  • 1