[Math] How does convergence imply continuity

general-topology

I have a problem:

Let $M$ and $N$ be metric spaces and let $f : M \rightarrow N$ be a map. Show that $f$ is continuous if an only if it takes convergent sequences to convergent sequences and limits to limits, that is, if and only if $x_i \rightarrow x $ in $M$ implies $f(x_i) \rightarrow f(x) $ in $N$.

I don't really understand what convergence has to do with continuity. In an effort to understand this better I've come up with a counterexample.

$$f : \mathbb{R} \rightarrow \mathbb{R}\\f(x) = 2x+IntegerPart[x]$$

Let:
$$x_i= \sum\limits_{n=0}^i ( \frac{4}{5})^n $$
Thus when $x_i \rightarrow 5, f(x_i) \rightarrow f(5)=15$. $f$ is not continuous at 5, but it seems to be converging.

The chart blow shows the $x_i$ sequence in red and the $f(x_i)$ sequence in green:
enter image description here

How does convergence imply continuity?

Best Answer

Two things here.

Your "counterexample" isn't a counterexample: $f(x_i) \to 14$, not 15. Indeed, if $x_i < 5$ then $2 x_i + \text{Int}(x_i) < 10 + 4 = 14$.

Secondly, even if it did converge to the right thing (15), that still wouldn't be enough to show that the function wasn't continuous. Continuous iff all sequences have $f$ tending to the right thing, and discontinuous iff some sequence has $f$ tending to the wrong thing. Showing that one sequence tends to the right thing tells you nothing.