# I Convert from rectangular to Spherical Coordinates

1. Oct 6, 2017

### phyzguy

I think you are confused between transforming the coordinates from Cartesian to spherical and transforming the unit vectors. Your earlier post on transforming the coordinates, below, is correct. But, as ChesterMiller has told you, the Cartesian position vector: $\vec r = x * \hat x + y * \hat y + z * \hat z$ in spherical coordinates is simply: $\vec r = r * \hat r$ . The unit vectors $\hat \theta$ and $\hat \phi$ are orthogonal to the Cartesian position vector, so their projection along the Cartesian position vector is zero.

2. Oct 6, 2017

### Staff: Mentor

It would be better to look at the components or $\vec{dr}$ in spherical coordinates, rather than the components of $\vec{r}$.

3. Oct 6, 2017

### Philosophaie

So how do you emulate the radial component with $\theta$ and $\phi$ into one equation encompassing $\hat r$, $\hat \theta$ and $\hat \phi$?

4. Oct 6, 2017

### phyzguy

How about $\vec r = r*\hat r + 0* \hat \theta + 0 * \hat \phi$ ?

5. Oct 6, 2017

### Philosophaie

There is no direction for r.

6. Oct 6, 2017

### phyzguy

Do you mean $\hat r$? It certainly does have a direction. It points radially outward from the spherical coordinate system origin. I'm still struggling to see where your confusion lies. Maybe it is this. In a Cartesian coordinate system the unit vectors point in the same direction everywhere. In a curvilinear coordinate system like spherical coordinates, the direction of the unit vectors varies from point to point, so the unit vector $\hat r$ points in different directions at different places. Could this be the point you are missing?

7. Oct 6, 2017

### FactChecker

Your diagram should always be the first step -- define your coordinate system, both (x,y,z) and (r,θ,φ). There are all sorts of different conventions. With that said, I agree with all your work in post #3 except for your definition of the vector $\vec r$ . It would be correct to say $\vec r$ = (r,θ,φ). I would only use an addition notation if it was made clear that none of the components could really be added (as we do in complex numbers with x+iy and in several other algebras). Once you have defined a unit vector, $\hat r$ using θ and φ, there is no more use for θ,φ in specifying $\vec r$. So $\vec r$ = r $\hat r$

PS I can't seem to get some of the symbols to work correctly, but I hope the meaning is clear.

Last edited: Oct 9, 2017
8. Oct 9, 2017

### Philosophaie

From Post #3:
$r \hat{r} + \theta \hat{\theta} + \phi \hat{\phi} = \sqrt{(x^2 + y^2 + z^2)} \hat{r} + \arctan{(\frac{y}{x})} \hat{\theta} + \arccos{(\frac{z}{r})} \hat{\phi}$
Is this a true equation?

Last edited: Oct 9, 2017
9. Oct 9, 2017

### phyzguy

Yes. But it is not the same vector as $x * \hat x + y * \hat y + z * \hat z$, which is what you stated in posts 1 and 3.

10. Oct 9, 2017

### Philosophaie

What is different?
Does x,y,z not equal r,theta,phi in post #29?

Last edited: Oct 9, 2017
11. Oct 9, 2017

### phyzguy

Several of us have already explained to you several times what is wrong with your thinking. You need to go back and read the posts above carefully.

12. Oct 10, 2017

### Philosophaie

No one explained to me that all the direction that I needed was give to me was in $\hat r$. Thank you everyone trying to make me come to this conclusion.

13. Oct 10, 2017

### phyzguy

Posts 19, 21, and 24 all told you that the position vector $\vec r = r * \hat r$ . I'm glad you finally arrived at the correct conclusion.

14. Oct 10, 2017

### Orodruin

Staff Emeritus
No, from the beginning everybody posting in this thread tried to tell you that you could not just assume that and help you figure it out for yourself. Then, finally, it was put explicitly in post #19.