# Help on Jacobian Matrix for Cartesian to Spherical

Hi. First off I don't know if this is the right topic area for this question so I'm sorry if it isn't.
So my current situation is that I can find the jacobian matrix for a transformation from spherical to cartesian coordinates and then take the inverse of that matrix to get the mapping from cartesian to spherical. But this inverse matrix has sin, cos terms etc. I was hoping if someone could give me the jacobian matrix for cartesian to spherical directly using: the functions of the cartesian coordinates to give the spherical coordinates. I cannot find it anywhere online as every site simply has it in the inverse matrix form and I have no way of really checking myself.

I was wondering the same thing--or maybe the opposite. This page for instance, gives the jacobian matrix:
$$\left[\begin{array}{ccc} sin(\theta)cos(\phi) & sin(\theta)sin(\phi) & cos(\theta) \\ r cos(\theta)cos(\phi) & r cos(\theta)sin(\phi) & -r sin(\theta) \\ -r sin(\theta)sin(\phi) & r sin(\theta)cos(\phi) & 0 \end{array}\right]$$
which the author finds by calculating the total derivative for the spherical coordinates.I tried to do the same thing going the other direction and got:
$$\frac{\partial}{{\partial}x} =\frac{{\partial}r}{{\partial}x}\frac{\partial}{{\partial}r} + \frac{{\partial}\theta}{{\partial}x}\frac{{\partial}}{{\partial}\theta}+\frac{{\partial}\phi}{{\partial}x}\frac{{\partial}}{{\partial}\phi} =\frac{1}{sin(\theta)cos(\phi)}\frac{\partial}{{\partial}r}+\frac{1}{r cos(\theta)cos(\phi)}\frac{\partial}{{\partial}\theta}+\frac{-1}{r sin(\theta)sin(\phi)}\frac{\partial}{{\partial}\phi}$$
which is not what you would calculate using the inverse matrix. I suspect the problem is that I used $$\frac{{\partial}r}{{\partial}x}=\frac{1}{\frac{{\partial}x}{{\partial}r}}$$
After finding this thread I think the reason this doesn't work is because phi and theta depend on y and z, so you need explicitly figure out that dependence:
$$x=r sin(\theta)cos(\phi)=r sin(arcsin(z/r))cos(arcsin(\frac{y}{r sin(\theta)}))=\sqrt{r^2-z^2}\sqrt{1-\frac{y^2}{r^2-z^2}}=\sqrt{r^2-z^2-y^2}$$
Now you can take the derivative of this with respect to r while holding z and y constant and then make some substitutions and take the reciprocal. Then repeat for the other partials involved...

Presumably there's an easier way to do this since finding the matrix inverse works just as well and I don't think it would require as much work