two definitions of continuity in topology I've learned the two definitions of continuity in topology:

*

*Continuity at a point: Using $\epsilon$-$\delta$ language

*Continuous mapping $f: X\to Y$: for every open set $U\subseteq Y$, $f^{-1}(U)$ is open in $X$
And it has been proved that these two definitions are equivalent.
However, there seems to be a counterexample to this proof: a mapping from interval $[0, 2\pi)$ to unit circle in $\mathbb R^2$, which takes $\theta$ and returns $(\cos\theta, \sin\theta)$.

The mapping is continuous at every point in $\epsilon-\delta$ definition and the mapping preserves convergent sequences. However, an open set around $(1, 0)$ in the unit circle does not map to a open set by $f^{-1}$.
It seems that the second definition should add the requirement that both $X$ and $Y$ must be open.
 A: Your confusion is in misunderstanding in which space $f^{-1}(U)$ is supposed to be open.
It is true that your $f^{-1}(U)$ is not open in $\mathbb R$ when $U$ is an open set containing $(1,0).$ But we don't need $f^{-1}(U)$ to be open in $\mathbb R,$ we need it open in $[0,1).$
What does it mean to be open in $X=[0,1)?$ We have a metric on $[0,1),$ inherited from $\mathbb R,$ and can do all the things that define open sets on $[0,1)$ using that metric. In particular, the open ball of radius $r>0$ around $0\in X$ is $[0,\min(r,1)).$ That set isn't open in $\mathbb R,$ but it is open in $[0,1).$
In general, if $Y$ has a notion of open sets (a topology) and $X\subseteq Y,$ we can define a topology on $X$ as "$U$ is open in $X$ if $U=V\cap X$ for some open subset $V$ of $Y.$" This is called the subspace topology on $X.$
When $Y$ is a metric space, and the topology on $Y$ is determined by that metric, then the subspace topology on $X$ is the same as you'd get by restricting the metric to $X$ and defining in terms of open balls.
Also, if $f:Y\to Z$ is continuous, then $f_{|X}:X\to Z,$ the restriction of $f$ to $X,$ is always continuous, if $X$ is given the subspace topology. We can, in fact, see that the definition of the subspace topology is just the "smallest" topology such that the inclusion map $i:X\to Y$ is continuous.

It is true that if $X$ is open in $Y,$ the definition of the subspace topology just becomes the open subsets of $Y$ which are contained in $X.$ But since $[0,1)$ is not open in $\mathbb R,$ you don't have that lucky case.
