# Continuity of Mapping between Metric Spaces by Convergent Sequence

## Theorem

Let $M_1 = \left({A_1, d_1}\right)$ and $M_2 = \left({A_2, d_2}\right)$ be metric spaces.

Let $f: A_1 \to A_2$ be a mapping.

Then $f$ is continuous at $a \in X$ iff:

whenever $\displaystyle \lim_{n \mathop \to \infty} x_n = a$ for a sequence $\left \langle {x_n} \right \rangle$ of points of $A_1$

it is true that:

$\displaystyle \lim_{n \mathop \to \infty} f \left({x_n}\right) = f \left({a}\right)$

## Proof

### Necessary Condition

Let $f$ be continuous at $a \in A_1$.

Let $\displaystyle \lim_{n \mathop \to \infty} x_n = a$.

Let $V$ be a neighborhood of $f \left({a}\right)$.

Then by Metric Space Continuity by Inverse of Mapping between Neighborhoods $f^{-1} \left[{V}\right]$ is a neighborhood of $a$.

$\exists N \in \N: n > N \implies x_n \in f^{-1} \left[{V}\right]$

Thus for each neighborhood $V$ of $f \left({a}\right)$

$\exists N \in \N: n > N \implies f \left({x_n}\right) \in V$
$\displaystyle \lim_{n \mathop \to \infty} f \left({x_n}\right) = f \left({a}\right)$

$\Box$

### Sufficient Condition

Aiming for a contradiction, suppose $f$ is not continuous at $a \in A_1$.

Then there is a neighborhood $V$ of $f \left({a}\right)$ such that for each neighborhood $U$ of $a$:

$f \left[{U}\right] \nsubseteq V$

In particular, for each open $\epsilon$-ball $B_\epsilon \left({a}\right)$ such that $\forall n \in \N_{>0}: \epsilon = \dfrac 1 n$:

$f \left({B_\epsilon \left({a}\right)}\right) \nsubseteq V$

Thus for each $n \in \N_{>0}$ there exists a point $x_n$ such that:

$x_n \subseteq B_\epsilon \left({a}\right)$

and:

$f \left({x_n}\right) \notin V$

Now:

$d_1 \left({a, x_n}\right) < \dfrac 1 n$

and therefore:

$\displaystyle \lim_{n \mathop \to \infty} x_n = a$

whereas $\displaystyle \lim_{n \mathop \to \infty} f \left({x_n}\right) = f \left({a}\right)$ is impossible, as:

$\forall n \in \N_{>0}: f \left({x_n}\right) \notin V$

$\blacksquare$