TITLE: Continuous Mapping from arbitrary space to discrete space
QUESTION [8 upvotes]: So I'm asked to name all continuous mapping from an arbitrary space Y to discrete space X. Using the definition of continuity from point-set topology, the mapping is continuous if for every open set U in Y, the preimage of U in X is open as well. 
Proof: Remember that the singleton sets are open in the discrete space X.
Consider an open set U in Y. Hence,if the preimage of U is a union of singleton sets in X then the mapping is continuous. This is the constant mapping of Y into X. 
I'm unsure if these are the only continuous mapping from these two spaces. Any help is appreciated.

REPLY [3 votes]: You are confused about the direction of your mapping. You say "Consider an open set $U$ in $Y$. Hence if the preimage of $U$...". That makes no sense - for mappings from $Y$ to $X$, the preimage is a subset of $Y$ and the image is a subset of $X$, so if $U$ is already a subset of $Y$, it doesn't have a preimage.
For mappings from an arbitrary space Y to a discrete space X, i.e. functions $$
  f\,:\, Y \to X
$$
every preimage $U \subset Y$ of some set $V \subset X$ must be open, since every $V \subset X$ is open if X is a discrete space. That's certainly true for the constant mapping $f(x) = c$, because $Y$ itself is open. Whether it's true for other mappings depends on the topology of $Y$ - for example if $Y$ is discrete too, every $f$ is continuous. If $Y$ is the disjoint union of two open sets $Y_1$ and $Y_2$, then any mapping that takes $Y_1$ to $c_1$ and $Y_2$ to $c_2$ is continuous. Without more information about the topology of $Y$, you cannot describe all the continuous $f$ (well, other than saying all sets $f^{-1}(c)$ must be open in $Y$).
If you're looking at mappings from a discrete space $X$ to an arbitrary space $Y$, i.e. at functions $$
    f\,:\, X \to Y
$$
then every preimage $U \subset X$ is always open, because every set is open in the topology of $X$. Thus, every function is continuous then.