TITLE: Are these implications about topology true or false?
QUESTION [10 upvotes]: If $f: \mathbb{R}\to\mathbb{R}$ is a continuous function ($\mathbb{R}$ with euclidean distance) are these sentences true or false?
1) $f(A)$ open $\Rightarrow A$ open
2) $A$ open $\Rightarrow f(A)$ open
3) $f(A)$ closed $\Rightarrow A$ closed
4) $A$ closed $\Rightarrow f(A)$ closed
Well, I found that 2) is false, in fact if I take $A = (-1,1)$ and $f(x) = x^2$, then I have $f(A) = [0,1)$, which is not open. 4) Is also false because if I take $A = [0,\infty)$ and $f(x) = \arctan(x)$, then $f(A) = [0,\pi/2)$ is not closed. 
I think that 1) and 3) are false. If I'm right, I have to prove it. Can you give me a little help? Thanks in advice.

REPLY [2 votes]: More counterexamples:
For (1):
Take $f(x) = \left\lvert x\right\rvert$, $\forall x \in \mathbb{R}$ and $A = \left\{-\frac{3}{2}\right\}\cup\langle1, 2\rangle$. Then $f(A)=\langle1, 2\rangle$, which is open, but $A$ is not open.
For (3):
Take $f(x) = 1$, $\forall x \in \mathbb{R}$ and $A = \langle 0, 1\rangle$. Then $f(A) = \{1\}$, which is closed, but $A$ is not closed.
Note that (1) and (3) are in fact true when $f$ is an injective continuous function:
if $f(A)$ is open then $A = f^{-1}\left(f(A)\right)$ which is open as a preimage of an open set.
Same when $f(A)$ is closed.