Continuous functions in a metric space using the discrete metric Let X be any set and define $d: X \times X \to \Bbb R$ by
$d(x,y)= \begin{cases} 0 & x=y \\ 1 & x \neq y \end{cases}$.
Classify all continuous functions $f: X \to X$ using the discrete metric on both sets.
This is my first course in topology and I am struggling to make sense of how I would classify all of the continuous functions in this case. I can see that $f(x) \neq f(a)$, then there exists $\epsilon > 0$ which do not satisfy the definition of continuity, so is it just that every continuous function in this case must map all of the elements in the domain to exactly one value in the codomain? Or am I just completely misunderstanding the question?
Thanks!
 A: HINT: Is there any function from $X$ to $X$ that is not continuous?
Your comment about what happens when $f(x)\ne f(a)$ suggests that you have some misunderstanding of continuity, because the identity function from $X$ to $X$ is always continuous, no matter what metric you’re using, and it’s never constant unless $X$ has only one point.
A: In point set topology, we say a function $f: X \to Y$ is continuous if for every open $U \subseteq Y$, $f^{-1}(U)$ is open in $X$ (where this is the preimage of $U$ under $f$).
To characterize all continuous functions $f: X \to X$ where $X$ has the discrete topology, you first have to notice that every subset of $X$ is open with the discrete topology (why?).  So really, the topology on $X$ is actually the powerset of $X$ (the set of all subsets).
Also, since every subset is open, then for any subset $U \subseteq Y$, since $U$ is open, we need that $f^{-1}(U) \subseteq X$ is open.  But the domain and codomain are both equipped with the discrete topology, and since $f^{-1}(U)$ is a subset of $X$, it is open in the discrete topology.  That means any functions you can have from $X$ to $X$ is continuous!  Since the preimage of any open set is open, under any function.
