----
> [!definition] Definition. ([[metric-space continuity]])
> Let $(X, d_{X})$ and $(Y, d_{Y})$ be [[metric space|metric spaces]]. We say $f:X \to Y$ is **continuous at $x_{0} \in X$** if for all $\varepsilon > 0$, there exists $\delta > 0$ s.t. for all $x \in B_{\delta}(x_{0})$, $d_{Y}\big( f(x), f(x_{0}) \big) < \varepsilon$. Here, $B_{\delta}(x_{0})$ denotes an [[open ball]] of radius $\delta$ about $x_{0}$. That is, $f$ is **continuous at $x_{0}$** if for all $\varepsilon>0$, there exists $\delta=\delta(x_{0})>0$ such that $d_{Y}\big( f(x), f(x_{0}) \big) < \varepsilon \text{ whenever } d_{X}(x,x_{0}) < \delta.$
> \
> We say $f$ is **continuous** if it is continuous at $x$ for all $x \in X$. This is a specialization of the notion of [[continuous|topological continuity]]; the two definitions are equivalent in all contexts where comparing them makes sense.
>
> [!equivalence]
> - $f$ is continuous at $x \in X$ iff for all [[neighborhood]]s $V$ of $f(x)$, $f^{-1}(V)$ is a [[neighborhood]] of $x$.
> - $f$ is continuous on $X$ iff the preimage of every metric-open set $U \subset Y$, $f^{-1}(U)$, is open in $X$.
> [!generalization]
> [[continuous]]
^generalization
> [!proof]
The two proofs are similar. Here we do the second.
Suppose that $f:X \to Y$ is [[continuous]]. Recalling the [[basis characterization of continuity]], given $x_{0} \in X$ and $\varepsilon>0$, consider the set $f^{-1}(B_{\varepsilon}\big(f(x_{0})\big))$ which is by assumption open in $X$ — that is, by assumption we may fix $\delta>0$ such that $B_{\delta}(x_{0}) \subset f^{-1}(B_{\varepsilon}\big(f(x_{0})\big))$. Now if we let $x \in B_{\delta}(x_{0})$ we have that $f(x) \in B_{\varepsilon}\big(f(x_{0})\big)$ as desired.
Conversely, suppose that the $\varepsilon-\delta$ condition is satisfied. Let $V \in Y$ be open in $Y$; we'll show $f^{-1}(V)$ is open in $X$. If $f^{-1}(V)$ is empty then we're done, so assume it is not: let $y_{0}=f(x_{0}) \in f^{-1}(V)$. Since $f(x) \in V$, we may obtain $\varepsilon>0$ such that $B_{\varepsilon}(f(x_{0})) \subset V$. Then the $\varepsilon$-$\delta$ condition gives us some $\delta>0$ with the property that for all $x \in B_{\delta}(x_{0})$ we have $f(x) \in B_{\varepsilon}(f(x_{0}))$, i.e., $B_{\delta}(x_{0}) \subset f^{-1}(B_{\varepsilon}(f(x_{0})))$. But since $f^{-1}(B_{\varepsilon}(f(x_{0}))) \subset f^{-1}(V)$, that implies $B_{\delta}(x_{0}) \subset f^{-1}(V),$
which is the result.
> [!basicexample]
> $f(x)=\lambda x$ is [[continuous]] wrt the [[Euclidean metric]] $d_{e}$. Indeed, given $\varepsilon > 0$, we can pick $\delta= \frac{\varepsilon}{|\lambda|}$. Then if $x \in B_{\delta}(x_{0})$ it's clear that $\|f(x)- f(x_{0})\|_{2} = |\lambda| \ \underbrace{\| x - x_{0}\|_{2}}_{< \delta} < |\lambda | \delta = \varepsilon.$
> [!basicexample]
> Let $f: \mathbb{R}^{d} \to \mathbb{R}^{k}$ be a map that is continuous at $0$ and is such that for all $x,y \in \mathbb{R} ^{d}$ we have $f(x+y)=f(x)+f(y)$.
>
We show $f$ is continuous as follows:
First, we remark that since $f(0)=f(0+0)=2f(0)$ we have $f(0)=0$. Hence, given $x$, we have $f(x) + f(-x) = f(x + (-x))=f(0)=0$, implying $f(-x)=-f(x)$. From this we can conclude that in general $f(x-y)=f(x)-f(y)$ for arbitrary $x,y \in \mathbb{R}^{d}$.
>
Fix $\varepsilon > 0$. Using continuity of $f$ at $0$, obtain $\delta > 0$ such that for all $y \in B_{\delta}(0)$ we have $f(y) \in B_{\varepsilon}\big(f(0)\big)$. Recalling that $f(0)=0$, we have $\varepsilon > \|f(y) - f(0)\|_{2}=\|f(y) - 0\|_{2}= \|f(y)\|_{2}$.
>
Next, take a [[sequence]] $(x_{n})_{n \in \mathbb{N}}$ in $\mathbb{R}^{d}$ that [[converge|converges]] to $x_{0}$. Obtain $N \in \mathbb{N}$ large enough so that for all $n > \mathbb{N}$ we have $x_{n} \in B_{\delta}(x_{0})$. Now, fixing some $n > N$ and using the initial remark, we get: $\|\big( f(x_{n}) - f(x_{0}) \big)\|_{2} = \| f(\underbrace{x_{n} - x_{0}}_{\in B_{\delta}(0)}) \big) \|_{2} < \varepsilon.$
From this we can conclude that the image sequence $(f\big((x_{n})\big))$ converges to $f(x_{0})$, and therefore $f$ is [[continuous]] at $x_{0}$.
> [!basicnonexample]
> The function $f(x)=\mathbb{1}_{x < 0}$ is not [[continuous]] at $0$. Indeed, set $\varepsilon=\frac{1}{2}$. Then for all $\delta>0$, we can obtain negative $w \in B_{\delta}(0)$ (say, $w:=-\frac{\delta}{2}$) and positive $y \in B_{\delta}(0)$ (say, $y:= \frac{\delta}{2}$) for which $|f(w)-f(y)| = |1-0|=1 > \varepsilon$.
----
####
----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```