Convert from rectangular to Spherical Coordinates

Click For Summary

Discussion Overview

The discussion revolves around the conversion of rectangular (Cartesian) coordinates to spherical coordinates, focusing on the mathematical expressions and relationships between the two systems. Participants explore the definitions and components of spherical coordinates, including the radial, azimuthal, and polar angles, and how they relate to Cartesian coordinates.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants question the correctness of various expressions for the position vector in spherical coordinates, particularly the use of angles as components.
  • Others provide definitions for the spherical coordinates: \( r = \sqrt{(x^2 + y^2 + z^2)} \), \( \theta = \arctan{(\frac{y}{x})} \), and \( \phi = \arccos{(\frac{z}{r})} \).
  • A participant suggests that the Cartesian position vector can be expressed in spherical coordinates as \( \vec r = r \hat r \), while others argue about the roles of \( \hat \theta \) and \( \hat \phi \).
  • There are discussions about the dimensionality of the components and whether they can be added together, with some participants asserting that adding vectors of different dimensions is incorrect.
  • Some participants express uncertainty about how to convert Cartesian coordinates to spherical coordinates and seek clarification on the relationships between the unit vectors.
  • A drawing is referenced to illustrate the relationship between the Cartesian and spherical coordinate systems, emphasizing the importance of visualizing the vectors involved.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct expressions for the position vector in spherical coordinates. There are competing views on how to properly define and relate the components of the vectors, and the discussion remains unresolved regarding the correct formulation.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the relationships between the coordinate systems, as well as the varying definitions and conventions used by participants. The mathematical steps involved in the conversion are not fully resolved.

Philosophaie
Messages
456
Reaction score
0
How do you convert this to Spherical Components?

Spherical Convention = (radial, azimuthal, polar)

##\vec r = |\vec r| * \cos{(\theta)} * \sin{(\phi)} * \hat x +|\vec r| * \sin{(\theta)} * \sin{(\phi)} * \hat y +|\vec r| * \cos{(\phi)} * \hat z##

Is this correct?

##\vec r =\sqrt{(x^2 + y^2 + z^2)} * \hat r + \arctan{(\frac{y}{x})} * \hat \theta + \arccos{(\frac{z}{r})} * \hat \phi##
 
Physics news on Phys.org
No, it is not correct. Please show your work.
 
Cartisian Coordinates
##\vec r = x * \hat x + y * \hat y + z * \hat z##
##x = |\vec r| \cos{\theta} \sin{\phi}##
##y = |\vec r| \sin{\theta} \sin{\phi}##
##z = |\vec r| \cos{\phi}##
Spherical Coordinates
##r = \sqrt{(x^2 + y^2 + z^2)}##
##\theta = \arctan{(\frac{y}{x})}##
##\phi = \arccos{(\frac{z}{r})}##
##\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi##
or is it
##\vec r = r \hat r + \frac{\theta}{r\sin{\phi}} \hat \theta +\frac{\phi}{r} \hat \phi##
 
Philosophaie said:
##\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi##
or is it
##\vec r = r \hat r + \frac{\theta}{r\sin{\phi}} \hat \theta +\frac{\phi}{r} \hat \phi##

Neither of those is correct. You are even adding vectors with different physical dimension ... I suggest you express the Cartesian basis vectors in terms of the spherical basis vectors and start from the Cartesian expression for the position vector.
 
What would be the expression in terms of Spherical Coordinates
##\vec r = r(x,y,z) \hat r + \theta(x,y,z) \hat \theta + \phi(x,y,z) \hat \phi##
##r(x,y,z)=?##
##\theta(x,y,z)=?##
##\phi(x,y,z)=?##
 
Why don't you try drawing it out? As you said, in Cartesian Coordinates the position vector is \vec r = x * \hat x + y * \hat y + z * \hat z. When you draw this out, in what direction is it pointing in spherical coordinates? How much of it is pointing along the r, θ, and φ unit vectors?
 
If I draw it out the Spherical Coordinates are:
##r = \sqrt{(x^2 + y^2 + z^2)}##
##\theta = \arctan{(\frac{y}{x})}##
##\phi = \arccos{(\frac{z}{r})}##
##\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi##
##\hat \theta## and ##\hat \phi## are along the arcs.
 
Philosophaie said:
##\hat \theta## and ##\hat \phi## are along the arcs.

