logo

Conversion of Cartesian Coordinate System Unit Vectors to Spherical Coordinate System Unit Vectors 📂Mathematical Physics

Conversion of Cartesian Coordinate System Unit Vectors to Spherical Coordinate System Unit Vectors

Formulas

The expression for converting the unit vectors from the Cartesian coordinate system to the spherical coordinate system is as follows. x^=cosϕsinθr^+cosϕcosθθ^sinϕϕ^y^=sinϕsinθr^+sinϕcosθθ^+cosϕϕ^z^=cosθr^sinθθ^ \begin{align*} \hat{ \mathbf{x} }&= \cos \phi \sin \theta \hat{ \mathbf{r} } + \cos \phi \cos \theta \hat{ \boldsymbol{\theta} } - \sin\phi\hat{ \boldsymbol{\phi} } \\ \hat{ \mathbf{y} } &= \sin\phi\sin\theta \hat{ \mathbf{r} } + \sin\phi\cos\theta\hat{ \boldsymbol{\theta} } + \cos\phi\hat{ \boldsymbol{\phi} } \\ \hat{ \mathbf{z} } &= \cos\theta\hat{ \mathbf{r} } - \sin\theta\hat{ \boldsymbol{\theta} } \end{align*}

The expression for converting the unit vectors from the spherical coordinate system to the Cartesian coordinate system is as follows. (Relation between spherical and Cartesian coordinate systems)

r^=cosϕsinθx^+sinϕsinθy^+cosθz^θ^=cosϕcosθx^+sinϕcosθy^sinθz^ϕ^=sinϕx^+cosϕy^ \begin{align*} \hat{ \mathbf{r} } &= \cos\phi \sin\theta \hat{ \mathbf{x} } + \sin\phi \sin\theta\hat{ \mathbf{y} } + \cos\theta\hat{ \mathbf{z} } \\ \hat{ \boldsymbol{\theta} } &= \cos\phi \cos\theta \hat{ \mathbf{x} } + \sin\phi \cos\theta\hat{ \mathbf{y} } - \sin\theta\hat{ \mathbf{z} } \\ \hat{ \boldsymbol{\phi} } &= -\sin\phi \hat{ \mathbf{x} } + \cos\phi \hat{ \mathbf{y} } \end{align*}

Derivation

Unit vector x^\hat{\mathbf{x}}

To find x^\hat{ \mathbf{x} }, you need to multiply certain terms by r^, θ^, ϕ^\hat{ \mathbf{r} } ,\ \hat{ \boldsymbol{\theta} } ,\ \hat{ \boldsymbol{\phi} } and add them so that the y^, z^\hat{ \mathbf{y} } ,\ \hat{ \mathbf{z} } term disappears. It can be seen that multiplying r^\hat{ \mathbf{r} } by sinθ\sin \theta and adding that to θ^\hat{ \boldsymbol{\theta} } multiplied by cosθ\cos \theta makes the z^\hat{ \mathbf{z} } term vanish.

sinθr^+cosθθ^=(cosϕsin2θ+cosϕcos2θ)x^+(sinϕsin2θ+sinϕcos2θ)y^=cosϕx^+sinϕy^ \begin{align*} & \sin \theta \hat{ \mathbf{r} } + \cos \theta \hat{ \boldsymbol{\theta} } \\ &= (\cos \phi \sin^2 \theta + \cos \phi \cos^2\theta)\hat{ \mathbf{x} } + (\sin \phi \sin^2 \theta + \sin \phi \cos^2 \theta)\hat{ \mathbf{y} } \\ &= \cos \phi \hat{ \mathbf{x} } +\sin \phi \hat{ \mathbf{y} } \end{align*}

Further, by multiplying this result by cosϕ\cos \phi and adding it to ϕ^\hat{ \boldsymbol{\phi} } multiplied by sinϕ-\sin \phi, you can neatly obtain x^\hat{ \mathbf{x} }.

cosϕ(sinθr^+cosθθ^)sinϕϕ^=(cos2ϕx^+cosϕsinϕy^)+(sin2ϕx^sinϕcosϕy^)=x^ \begin{align*} & \cos \phi (\sin \theta \hat{ \mathbf{r} } + \cos \theta \hat{ \boldsymbol{\theta} })-\sin \phi \hat{ \boldsymbol{\phi} } \\ &= (\cos^2\phi \hat{ \mathbf{x} } + \cos \phi \sin \phi \hat{ \mathbf{y} } ) + (\sin^2\phi \hat{ \mathbf{x} } -\sin \phi \cos \phi \hat{ \mathbf{y} } ) \\ &= \hat{ \mathbf{x} } \end{align*}

