$(X, d_X), (Y, d_Y). f: X \to Y$.
We say that $f$ is continuous at $x_0 \in X$ iff
$$\forall \epsilon > 0, \exists \delta > 0\text{ such that }d_X(x, x_0) < \delta \implies d_Y(f(x), f(x_0)) < \epsilon$$
We say that $f$ is continuous iff
$$\forall x \in X, f\text{ is continuous at }x$$
Continuous functions are also sometimes called continuous maps.
If $f: X \to Y$ is continuous, and $K$ is any subset of $X$, then the restriction $f|_K: K \to Y$ of $f$ to $K$ is also continuous.
</span>
</span>
<span class="proof__expand"><a>[expand]</a></span>
$(X, d_X), (Y, d_Y). f: X \to Y. x_0 \in X.$
Then the following three statements are logically equivalent:
-
$f$ is continuous at $x_0$.
-
$\forall (x^{(n)})^\infty_{ n =1} \subseteq X,$
$\limu{ n }{ \infty } x^{(n)} = x_0$ with respect to the metric $d_X$,
$\limu{ n }{ \infty } f(x^{(n)}) = f(x_0)$ with respect to the metric $d_Y$. -
For every open set $V \subset Y$ that contains $f(x_0)$, there exists an open set $U \subset X$ containing $x_0$ such that $f(U) \subseteq V$.
</span>
</span>
<span class="proof__expand"><a>[expand]</a></span>
$(X, d_X)$, $(Y, d_Y)$. $f: X \to Y$.
Then the following four statements are equivalent:
-
$f$ is continuous.
-
$(x^{(n)})^\infty_{ n =1} \subseteq X$, $x_0 \in X$.
$\limu{ n }{ \infty } x^{(n)} = x_0$ with respect to the metric $d_X$,
$\limu{ n }{ \infty } f(x^{(n)}) = f(x_0) $ with respect to the metric $d_Y$. -
Whenever $V$ is an open set in $Y$, the set $\inv{ f }(V) := \set{ x \in X : f(x) \in V } $ is an open set in $X$.
-
Whenever $F$ is a closed set in $Y$, the set $\inv{ f }(F) := \set{ x \in X : f(x) \in F } $ is a closed set in $X$.
It may seem strange that continuity ensures that the inverse image of an open set is open.
One may guess instead that the reverse should be true, that the forward image of an open set is open; but this not true.
$(X, d_X), (Y, d_Y), (Z, d_Z).$
-
If $f: X \to Y$ is continuous at a point $x_0 \in X$,
and $g: Y \to Z$ is continuous at $f(x_0) \in Y$,
then the composition $g \circ f : X \to Z$, defined by $g \circ f(x) := g(f(x))$, is continuous at $x_0$. -
If $f: X \to Y$ is continuous, and $g: Y \to Z$ is continuous, then $g \circ f : X \to Z$ is also continuous.
$f: \R \to \R$, standard metric, defined by $$f(x)=\begin{cases} 0 &\text{ if }x \not \in \Q \br \frac{1}{n}&\text{ if }x \in \Q \end{cases}$$ is continuous $\forall x_0 \not \in \Q$ and discontinuous $\forall x_0 \in \Q$.