Right. So if I decompose the Cartesian position vector into the spherical coordinate unit vectors, how much of the Cartesian position vector points along these arcs?
 
Philosophaie said:
=√(x2+y2+z2)r=(x2+y2+z2)r = \sqrt{(x^2 + y^2 + z^2)}
θ=arctan(yx)θ=arctan⁡(yx)\theta = \arctan{(\frac{y}{x})}
ϕ=arccos(zr)ϕ=arccos⁡(zr)\phi = \arccos{(\frac{z}{r})}
⃗r=r^r+θ^θ+ϕ^ϕr→=rr^+θθ^+ϕϕ^\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi
Is correct then?
 
  • #10
##r = \sqrt{(x^2 + y^2 + z^2)}##
##\theta = \arctan{(\frac{y}{x})}##
##\phi = \arccos{(\frac{z}{r})}##
##\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi##
is correct then?
 
  • #11
Philosophaie said:
##r = \sqrt{(x^2 + y^2 + z^2)}##
##\theta = \arctan{(\frac{y}{x})}##
##\phi = \arccos{(\frac{z}{r})}##
##\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi##
is correct then?

No. You didn't answer my question.
 
  • #12
##\arctan{(\frac{y}{x})}## points in the ##\hat \theta## direction.
##\arccos{(\frac{z}{r})}## points in the ##\hat \phi## direction.
 
  • #13
Philosophaie said:
##\arctan{(\frac{y}{x})}## points in the ##\hat \theta## direction.
##\arccos{(\frac{z}{r})}## points in the ##\hat \phi## direction.
A scalar cannot "point" in any direction. You were asked to decompose the Cartesian basis vectors into the spherical ones in post #4 and to make the drawing with the position vector relative to a point in spherical coordinates twice in posts #6 and #8. I suggest that you follow either or both of these suggestions.
 
  • #14
Uncertain how to convert x,y,z to ##(\hat r, \hat \theta, \hat \theta)##. Can you give a hint?
 
  • #15
Are you familiar with how to express the spherical basis vectors in Cartesian coordinates?
 
  • #16
Look above. Post #1.
 
  • #17
Philosophaie said:
Look above.
You have not done so above.
 
  • #18
Have you drawn out the vectors yet? If so, can you post a picture?
 
  • #19
$$\vec{r}=r\hat{r}$$
 
  • #20
Attached is a drawing. r is in a 3d box or x,y,z. On the xy plane starting on x-axis is ##\theta## starting on the arc is ##\hat \theta## as a unit vector. On the z-xy plane directly down from r to the xy plane. Starting from the z-axis to r to the xy plane is ##\phi## starting on the arc ##\hat \phi## as a unit vector.
 

Attachments

  • SphericalFromCartesian_0001.jpg
    SphericalFromCartesian_0001.jpg
    63.8 KB · Views: 620
Last edited:
  • #21
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.
Philosophaie said:
##r = \sqrt{(x^2 + y^2 + z^2)}##
##\theta = \arctan{(\frac{y}{x})}##
##\phi = \arccos{(\frac{z}{r})}##
 
  • #22
It would be better to look at the components or ##\vec{dr}## in spherical coordinates, rather than the components of ##\vec{r}##.
 
  • #23
So how do you emulate the radial component with ##\theta## and ##\phi## into one equation encompassing ##\hat r##, ##\hat \theta## and ##\hat \phi##?
 
  • #24
Philosophaie said:
So how do you emulate the radial component with ##\theta## and ##\phi## into one equation encompassing ##\hat r##, ##\hat \theta## and ##\hat \phi##?

How about \vec r = r*\hat r + 0* \hat \theta + 0 * \hat \phi ?
 
  • #25
There is no direction for r.
 
  • #26
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?
 
  • #27
Philosophaie said:
Attached is a drawing. r is in a 3d box or x,y,z. On the xy plane starting on x-axis is ##\theta## starting on the arc is ##\hat \theta## as a unit vector. On the z-xy plane directly down from r to the xy plane. Starting from the z-axis to r to the xy plane is ##\phi## starting on the arc ##\hat \phi## as a unit vector.
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:
  • Like
Likes   Reactions: Philosophaie
  • #28
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:
  • #29
Philosophaie said:
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?

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.
 
  • #30
What is different?
Does x,y,z not equal r,theta,phi in post #29?
 
Last edited:

Similar threads

  • · Replies 10 ·
Replies
10
Views
6K
Replies
3
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K