# What is the analogue of the rotation matrix in polar coordinates?

In cartesian coordinates, a rotation around the z axis is represented as:

$$\left( \begin{array}{ccc} \cos\phi & \sin\phi & 0\\ -\sin\phi & \cos\phi & 0\\ 0&0&1 \end{array} \right)$$ What is the analogue in spherical coordinates?

EDIT My change of coordinates is:

$$x=r \sin\theta\cos\phi$$

$$y=r \sin\theta\sin\phi$$

$$z=r \cos\theta$$

• Perhaps that you just add a constant to the angle $\varphi$? Dec 31, 2020 at 10:09
• @MattiP. But in spherical coordinates a vector is represented in the basis $$\left(\begin{array}{c} r\\ \theta\\ \phi \end{array}\right)$$ this confuses me. Dec 31, 2020 at 10:15
• I started to write out an answer, but realized that there are too many conventions that are ambiguous here. For example, your rotation is clockwise as viewed looking down the $z$-axis towards the origin, sending positive $+x \mapsto -y$ and $+y \mapsto +x$ for $\phi = +\frac{\pi}{2}$, which is the reverse of the standard convention. Dec 31, 2020 at 10:21
• Please edit your question to include the explicit change-of-coordinates from spherical to cartesian that you're using, i.e. give each of $x$, $y$, and $z$ in terms of $r$, $\theta$, and $\phi$. Dec 31, 2020 at 10:23
• @SammyBlack I have edited the question as required Dec 31, 2020 at 10:38

We wish to rotate a vector $$\vec{r}$$ to $$R\vec{r}$$ for a suitable rotation matrix $$R$$. I should make an important conceptual correction: the correct representation of $$\vec{r}$$ is $$r\hat{r}$$, not $$r\hat{r}+\theta\hat{\theta}+\phi\hat{\phi}$$ or whatever you were thinking of. In particular\begin{align}\hat{r}&=\sin\theta\cos\phi\hat{i}+\sin\theta\sin\phi\hat{j}+\cos\theta\hat{k},\\\hat{\theta}&=\cos\theta\cos\phi\hat{i}+\cos\theta\sin\phi\hat{j}-\sin\theta\hat{k},\\\hat{\phi}&=-\sin\phi\hat{i}+\cos\phi\hat{j}\end{align}is our orthonormal basis. We can write these equations as $$\hat{S}_A=T_{Aa}\hat{C}_a$$ (I sum over repeated indices), with $$\hat{C}_a$$ ($$\hat{S}_A$$) the Cartesian (spherical) basis vectors, e.g. $$T_{ri}=\sin\theta\cos\phi$$. Now you just want to compute $$R_{AB}=T_{Aa}R_{ab}(T^{-1})_{bB}$$, or in matrix terms $$R^\text{spherical}=TR^\text{Cartesian}T^{-1}$$; I'll leave that to you.