$f: X \to Y$ is continuous if and only if $f: X \to f(X)$ is continuous 
Let the image of $f$, which is $f(X)$, have the subspace topology inherited from $Y$. Prove that $f: X \to Y$ is continuous if and only if $f: X \to f(X)$ is continuous.



*

*If $f: X \to Y$ is continuous, then $f^{-1}(U)$ is open whenever $U$ is open in $Y$. So take a set $V$ open in $f(X)$ with the subspace topology. Then $V = f(X) \cap W$ for some open set $W$ in $Y$. If I can prove $V$ is open in $Y$, then I can use continuity of $f: X \to Y$ to finish this direction, but it seems $V$ is not necessarily open in $Y$ even though it is open in $f(X)$ (I just did some examples in my head). So how can I approach this direction?

*If $f: X \to f(X)$ is continuous, then $f^{-1}(U)$ is open whenever $U$ is open in $f(X)$. So take a set $V$ open in $Y$. I have to show this $V$ is open in $f(X)$ with the subspace topology so that I can use continuity of $f: X \to f(X)$, but $V$ might not even be a subset of $f(X)$ ($V$ could be larger than $f(X)$), so I don't know how to approach this one either.

*

*You want to show, for $V\subset f(X)$, $f^{-1}(V)\subset X$ is open. Well $V=f(X)\cap W$ for $W\subset Y$ open. Thus $f^{-1}(V)=f^{-1}(f(X)\cap W)=X\cap f^{-1}(W)=f^{-1}(W)$ which is open. Here I used that $f^{-1}$ commutes with intersection and $f^{-1}(f(X))=X$.

*Suppose $f:X\to f(X)$ is continuous. Let $W\subset Y$ be open. Then $V=f(X)\cap W$ is open in $f(X)$ with the subspace topology, so $f^{-1}(V)$ is open. But much like the above case, $f^{-1}(V)=f^{-1}(W\cap f(X))=f^{-1}(W)\cap X=f^{-1}(W)$. So $f^{-1}(W)$ is open.
