# Very basic question about the definition of continuous of a functions

Suppose say $f:\{0,1\}\to \{1,2\}$ is $f$ continuous? Say $f(0)=2,f(1)=1$ I know the definition of continuous function. In my point of view, i think it is continuous as we can simply take $\epsilon=\delta$, so for any $x\in \{0,1\},|x-1|<\delta \implies |f(x)-f(1)|<\epsilon$. Is it correct?

-
@Nameless intuitively this $f$ only contains 2 isolated points so i feel it is not continuous but from the definition, if I understood correctly, it seems to be continuous so that's why i doubt about whether $f$ is a continuous functions – Mathematics Nov 18 '12 at 7:56
@Nameless if $\epsilon<1$ then we know that $f(x)=f(1)$ and $|x-1|=|1-1|=0<\delta|$ – Mathematics Nov 18 '12 at 8:00
@Mathematics A function is always continuous at isolated points. That's why the $\epsilon-\delta$ definition is a little more general to the limit definition of continuity – Nameless Nov 18 '12 at 8:00

If $f:X \to Y$ is a function and $x_0 \in X$ is an isolated point then $f$ is continuous at $x_0$:
Let $\epsilon>0$. Since $x_0$ is an isolated point exist $\delta>0$ s.t. $(x_0-\delta,x_0+\delta)\cap X=\{x_0\}$. This mean that for $x \in (x_0-\delta,x_0+\delta) \cap X, \ |f(x)-f(x_0)|=0<\epsilon$ (since necessarily $x=x_0$).
This $\delta$ may be different from $\epsilon$. In your case $\delta=\epsilon$ works and your proof is correct (but you need to explain why $\delta=\epsilon$ works).
For example every surjective $f:\{0,1\} \to \{1,4\}$ is continuous. In this case $\delta=\epsilon$ is not working (e.g. $\epsilon=2$).
how to explain? when i am trying to show a function is continuous, seldom do i explain why $\delta=\delta(\epsilon)$ works – Mathematics Nov 18 '12 at 8:10
If the exercise was to show that every $f:\{0,1\} \to \{1,4\}$ is continuous then your proof is wrong. I mean to explain why your proof is working in this particular case. Did you understand my proof? – P.. Nov 18 '12 at 8:16
We all know that you can consider only $\epsilon<\epsilon_0$ ;) – yo' Nov 18 '12 at 18:15