# Why is there different results when calculating a double sum?

Consider: $$\begin{matrix} -1 & 0 & 0 & 0& 0& \ldots\\ 1/2 & -1 & 0 & 0& 0& \ldots\\ 1/4 & 1/2 & -1 & 0& 0& \ldots\\ 1/8 & 1/4 & 1/2 & -1& 0& \ldots\\ 1/16&1/8 & 1/4 & 1/2 & -1& \ldots\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots \end{matrix}$$

When I calculate the sum of each column first, I got $0,0,0\ldots$ then sum them up the answer should be $0$. But when I calculate the sum of each row, I got $-1, -1/2, -1/4, -1/8,\ldots$, then the sum will be $-2$. Why is there different results when I calculate the sum?

With divergent series the way that we order the series may change the sum. As @DuAravis said the series can be written as \begin{align*} S_n &=(-1) +(\frac{1}{2} -1) +(\frac{1}{4}+\frac{1}{2} -1)+(\frac{1}{8}+\frac{1}{4}+\frac{1}{2} -1) +\ldots=-2 \quad (1) \end{align*} or \begin{align*} S_n &=(-1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8} +\ldots) +\ldots (0-1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8} +\ldots) +\ldots=0 \quad (2) \end{align*} but we can also rearrange the matrix as follows, $$\begin{matrix} -1 & 0 & 0 & 0& 0& \ldots\\ 1/2 & -1 & 0 & 0& 0& \ldots\\ 1/2 & 1/4 & -1 & 0& 0& \ldots\\ 1/2 & 1/4 & 1/8 & -1& 0& \ldots\\ 1/2 &1/4 & 1/8 & 1/16 & -1& \ldots\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots \end{matrix}$$ now if we sum the columns we get $\infty$.
Also, we need to be careful about multiplying. For example, if multiply each term by $x$. Then by (2) this shouldn't change the total sum, \begin{align*} S_n &=x \times (-1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8} +\ldots) +\ldots x \times (0-1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8} +\ldots) +\ldots=x \times 0=0 \end{align*} but now if we use (1), \begin{align*} S_n &=x \times (-1) +x \times (\frac{1}{2} -1) +x \times (\frac{1}{4}+\frac{1}{2} -1)+(\frac{1}{8}+\frac{1}{4}+\frac{1}{2} -1) +\ldots=-2x \quad (1) \end{align*} The problem I think is that you're working with $\infty$'s so when you manipulate the sum it's like adding, subtracting, or multiplying by $\infty$. Here are two famous examples http://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF and http://en.wikipedia.org/wiki/Grandi%27s_series. Here are some links on mathexchange Sum of divergent series and Sum of infinite divergent series