# Is f continuous?

Suppose $f:\mathbb{R^n} \to \mathbb{R^m}$ satisfies the following: Given any convergent sequence $x^{(i)} \to x$ in $\mathbb{R^n}$ then the sequence $f(x^{(i)})$ in $\mathbb{R^m}$ contains a subsequence which converges to $f(x)$. Must f be continuous?

-

Recall the following general fact: Let $(x_n)$ be a sequence in a metric space $X$, such that each of its subsequences has a subsequence converging to $x \in X$. Then $x_n \to x$. For the proof note, that if $x_n \not\to x$, there is an $\epsilon > 0$, such that $d(x_n, x) \ge \epsilon$ for infinitely many $n$. So we can choose an increasing sequence $(n_k)$ of natural numbers such that $d(x_{n_k}, x) \ge \epsilon$ for all $k$, hence $(x_{n_k})$ cannot have a subsequence converging to $x$, contradiction.
Now apply this to your problem: Let $x^i \to x$. We want to prove that $f(x^i) \to f(x)$, by the above it suffices to prove that each subsequence of $(f(x^i))$ has a subsequence which does. So let $(i_j)$ be an increasing sequence of natural numbers, then $x^{i_j} \to x$, so by assumption on $f$ we know that $\bigl(f(x^{i_j})\bigr)$ has a subsequence converging to $f(x)$. By the above, we are done.