How to arrive at the following from given $ x = r\sin \theta \cos \phi, y = r\sin \theta \sin \phi, z=r\cos\theta $

$$ \begin{bmatrix} A_x\\ A_y\\ A_z \end{bmatrix} = \begin{bmatrix} \sin \theta \cos \phi & \cos \theta \cos \phi & -\sin\phi\\ \sin \theta \sin \phi & \cos \theta \sin \phi & \cos\phi\\ \cos\theta & -\sin\theta & 0 \end{bmatrix} \begin{bmatrix} A_r\\ A_\theta\\ A_\phi \end{bmatrix}$$

Also how show that $$ \begin{bmatrix} \hat i\\ \hat j\\ \hat k \end{bmatrix} = \begin{bmatrix} \sin \theta \cos \phi & \cos \theta \cos \phi & -\sin\phi\\ \sin \theta \sin \phi & \cos \theta \sin \phi & \cos\phi\\ \cos\theta & -\sin\theta & 0 \end{bmatrix} \begin{bmatrix} \hat e_r\\ \hat e_\theta\\ \hat e_\phi \end{bmatrix}$$ How to change $(a,b,c)$ into spherical polar coordinates and $ (r ,\theta, \phi)$ into cartesian coordinates using this matrix? Thank you!!

  • $\begingroup$ Hi @Potato can you please help me with it?? $\endgroup$
    – hasExams
    Jun 24 '12 at 8:09
  • $\begingroup$ For posterity: I think one of those transformation matrices should be inverted/transposed --- the components should transform oppositely to the bases... right? $\endgroup$ Dec 31 '19 at 18:57

I can partially answer this. I believe your first matrix is not the correct general transformation matrix for cartesian to spherical coordinates because you are missing factors of $\rho$ (the radial coordinate), as well as some other incorrect pieces. So it is not clear what you are trying to show.

If you are trying to derive the general transformation matrix from spherical to cartesian, it is: $$\begin{bmatrix} A_x\\ A_y\\ A_z \end{bmatrix} = \begin{bmatrix} \sin \theta \cos \phi & \rho \cos \theta \cos \phi & -\rho \sin \theta \sin\phi\\ \sin \theta \sin \phi & \rho \cos \theta \sin \phi & \rho \sin\theta \cos\phi\\ \cos\theta & -\rho \sin\theta & 0 \end{bmatrix} \begin{bmatrix} A_r\\ A_\theta\\ A_\phi \end{bmatrix} $$ This matrix is formed from the derivative matrix in the following way: $ \sum_{(i,j)} \frac {\partial x^i} {\partial u^j} $ where $$x^1 = \rho\sin \theta \cos \phi, x^2 = \rho\sin \theta \sin \phi, x^3=\rho\cos\theta$$ and $u^1 = \rho, u^2 = \theta, u^3 = \phi $ (Note: the superscripts are indices, not exponents). If you write out all the derivatives, you get this matrix:

$$ \begin{bmatrix} A_x\\ A_y\\ A_z \end{bmatrix} = \begin{bmatrix} \frac {\partial (\rho \sin \theta \cos \phi)} {\partial \rho} & \frac {\partial (\rho \sin \theta \cos \phi)} {\partial \theta} & \frac {\partial (\rho \sin \theta \cos \phi)} {\partial \phi}\\ \frac {\partial (\rho \sin \theta \sin \phi)} {\partial \rho} & \frac {\partial (\rho \sin \theta \sin \phi)} {\partial \theta} & \frac {\partial (\rho \sin \theta \sin \phi)} {\partial \phi}\\ \frac {\partial (\rho \cos \theta)} {\partial \rho} & \frac {\partial (\rho \cos \theta)} {\partial \theta} & \frac {\partial (\rho \cos \theta)} {\partial \phi} \end{bmatrix} \begin{bmatrix} A_r\\ A_\theta\\ A_\phi \end{bmatrix} $$ ...which evaluates to the correct general transformation matrix I listed above.


I don't think you should use the matrix you gave for converting position. This matrix is used when you have a vector $\vec{A} = A_{r} \hat{r} + A_{\theta} \hat{\theta} + A_{\phi} \hat{\phi}$ and you want to rewrite it as $\vec{A} = A_{x} \hat{x} + A_{y} \hat{y} + A_{z} \hat{z}$. The matrix was obtained by stacking together $\hat{r}$, $\hat{\theta}$, $\hat{\phi}$ as columns of the transformation matrix.

Converting position from one coordinate system to another is a totally different story. You can do $r = \sqrt{x^2+y^2+z^2}$. This would let you solve for $\theta$ and then you can solve for $\phi$. I can't think of any correct way to do what you are trying to do using matrices.


get the elements of the jacobian matrix, then divide them to their respective scale factors


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.