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.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
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 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top