Finding inverse of $f: T \rightarrow S^1 \times S^1$ I'm trying to prove that the function $f: T \rightarrow S^1 \times S^1$ defined as:
$$
f(x,y,z) = \left\{\left( \frac{x}{\sqrt{x^2+y^2}} , \frac{y}{\sqrt{x^2+y^2}})\right) , \left(\frac{\sqrt{x^2 + y^2} - R}{r} , \frac{z}{r} \right)\right\}
$$
Is a homeomorphism, where $T$ is the set $T = \{(x,y,z) \in \mathbb{R^3} :(\sqrt{x^2+y^2} - R)^2 + z^2=r^2\}$, $0 < r < R$ and $S^1$ is the unit circle.
I don't have problems seeing that $f$ is continuous and an injection, however, I'm not sure how to prove that it is a surjection.
Also, I don't know how to find the inverse. I have seen in other question that the inverse is the function
$$ f^{-1}((a,b),(c,d)) = ((c+R)a, (c+R)b, rd) $$
How can I obtain this expression?

I suggest to write $\mathbb R^3 = \mathbb C \times \mathbb R$. Then $S^1 = \{ w \in \mathbb C \mid \lvert w \rvert = 1\}$ and $T = \{(w,z) \in \mathbb C \times \mathbb R \mid (\lvert w \rvert - R)^2 + z^2 = r^2 \}$. We can  now write
$$f(w,z) =  \left(\frac{w}{\lvert w \rvert},\frac 1 r(\lvert w \rvert - R + iz) \right) .$$
Note that in fact $\frac 1 r(\lvert w \rvert -R + iz) \in S^1$ since this is equivalent to  $(\lvert w \rvert -R)^2 + z^2 = r^2$.
Let us assume that $f$ is a bijection, i.e. there exists an inverse $g : S^1 \times S^1 \to T$ for $f$. Write
$g(u,v) = (g_1(u,v), g_2(u,v))$ with a complex-valued $g_1$ and a real-valued $g_2$. Since $g \circ f = id$, we get

*

*$g_1\left(\frac{w}{\lvert w \rvert},\frac 1 r(\lvert w \rvert - R + iz) \right) = w$,

*$g_2\left(\frac{w}{\lvert w \rvert},\frac 1 r(\lvert w \rvert - R + iz) \right) = z$.

Since $f$ was assumed to be bijective, we know that each $(u,v)$ has the form $(u,v) = \left(\frac{w}{\lvert w \rvert},\frac 1 r(\lvert w \rvert - R + iz) \right)$ with a unique $(w,z) \in T$. Writing $\lambda = \lvert w \rvert  > 0$, we conclude from 1. and 2. that
$$g(u,v) = (\lambda u, r\operatorname{Im} v)$$
Clearly $\lambda$ depends on the pair $(u,v)$. But we also have $v = \frac 1 r(\lambda - R + iz)$, i.e. $\frac 1 r(\lambda - R) =  \operatorname{Re} v$. This means $\lambda = R + r\operatorname{Re} v$.
The above considerations show that $g$, if it exists, must necessarily have the form
$$g(u,v) =  ((R + r\operatorname{Re} v)u, r\operatorname{Im} v) .$$
This is obviously a contiuous function with values in $\mathbb C \times \mathbb R$. You can now easily check that

*

*$((R + r\operatorname{Re} v)u, r\operatorname{Im} v) \in T$


*$g \circ f = id$


*$f \circ g = id$
This shows that $g$ is in fact the desired inverse for $f$.
