# Notation of the summation of a set of numbers

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?

• Knuth's Concrete Mathematics p. 22 discusses this, and has a whole chapter about the summation operator. Commented May 31, 2017 at 2:09

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$.

• 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... Commented Feb 21, 2012 at 17:46
• What does $x_i$ mean, considering that a set doesn't have any order (and hence not any "$i$th" element)? Commented Jul 1, 2020 at 21:15
• @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$ Commented Jul 2, 2020 at 18:50
• That makes sense. But is this a more colloquial way of writing or is it generally accepted also in formal contexts? Commented Jul 3, 2020 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). Commented Jul 3, 2020 at 14:03

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$.

• As Michael Hardy says below, the subscripts are unnecessary and unsightly in the first expression. Commented Feb 21, 2012 at 17:15

You can use sigma notation with index:

$$\sum_{i=1}^{|S|} x_i$$

Alternatively, index may be assigned an explicit set indexes:

$$\sum_{i \in \langle 1,|S| \rangle} x_i$$

Or go without indexes, like that:

$$\sum_{x \in S} x$$

There is also other notation when there's a set of numbers that meet specific condition:

$$\sum_{ \{{ \omega: a\omega^3+b\omega^2+c\omega = 0 \}} } \omega$$

The example above represents a sum of the roots of the $$ax^3+bx^2+cx$$ expression.

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.

• You'd be summing undefined items Commented Dec 22, 2017 at 23:50
• You want to write $i \in \{1,\dots,|A|\}$ instead of $i \in A$ since $i$ is an index. It doesn't make any sense to use an element in $A$ to index $x$ (which is what you are currently doing since you write $i \in A$). Commented Jul 1, 2020 at 21:22