A spherical coordinate system is also useful for describing motion.
Material taken from Vector fields in cylindrical and spherical coordinates
Vectors are defined in spherical coordinates by (r, θ, φ), where
- r is the length of the vector,
- θ is the angle between the positive Z-axis and the vector in question (0 ≤ θ ≤ π), and
- φ is the angle between the projection of the vector onto the X-Y-plane and the positive X-axis (0 ≤ φ < 2π).
(r, θ, φ) is given in Cartesian coordinates by:
![{\displaystyle {\begin{bmatrix}r\\\theta \\\phi \end{bmatrix}}={\begin{bmatrix}{\sqrt {x^{2}+y^{2}+z^{2}}}\\\arccos(z/r)\\\arctan(y/x)\end{bmatrix}},\ \ \ 0\leq \theta \leq \pi ,\ \ \ 0\leq \phi <2\pi ,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/66328d1cfd2f830bce24908f866be6b56b9c2cdf)
or inversely by:
![{\displaystyle {\begin{bmatrix}x\\y\\z\end{bmatrix}}={\begin{bmatrix}r\sin \theta \cos \phi \\r\sin \theta \sin \phi \\r\cos \theta \end{bmatrix}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fc41285a0f53768efe6cea6547ddf55c694cc428)
Any vector field can be written in terms of the unit vectors as:
![{\displaystyle \mathbf {A} =A_{x}\mathbf {\hat {x}} +A_{y}\mathbf {\hat {y}} +A_{z}\mathbf {\hat {z}} =A_{r}{\boldsymbol {\hat {r}}}+A_{\theta }{\boldsymbol {\hat {\theta }}}+A_{\phi }{\boldsymbol {\hat {\phi }}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/979348a85b88edc4ce17c8d7202635c56121e559)
The spherical unit vectors are related to the cartesian unit vectors by:
![{\displaystyle {\begin{bmatrix}{\boldsymbol {\hat {r}}}\\{\boldsymbol {\hat {\theta }}}\\{\boldsymbol {\hat {\phi }}}\end{bmatrix}}={\begin{bmatrix}\sin \theta \cos \phi &\sin \theta \sin \phi &\cos \theta \\\cos \theta \cos \phi &\cos \theta \sin \phi &-\sin \theta \\-\sin \phi &\cos \phi &0\end{bmatrix}}{\begin{bmatrix}\mathbf {\hat {x}} \\\mathbf {\hat {y}} \\\mathbf {\hat {z}} \end{bmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2e633feb4698e2b47d5d568f27e711f80c91f520)
Note: the matrix is an orthogonal matrix, that is, its inverse is simply its transpose.
So the cartesian unit vectors are related to the spherical unit vectors by:
![{\displaystyle {\begin{bmatrix}\mathbf {\hat {x}} \\\mathbf {\hat {y}} \\\mathbf {\hat {z}} \end{bmatrix}}={\begin{bmatrix}\sin \theta \cos \phi &\cos \theta \cos \phi &-\sin \phi \\\sin \theta \sin \phi &\cos \theta \sin \phi &\cos \phi \\\cos \theta &-\sin \theta &0\end{bmatrix}}{\begin{bmatrix}{\boldsymbol {\hat {r}}}\\{\boldsymbol {\hat {\theta }}}\\{\boldsymbol {\hat {\phi }}}\end{bmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f3d9ccf76adb3840f32d550da7c65e57583557a1)