$A \subseteq \mathbb R^n $ s.t. for every continuous function $f : A \to \mathbb R$ , $f(A)$ is closed in $\mathbb R$ , is $A$ closed $\mathbb R^n$? Let $A \subseteq \mathbb R^n  $ such that for every continuous function $f : A \to \mathbb R$ , $f(A)$ is closed in $\mathbb R$ ; then I know that $A$ is bounded ; my question is , is  $A$ closed in $\mathbb R^n$ ? ( If we changed the co-domain from $\mathbb R$ to $\mathbb R^n$ , the answer would be trivially yes , but I don't know what happens when the co-domain  is real line ) . Please help . Thanks in advance 

Assume $A$ is not closed. Then there is some $x_0 $ in the closure of $A$, but not in $A$.
This implies that the continuous function $f(x) := |x -  x_0| $ assumes only positive values on $A$, but the closure of the image contains $0$, which contradicts closeness of $f(A)$.
Hence, $A$ is closed.
