TITLE: Under what condition we can interchange order of a limit and a summation?
QUESTION [60 upvotes]: Suppose f(m,n) is a double sequence in $\mathbb R$. Under what condition do we have $\lim\limits_{n\to\infty}\sum\limits_{m=1}^\infty f(m,n)=\sum\limits_{m=1}^\infty \lim\limits_{n\to\infty} f(m,n)$? Thanks!

REPLY [3 votes]: In this answer, I will focus on uniform convergence. That has been discussed in the comments, but not in any proper answer.
The interchange is valid if the partial sums are uniformly convergent, in the sense that $$\sup_{n}\left|\sum_{m>N} f(m,n)  \right| \to 0 \ \  \text{as} \ N \to \infty  \ \ \ \ \ \ \ \  \ \ (1)$$
More precisely, we show that if (i) $\sum_{m} f(m,n)$ converges for each $n$, (ii) $\lim_{n} f(m,n)$ exists for each $m$ and (iii) $(1)$ holds, then $\sum_{m} \lim_{n} f(m,n)$, $\lim_{n} \sum_{m} f(m,n)$ both exist and are equal.
There are cases where the above theorem can be applied, but neither the DCT nor the MCT can. An example is something like $f(m,n) = 2^{-(mn+1)} + \frac{(-1)^m}{m}$. It is a weaker condition than that required by the dominated convergence theorem, in the sense that if the DCT applies to $f(m,n)$ i.e., $|f(m,n)| \leq K_{m}$, where $\sum_{m} K_{m} < \infty$ then $(1)$ holds for $g$, by the Weierstrass M-test.
The proof follows from following fact: if $g_n \to g$ uniformly in a metric space $E$, with the $g_n$'s continuous, then $g$ is continuous. With a bit of work, this theorem can be applied in our context. The idea is to identify convergent sequences $(a_n)_n$ as precisely the continuous functions on $E=\{1/n\} \cup \{0\}$ with the induced (Euclidean) metric. If we are convinced of this identification, let us define $g_N(1/n) = \sum_{m=1}^{N} f(m,n)$. This is a finite sum, hence in light of (ii), we deduce $$\lim_{1/n \to 0^{+}} g_{N}(1/n) = \sum_{m=1}^{N} \lim_{n} f(m,n)$$ Thus defining $g_{N}(0) =   \sum_{m=1}^{N} \lim_{n} f(m,n)$ we have that the $g_{N}$'s are continuous on $E$ and by $(1)$ converge uniformly on $E \setminus \{0\}$. It is not hard to check that this implies they converge uniformly on $E$. Indeed, if $|g_{N'}(x) - g_{N''}(x)| < \epsilon$ for $N', N''>M_{\epsilon}, x \in E \setminus \{0\}$ we can take $x \to 0^{+}$ to get $|g_{N'}(0) - g_{N''}(0)| \leq \epsilon$ since the $g_{N}$'s are continuous. Hence $$g(0) = \lim_{N} g_{N}(0) = \sum_{m} \lim_{n} f(m,n)$$ is well-defined, and since $g$ is continuous (as the uniform limit of continuous functions), we deduce $$\sum_{m} \lim_{n} f(m,n) = g(0)= \lim_{1/n \to 0^{+}} g(1/n) = \lim_{n} \sum_{m} f(m,n) $$

However, it is very important to be careful. The result above only applies if the partial sums converge uniformly. It is possible to have functions $f_n:\mathbb{N} \to \mathbb{R}$ such that $f_n \to f$ uniformly i.e., $\sup_{m} |f_n(m) - f(m)| \to 0$ but $\lim_{n} \sum_{m} f_n(m) \neq  \sum_{m} \lim_{n} f_n(m)$. For instance, define $f_n(m)=1/n$ for $1 \leq m \leq n$, $f_n(m)=0$ for $m>n$. Then we can check that $\sup_{m} |f_n(m)| \leq 1/n \to 0$ but $1 = \lim_{n} \sum_{m} f_n(m) \neq  \sum_{m} \lim_{n} f_n(m) = 0$.

A measure-theoretic generalization of these ideas is that of uniform integrability.
Uniform integrability can be used, among other things, to a prove stronger version of the DCT, the Vitali convergence theorem.