Equivalence of Definitions of Continuity on Metric Spaces

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 from $A_1$ to $A_2$.

Let $a \in A_1$ be a point in $A_1$.

The definitions for continuity of $f$ from $A_1$ to $A_2$ are equivalent.

That is, the following definitions say exactly the same thing:

Definition using Limit
$f$ continuous at (the point) $a$ (with respect to the metrics $d_1$ and $d_2$) when the limit of $f \left({x}\right)$ as $x \to a$ exists and
 * $\displaystyle \lim_{x \to a} f \left({x}\right) = f \left({a}\right)$.

Open Set Definition
$f$ is continuous (with respect to the metrics $d_1$ and $d_2$) iff:


 * for every set $U \subseteq M_2$ which is open in $M_2$, $f^{-1} \left({U}\right)$ is open in $M_1$.

Proof

 * Suppose that $f$ is defined to be continuous (in the sense of the definition using limits) for all $a \in A_1$.

Let $U \subseteq M_2$ be open in $M_2$.

Let $x \in f^{-1} \left({U}\right)$.

Since $U$ is open in $M_2$:
 * $\exists \epsilon > 0: B_\epsilon \left({f \left({x}\right)}\right) \subseteq U$

where $B_\epsilon \left({f \left({x}\right)}\right)$ denotes the open $\epsilon$-ball of $f \left({x}\right)$ in $M_2$.

By hypothesis:
 * $\exists \delta > 0: f \left({B_\delta \left({x}\right)}\right) \subseteq B_\epsilon \left({f \left({x}\right)}\right)$

So:
 * $f \left({B_\delta \left({x}\right)}\right) \subseteq U$

and so:
 * $B_\delta \left({x}\right) \subseteq f^{-1} \left({U}\right)$

Thus $f^{-1} \left({U}\right)$ is open in $M_1$.

Now suppose $f$ is defined to be continuous (in the sense of the Open Set Definition).

Let $\epsilon > 0$.

Then by Open Ball of Point Inside Open Ball:
 * $B_\epsilon \left({f \left({x}\right)}\right)$ is open in $M_2$

So by hypothesis, $f^{-1} \left({B_\epsilon \left({f \left({x}\right)}\right)}\right)$ is open in $M_1$.

As $f \left({x}\right) \in B_\epsilon \left({f \left({x}\right)}\right)$, it follows that:
 * $x \in f^{-1} \left({B_\epsilon \left({f \left({x}\right)}\right)}\right)$

So by hypothesis:
 * $\exists \delta > 0: B_\delta \left({x}\right) \subseteq f^{-1} \left({B_\epsilon \left({f \left({x}\right)}\right)}\right)$

Then $f \left({N_\delta \left({x}\right)}\right) \subseteq N_\epsilon \left({f \left({x}\right)}\right)$.

Thus $f$ is continuous at $x$ in the sense of the Epsilon-Neighborhood Definition.