Therefore, it is summarized as follows.

x^=cosϕsinθr^+cosϕcosθθ^sinϕϕ^ \hat{ \mathbf{x} } = \cos \phi \sin \theta \hat{ \mathbf{r} } + \cos \phi \cos \theta \hat{ \boldsymbol{\theta} } - \sin\phi\hat{ \boldsymbol{\phi} }

Unit vector y^\hat{\mathbf{y}}

The method is the same as in the case of x^\hat{ \mathbf{x} }, so I will just write the equations without explanation. Removing the z^\hat{ \mathbf{z} } term is the same as in the case of x^\hat{ \mathbf{x} }.

sinθr^+cosθθ^=cosϕx^+sinϕy^    sinϕ(sinθr^+cosθθ^)=sinϕcosϕx^+sin2ϕy^ \begin{align*} &&\sin \theta \hat{ \mathbf{r} } + \cos \theta \hat{ \boldsymbol{\theta} } &= \cos \phi \hat{ \mathbf{x} } + \sin \phi \hat{ \mathbf{y} } \\ \implies&& \sin\phi (\sin\theta\hat{ \mathbf{r} }+\cos\theta \hat{ \boldsymbol{\theta} } ) &= \sin \phi \cos \phi \hat{ \mathbf{x} } + \sin^2\phi \hat{ \mathbf{y} } \end{align*}

And

cosϕϕ^=sinϕcosϕx^+cos2ϕy^ \cos \phi \hat{ \boldsymbol{\phi} }=-\sin\phi\cos\phi\hat{ \mathbf{x} }+\cos^2\phi\hat{ \mathbf{y} }

Therefore, it is as follows.

sinϕ(sinθr^+cosθθ^)+cosϕϕ^=(cos2ϕ+sin2ϕ)y^=y^ \begin{align*} && \sin\phi (\sin\theta\hat{ \mathbf{r} }+\cos\theta \hat{ \boldsymbol{\theta} } )+\cos \phi \hat{ \boldsymbol{\phi} } &= (\cos^2\phi + \sin^2\phi )\hat{ \mathbf{y} } \\ && &= \hat{ \mathbf{y} } \end{align*}

y^=sinϕsinθr^+sinϕcosθθ^+cosϕϕ^ \therefore \hat{ \mathbf{y} } = \sin\phi\sin\theta \hat{ \mathbf{r} } + \sin\phi\cos\theta \hat{ \boldsymbol{\theta} } + \cos\phi \hat{ \boldsymbol{\phi} }

Unit vector z^\hat{\mathbf{z}}

Since the z^\hat{ \mathbf{z} } term must remain, multiplying r^\hat{ \mathbf{r} } by cosθ\cos\theta and adding that to θ^\hat{ \boldsymbol{\theta} } multiplied by sinθ-\sin\theta results in the following.

cosθr^sinθθ^=cosθ(cosϕsinθx^+sinϕsinθy^+cosθz^)sinθ(cosϕcosθx^+sinϕcosθy^sinθz^)=(sinθcosθcosϕx^+sinθcosθsinϕy^+cos2θz^)+(sinθcosθcosϕx^sinθcosθsinϕy^+sin2θz^)=(cos2θ+sin2θ)z^=z^ \begin{align*} \cos\theta\hat{ \mathbf{r} } -\sin\theta \hat{ \boldsymbol{\theta} } &=\cos\theta (\cos \phi \sin \theta \hat{\mathbf{x}}+\sin \phi \sin \theta \hat{\mathbf{y}}+\cos\theta\hat{\mathbf{z}}) \\ &\quad -\sin \theta (\cos \phi \cos \theta \hat{\mathbf{x}} + \sin \phi \cos \theta \hat{\mathbf{y}} -\sin \theta \hat{\mathbf{z}}) \\ &= (\sin\theta\cos\theta\cos\phi \hat{ \mathbf{x} } + \sin\theta\cos\theta\sin\phi \hat{ \mathbf{y} }+ \cos^2\theta \hat{ \mathbf{z} }) \\ &\quad +(-\sin\theta\cos\theta\cos\phi \hat{ \mathbf{x} }-\sin\theta\cos\theta\sin\phi \hat{ \mathbf{y} } + \sin^2{\theta} \hat{ \mathbf{z} }) \\ &= (\cos^2\theta + \sin ^2 \theta ) \hat{ \mathbf{z} } \\ &= \hat{ \mathbf{z} } \end{align*}

z^=cosθr^sinθθ^ \therefore \hat{ \mathbf{z} } = \cos\theta\hat{ \mathbf{r} } - \sin\theta \hat{ \boldsymbol{\theta} }