Suppose $f:\mathbb{R}\longrightarrow \mathbb{R}$ be an arbitrary continuous fuction such that the inverse image of a bounded set is bounded. Then show that,
$1$) The image under $f$ of a closed set is closed.
$2$) $f$ is not necessarily a surjective function.
My attempt ($1$) :
Say, $X\subset \mathbb{R}$ is an arbitrary closed set, such that $f(X)=Y\subset \mathbb{R}$ is not closed. Then I am trying to prove by contradiction.
Case 1 : $X$ is bounded. Hence $X$ is closed and bounded $\implies$ compact. Since $f$ is continuous, $f(X)=Y$ is also compact $\implies Y$ is closed. (a contradiction)
Case 2 : $X$ is not closed and not bounded. So $f(X)=Y$ is not bounded and not closed. If $Y$ is open and not bounded then $Y=\mathbb{R}$, but $\mathbb{R}$ is clopen (closed and open). (a contradiction).
Hence, $f(X)=Y$ where $X$ is closed and not bounded and $Y$ is neither open nor closed and also not bounded. Now I am confused that how to get a contradiction of this final case.
My attempt ($2$) :
Here, I cannot understand the meaning of the inverse image of a bounded set. I think inverse function will exist only for the bijections. In this context how I can find a continuous map $f$ which is not a surjection, and inverse image of the bounded set is bounded.