What does $\sum\limits_{i\neq j}$ mean?

1.1k Views Asked by At

I have seen similar questions (perhaps too similar, I´m sorry if so) but none of them do too much of a good job on defining what an expression such as $$\sum_{i\neq j}^n(x_iy_j)$$ means exactly. What set of numbers am I adding up? What does it mean to have two variables on the running variables under the sum? Is there another notation that might clear things up for me?

3

There are 3 best solutions below

3
On BEST ANSWER

In general, a summation of the form $$\sum_{P(i)}x_i$$ where $i$ is some form of index and $P$ is a proposition means the sum of $x_i$ over all possible $i$ for which $P(i)$ is true. (This is of course not the only use of the summation notation, but it is a very common one.) For instance, $$\sum_{i\in \{1,2,\dots,n\}}x_i$$ means $x_1+x_2+\dots+x_n$. Similarly, $$\sum_{i\neq j}x_iy_j$$ means the sum over all $i,j\in\mathbb Z_{>0}$ satisfying $i\neq j$. Here, since there is an upper bound of $n$, presumably the meaning of $$\sum_{i\neq j}^nx_iy_j$$is the sum of $x_iy_j$ over all $i,j$ in the set $\{1,2,\dots,n\}$ satisfying $i\neq j$. The specific meaning could differ slightly depending on context: for instance it could be possible that $0$ is a permitted value for $i$ and $j$. This is however the general idea, and to confirm that this is the meaning in this particular case, you can often derive that from the context in which you encounter this symbol.

0
On

Presumably, it means that you take the set of pairs of elements $i,j\in \{1,\ldots,n\}$ and add up the value of $x_iy_j$ for each of those pairs. For instance, if $n=2$, it would mean $x_1y_2+x_2y_1$ and if $n=3$ it would mean $x_1y_2+x_1y_3+x_2y_1+x_2y_3+x_3y_1+x_3y_2$ where the six possible ordered pairs of distinct numbers in $\{1,\ldots,3\}$ appear as subscripts. However, you have to infer from context exactly what was meant - figure out what makes sense. You could also write this as $$\sum_{i=1}^{n}\left(\sum_{j=1}^{i-1}x_iy_j+\sum_{j=i+1}^nx_iy_j\right)$$ or as $$\sum_{i=1}^n\sum_{j\in \{1,\ldots,n\}\setminus \{i\}}x_iy_j$$

where the $x_iy_i$ term is explicitly left out by avoiding it in the sum - but this is verbose and makes it more difficult to understand the intent, hence the use of shorthand notation.

Generally, this use of the symbol $\sum$ means that the sums runs over the variables listed beneath the symbol, but only over the assignments of those variables that satisfy the conditions (which are typically beneath those variables) and, optionally, up to some upper bound listed above. It's not entirely formal, but usually (hopefully!) the reader can work out what is meant. Here, the variables are presumably $i$ and $j$, being the only things listed beneath, and the condition is that $i\neq j$ and there is an upper bound of $n$ - so we'll create a term of the sum for every possible pair $(i,j)$ of distinct values up to $n$.

0
On

In words, sum $x_iy_j$ for all allowed values of $i$ and $j$ except for $i = j$. As an example, assuming that $i$ and $j$ take values 1, 2 and 3, the full unrestricted sum would have nine terms:

\begin{align} \sum_{i,j} x_iy_j =\\ & x_1 y_1 + x_1 y_2 + x_1 y_3\\ +& x_2 y_1 + x_2 y_2 + x_2 y_3 \\ +& x_3 y_1 + x_3 y_2 + x_3 y_3 \end{align} whereas the restricted sum in your question would have only six terms: the diagonal terms where the two subscripts have the same value would not be present: \begin{align} \sum_{i \ne j} x_iy_j =\\ & &x_1 y_2 &+x_1 y_3\\ +& x_2 y_1 & &+ x_2 y_3 \\ +& x_3 y_1 &+ x_3 y_2 & \end{align}