# If every subset of $M$ is clopen, then show that any function $f: M \rightarrow N$ is continuous where M and N are metric spaces

Here is the reasoning I think fleshes things out more. Some say that the fact follows obviously from the definitions (which may be true), but students often want an answer that explains in some level of detail.

What do you think of the following answer? Does this explain enough or are there areas that need more elaboration. Any comments are appreciated.

-

Let $f: M \rightarrow N$ where M and N are metric spaces (or Topological spaces)
By the topological defintion of continuity, $f$ is continuous iff the pre-image of each open(closed) set in N is also open(closed) in M.
Now, pick any open subset $X \in N$, the pre-image of $N$ under $f$ must be open since we are given that every subset of $M$ is open (since it is clopen). QED.