TITLE: When can you switch the order of limits?
QUESTION [207 upvotes]: Suppose you have a double sequence $\displaystyle a_{nm}$.  What are sufficient conditions for you to be able to say that $\displaystyle \lim_{n\to \infty}\,\lim_{m\to \infty}{a_{nm}} = \lim_{m\to \infty}\,\lim_{n\to \infty}{a_{nm}}$?  Bonus points for necessary and sufficient conditions.
For an example of a sequence where this is not the case, consider $\displaystyle a_{nm}=\left(\frac{1}{n}\right)^{\frac{1}{m}}$.  $\displaystyle \lim_{n\to \infty}\,\lim_{m\to \infty}{a_{nm}}=\lim_{n\to \infty}{\left(\frac{1}{n}\right)^0}=\lim_{n\to \infty}{1}=1$, but $\displaystyle \lim_{m\to \infty}\,\lim_{n\to \infty}{a_{nm}}=\lim_{m\to \infty}{0^{\frac{1}{m}}}=\lim_{m\to \infty}{0}=0$.

REPLY [2 votes]: The following is a minor variation on Arturo Magidin's answer, but according to my experience it is more widely used. 
Proposition: Assume 
$$
\lim_{m \to \infty} \lim_{n \to \infty} a_{mn}
= \lim_{m \to \infty} a_m = a
\qquad\text{and}\qquad
\lim_{m \to \infty} a_{mn} = a_n
$$
i.e. all limits exist and converge to their indicated value. We further assume that the single-variable limits converge uniformly in the other variable, i.e. for every $\varepsilon>0$ there exists $M > 0$ such that $|a_{mn} - a_{n}| < \varepsilon$ for all $m > M$ and all $n$, and likewise for $a_m$. Then $\displaystyle \lim_{n \to \infty} \lim_{m \to \infty} a_{mn}$ exists and it holds
$$
\lim_{n \to \infty} \lim_{m \to \infty} a_{mn}
=
\lim_{m \to \infty} \lim_{n \to \infty} a_{mn}
.
$$
Proof: For any $\varepsilon > 0$, we can find $N > 0$ such that $|a_{mn} - a_m| < \tfrac{\varepsilon}{3}$ for all $n > N$ and all $m$. Similarly, we can find $M>0$ such that both $|a_n - a_{mn}| < \tfrac{\varepsilon}{3}$ for all $n$ and $|a_m - a| < \tfrac{\varepsilon}{3}$ holds for all $m > M$. Thus, it holds
$$
|a_n - a| \leq 
|a_n - a_{mn}| + |a_{mn} - a_{m}| + |a_{m} - a|
< \varepsilon
$$
for all $n > N$ and $m > M$.