A metric space on which every real-valued function is continuous Let $(X,d)$ is a metric space such that every arbitrary function $f:X\to\Bbb{R}$ is continuous.
Then which option is right?
a) $X$ is bounded.
b) Every subset of $X$ is closed.
c) Every subset of $X$ that is closed and bounded is compact.
d) All of the above options are right.
I think that because every function is continuous then every set in $X$ is both close and open, is meter of $X$ discrete?, but it is not true.
 A: "$X$ is bounded" cannot be right because $\mathbb Z$, the set of all integers with the usual metric, is a metric space on which every function with values in $\mathbb R$ is continuous, and yet $\mathbb Z$ is not bounded.
Item (c), every closed and bounded set is compact, cannot be right for the following reason.  Put a metric on the set of all integers that says
$$
d(x,y) = \begin{cases} 1 & \text{if }x\ne y, \\ 0 & \text{if }x=y. \end{cases}
$$
This is a bounded metric space in which every subset if closed.  And every function from it into $\mathbb R$ is continuous.  But it is not compact.
And of course (d) cannot be right if either (a) or (c) is wrong.
A function $f : X\to\mathbb R$ is continuous if and only if the inverse-image under $f$ of every closed set in $\mathbb R$ is closed.  That will imply that every subset of $X$ is closed, provided that you can show that every subset $U$ is such an inverse-image.  To show that, think about the indicator function of $U$:
$$
{\chi}_U(x) = \begin{cases} 1 & \text{if }x\in U, \\ 0 & \text{if }x\not\in U. \end{cases}
$$
A: The topology in which every function is continuos is the trivial where every subset is open and therefore also closed. So b is correct. a is false as shown in the preceding answer. The only compact sets are those with finite number of members. It does not help if a set is closed and bounded so c must be false. This implies also that d is false.
