Converting from cylindrical to spherical coordinates for a field

176 Views Asked by At

Say I have the field

$$F(r,\theta,z) = 5r\hat{r}+z\hat{\theta}+\theta\hat{z}.$$

Using the conversions found in the source transformations table in the 3rd row, 2nd column of this wiki page, image here I came up with the following transformation matrix: \begin{Bmatrix} F_{\rho} \\ F_{\theta} \\ F_{\psi} \\ \end{Bmatrix} = \begin{Bmatrix} \sin{\theta} & 0 & \cos{\theta} \\ 0 & 1 & 0 \\ \cos{\theta} & 0 & -\sin{\theta} \\ \end{Bmatrix} *

\begin{Bmatrix} F_{r} \\ F_{\theta} \\ F_{z} \\ \end{Bmatrix}

Sorry for the weird formatting, but it should be vect1 = matrix*vect2. Upon performing this on the specified vector field in cylindrical coordinates, I get something in terms of $r$, $z$, and $\theta$, instead of the same variables in spherical coordinates. How do I fix this, because the outputted vector is definitely not in spherical coordinates?