Proving continuity of two functions, one from a subspace of Y and other from the space Y

The question goes as follows

Let X and Y be topological spaces, and let f:X $\rightarrow$Y Define Z = {f(x)|X $\in$ X} $\subseteq$ Y to be the image of the function f, and equip Z with a topology as a subspace of Y. Define $\overline{f}$: X $\rightarrow$ Z by $\overline{f}$(x) = f(x). Show that f is continous if and only if $\overline{f}$ is continous.

So I started with f and assuming it to be continuous which implies that the open sets of X map to open sets of Y. But I could not relate it to $\overline{f}$

Any hints would be appreciated.


Solution 1:

For functions between two topological spaces, $f$ being continuous means that the preimage of any open set in $Y$ is open in $X$, not the other way around as suggested in your post. So if $f$ is continuous and $A\subset Z$ is any open set in the subspace topology, we have some open set $B\subset Y$ such that $A=B\cap Z$. Thus $\bar{f}^{-1}(A)=f^{-1}(B\cap Z)=f^{-1}(B)$, which is open by continuity of $f$. For the other way around you can argue similarly.