# Deriving the expression spherical basis vector in terms of the polar basis using differentiation of the position vector

Suppose we have a geometric point $$p$$ in $$3-d$$ space, we can assign coordinates $$(\chi,\phi, \theta)$$ in spherical and $$(r,\epsilon,z)$$ in polar (*). Now, the radial unit vector in polar coordinates is given by the following derivative:

$$\frac{\partial R(r,\phi,\theta)}{\partial r} = \hat{r}$$

For purposes of representing the unit cylindrical radial vector in spherical basis, I can write the same point in spherical coordinates which turns LHS into:

$$\frac{ \partial R \left[ \chi(r, \epsilon,z), \phi(r, \epsilon,z) , \theta(r, \epsilon,z) \right]}{\partial r} = \hat{r}$$

By the multivariable chain rule, the LHS becomes:

$$\frac{\partial \chi}{\partial r} \frac{\partial R}{\partial \chi} + \frac{\partial \phi}{\partial r} \frac{\partial R}{\partial \phi} + \frac{\partial \theta}{\partial r} \frac{\partial R}{\partial \theta} = \hat{r}$$

Now, I use the fact that $$\chi \sin \phi =r$$(**), this leads to:

$$\sin \phi e_{\chi} + \chi \cos \phi e_{\phi}= \hat{r}$$

However, I can't seem to see why this result should be the case geometrically. Here is a picture I drew of the set up:

It's clear that the direction should be in the $$\hat{r}$$ but it seems like the magnitude isn't unit. What am I missing?

Legend: Green is the magnitude of vectors, black is the basis vector attached to it. I am using the basis which is not normalized.

*: $$\epsilon$$ is angle with the $$x$$ axis in polar/ a line. In spherical, $$\phi$$ is the angle with the z-axis line and is between $$0$$ and $$180$$ degree. Btw I know the symbols are kinda whacky here, that's because there were to many angles and radiuses

**: $$\chi \sin \phi =r$$, I write the differential:

$$d \chi \sin \phi + \chi \cos \phi d \phi = dr$$

To get partial with $$\phi$$, I put $$d \chi=0$$ and I divide both sides by $$d\phi$$

I think I may have figured out the error now. The philosophy is that in the polar grid, we are free to move with three degrees of freedom. However, in the corresponding motion in the the spherical grid the spherical variables aren't independent(when writing chart transition map in spherical).

Fixed method:

$$z^2 + r^2 = \chi^2$$

And, $$\frac{r}{z} = \tan \phi$$

From the above two we get that: $$\frac{\cos \phi}{\chi} = \frac{\partial \phi}{\partial r} \tag{1}$$

And,$$\sin \phi =\frac{\partial \chi}{\partial r} \tag{2}$$

Plugging these two in the expression for basis we get:

$$\hat{r}= \sin \phi e_{\chi} + \cos \phi \frac{ e_{\phi}}{\chi}$$

Which is indeed unit.