Finding the smooth inverse of a function Problem: The mapping $\phi: S^2 \longrightarrow S^2 $ by $$\phi(x,y,z)=(x\cos z+y\sin z,x\sin z-y \cos z,z)$$ is a diffeomorphism.  Where $S^2$ is a unit sphere in $\mathbb{R}^3$. 
I've already shown that $\phi$ is smooth and bijective. The only thing I can't find is $\phi^{-1}$ that is smooth.
Any help would be much appreciated!
 A: Let $a=(x,y,z)\in S^2$. If we know that the derivative $d\phi_a: T_aS^2\to T_{\phi(a)}S^2$ is nonsingular, then we know that $\phi$ has a local inverse, defined and smooth in a neighborhood of $\phi(a)$.
Now, thinking for the moment of $\phi$ as a map on $\Bbb R^3$, we have
$$d\phi_a = \begin{bmatrix} \cos z & \sin z & -x\sin z + y\cos z \\
\sin z & -\cos z & x\cos z+\sin z \\
0 & 0 & 1\end{bmatrix}.$$
The determinant of $d\phi_a$ is $-1$ and hence $d\phi_a$ is invertible as a map $T_a \Bbb R^3\to T_{\phi(a)}\Bbb R^3$. It follows that the restriction of $d\phi_a$ to a map $T_a S^2\to T_{\phi(a)}S^2$ must be nonsingular (why?).
Therefore, it follows that $\phi$ has a local smooth inverse mapping a neighborhood of $\phi(a)\in S^2$ to $a\in S^2$. [If you haven't seen this application before, you can deduce it by using charts or parametrizations at $a$ and $\phi(a)$ and reducing to a question about the mapping of an open set in $\Bbb R^2$ to an open set in $\Bbb R^2$.]
A: To find $\phi^{-1}$ explicitly, let's define
$$ \begin{align*} a &= x \cos z + y \sin z \\
b &= x \sin z - y \cos z \\
c &= z \end{align*} $$
so that $\phi(x,y,z) = (a,b,c)$ and $\phi^{-1}(a,b,c) = (x,y,z)$. It just remains to write $x,y,z$ in terms of $a,b,c$.
Getting rid of $z$ is obvious:
$$ \begin{align*} a &= x \cos c + y \sin c \\
b &= x \sin c - y \cos c \end{align*} $$
To eliminate $x$, multiply the equations so both include the term $(x \cos c \sin c)$, then subtract:
$$ \begin{align*} a \sin c &= x \cos c \sin c + y \sin^2 c \\
b \cos c &= x \cos c \sin c - y \cos^2 c \\
a \sin c - b \cos c &= y (\sin^2 c + \cos^2 c) = y \end{align*}$$
Similarly eliminating $y$,
$$ \begin{align*} a \cos c &= x \cos^2 c + y \sin c \cos c \\
b \sin c &= x \sin^2 c - y \sin c \cos c \\
a \cos c + b \cos c &= x(\cos^2 c + \sin^2 c) = x \end{align*} $$
So finally,
$$ \phi^{-1}(a,b,c) = (a \cos c + b \sin c, a \sin c - b \cos c, c) $$
Look familiar? It happens that $\phi^{-1} = \phi$. This is because at each fixed value of $z=c$, the relationship between $(x,y)$ and $(a,b)$ describes a reflection of the $\mathbb{R}^2$ plane.
A: You can obtain the inverse $(x,y,z) = \phi^{-1}(X,Y,Z)$ as follows:
$$x\cos z + y\sin z = X$$
$$-y\cos z+x\sin z = Y$$
$$ z = Z$$
The first two can be read as the complex multiplication
$$ (x+iy)(\sin z+i\cos z) = Y+iX$$
which quickly (upon division) leads to
$$ x=Y\sin Z +X\cos Z$$
$$ y=X\sin Z - Y\cos Z$$
Smoothness of $\phi^{-1}$ is then apparent.
