I Transforming coordinates between Cartesian and spherical

AI Thread Summary
The discussion revolves around the transformation of coordinates between Cartesian and spherical systems, focusing on the confusion surrounding the use of a specific transformation matrix. The user highlights that while the transformation equations for Cartesian to spherical coordinates are nonlinear and cannot be represented by a matrix, the unit vectors can be transformed using a rotation matrix. They express confusion over an equation presented in various resources that allegedly converts Cartesian vector components to spherical components, which yields nonsensical results when tested with simple values. The user questions the validity of this equation and whether a correct matrix exists for transforming finite displacements between the two coordinate systems. The thread remains open for further clarification and responses.
trekie
Messages
17
Reaction score
0
I apologize if this has been asked before. I searched on this site and others but didn't find this particular issue. My background is physics and math.

My question is near the end of the post. First, let me explain my thoughts leading up to my question. After many years, I'm reviewing the coordinate transformation between cartesian and spherical coordinates. I'm using the physics convention of theta = polar angle, phi = azimuthal angle. The first thing I noticed is that, since the coordinate transformation equations:

$$\mbox{x=r}\sin{\theta}\cos{\phi}$$
$$\mbox{y=r}\sin{\theta}\sin{\phi}$$
$$\mbox{z=r}\cos{\theta}$$

are nonlinear, then they can't be written as a matrix:

$$\left(\begin{array}{cc}x\\y\\z\end{array}\right)\mbox{=}\left(\begin{array}{cc}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{array}\right)\left(\begin{array}{cc}r\\\theta\\\phi\end{array}\right)$$

But the unit vectors, being elements of a vector space (which is inherently linear), can be transformed by a matrix:

$$\left(\begin{array}{cc}\hat{r}\\\hat{\theta}\\\hat{\phi}\end{array}\right)\mbox{=}\left(\begin{array}{cc}\sin{\theta}\cos{\phi}&\sin{\theta}\sin{\phi}&\cos{\theta}\\\cos{\theta}\cos{\phi}&\cos{\theta}\sin{\phi}&\mbox{-}\sin{\theta}\\\mbox{-}\sin{\phi}&\cos{\theta}&0\end{array}\right)\left(\begin{array}{cc}\hat{x}\\\hat{y}\\\hat{z}\end{array}\right)$$

Let's call this matrix R since it contains direction cosines and is clearly a rotation matrix (and therefore it's transpose = it's inverse).

Now comes the part that has me confused. Several websites and textbooks include the following equation:

$$\mbox{(equation 1) }\left(\begin{array}{cc}A_{r}\\A_{\theta}\\A_{\phi}\end{array}\right)\mbox{=}\left(\begin{array}{cc}\sin{\theta}\cos{\phi}&\sin{\theta}\sin{\phi}&\cos{\theta}\\\cos{\theta}\cos{\phi}&\cos{\theta}\sin{\phi}&\mbox{-}\sin{\theta}\\\mbox{-}\sin{\phi}&\cos{\theta}&0\end{array}\right)\left(\begin{array}{cc}A_{x}\\A_{y}\\A_{z}\end{array}\right)$$

which seems to be using the matrix R to convert the components of a cartesian vector into the components of a spherical-coordinates vector. This seems to make sense so I tested it on the simplest vector I could think of: a finite displacement from the origin to the point (x,y,z):

$$\Delta \vec{x}\mbox{=}\left(\begin{array}{cc}A_{x}\\A_{y}\\A_{z}\end{array}\right)\mbox{=}\left(\begin{array}{cc}\Delta x\\\Delta y\\\Delta z\end{array}\right)\mbox{=}\left(\begin{array}{cc}x-0\\y-0\\z-0\end{array}\right)\mbox{=}\left(\begin{array}{cc}x\\y\\z\end{array}\right)$$

Therefore plugging ##\Delta \vec{x}## into equation 1:

$$\left(\begin{array}{cc}\Delta \vec{x}_{r}\\\Delta \vec{x}_{\theta}\\\Delta \vec{x}_{\phi}\end{array}\right)\mbox{=}\left(\begin{array}{cc}\sin{\theta}\cos{\phi}&\sin{\theta}\sin{\phi}&\cos{\theta}\\\cos{\theta}\cos{\phi}&\cos{\theta}\sin{\phi}&\mbox{-}\sin{\theta}\\\mbox{-}\sin{\phi}&\cos{\theta}&0\end{array}\right)\left(\begin{array}{cc}x\\y\\z\end{array}\right)$$

where ##\Delta \vec{x}_{r}, \Delta \vec{x}_{\theta}\mbox{, and }\Delta \vec{x}_{\phi}## are the spherical coordinates of the finite displacement from the origin. But plugging in numbers gives gibberish: let (x,y,z) = (1,1,1). Then all sines and cosines of theta and phi are ##1/\sqrt{2}## and

$$\left(\begin{array}{cc}\Delta \vec{x}_{r}\\\Delta \vec{x}_{\theta}\\\Delta \vec{x}_{\phi}\end{array}\right)\mbox{=}\left(\begin{array}{cc}1/2&1/2&1/\sqrt{2}\\1/2&1/2&-1/\sqrt{2}\\-1/\sqrt{2}&1/\sqrt{2}&0\end{array}\right)\left(\begin{array}{cc}1\\1\\1\end{array}\right)$$

giving

$$\left(\begin{array}{cc}\Delta \vec{x}_{r}\\\Delta \vec{x}_{\theta}\\\Delta \vec{x}_{\phi}\end{array}\right)\mbox{=}\left(\begin{array}{cc}1+\frac{1}{\sqrt{2}}\\1-\frac{1}{\sqrt{2}}\\0\end{array}\right)$$

which makes no sense to me. The radial component of the displacement should = the magnitude of the displacement = ##\sqrt{3}##, and how can the phi component = zero?

1. Is equation 1 true?
2. If eqn. 1 is wrong then is there a matrix that transforms the components of a finite displacement between cartesian and spherical coordinates?
3. If eqn. 1 is true, then did I use equation 1 correctly?
 
Mathematics news on Phys.org
Thread closed temporarily for Moderation.

@trekie -- Please respond to the PM that I sent you over 12 hours ago. Thank you.
 
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top