Let $I=[0,1]$ be a subset of $\mathbb{R}$ (with standard topology). Define the equivalence relation $x\sim x'$ iff $x=x'$, or $x=0$ and $x'=1$, or $x=1$ and $x'=0$. Show that the set of equivalence classes $I/{\sim}$ (with quotient topology) is homeomorphic to $S^1$.
So far I have:
The canonical projection $\pi:I\to I/{\sim}$ (with quotient topology) is surjective and continuous. Let $g:I/{\sim}\to S^1$. Now the map $f:I\to S^1$ given by $f(x)=(\cos2\pi x,\sin2\pi x)$ is continuous, so by the universal mapping property of quotients, I want to be able to conclude that $g\circ \pi$ is continuous. Don't you have to know that $g$ is an "appropriate" function though (I can't just define any function $g:I/{\sim}\to S^1$ and say $g\circ \pi = f$)? Furthermore, how can I then show that $g$ is a bijection without actually specifying what it is? I know this sort of an easy question, but I would really appreciate any help.