Consider the map $f\colon\mathbb{S}^1\to\mathbb{S}^1$ defined as $f(z)=z^2$, where $\mathbb{S}^1$ is the unit circle, $$\mathbb{S}^1=\{z\in\mathbb{C}:|z|=1\}.$$ On $\mathbb{S}^1$ we define the following equivalence relation $$x\sim y\quad\iff\quad x=y\;\text{or}\;x=-y.$$ Consider the map $\overline{f}\colon\mathbb{S}^n/\sim\to\mathbb{S}^1$ defined as $\overline{f}\big([z]\big)=f(z)$, for $z\in\mathbb{S}^1.$
Question. Is the map $\overline{f}$ injective?
My attempt. Yes. Indeed given $z_1,z_2\in\mathbb{S}^1$, if $\overline{f}\big([z_1]\big)=\overline{f}\big([z_2]\big)$, then $f(z_1)=f(z_2)$, so $z_1^2=z_2^2,$ therefore $z_1=\pm z_2$ and then $z_1\sim z_2$, then $[z_1]=[z_2].$ It's correct?
Thanks!
More generally, suppose $f\colon X\to Y$ is a map. Define, for $a,b\in X$, $$ a\sim_f b\qquad\text{for}\qquad f(a)=f(b) $$ Then $\sim_f$ is clearly an equivalence relation and the map $$ \bar{f}\colon X/{\sim_f}\to Y,\qquad \bar{f}([a]_{\sim_f})=f(a) $$ is well defined and injective, because $[a]_{\sim_f}=[b]_{\sim_f}$ if and only if $f(a)=f(b)$.
Your case is with $X=Y=\mathbb{S}^1$ and $f(z)=z^2$.