# building transformation matrix from spherical to cartesian coordinate system

How to arrive at the following from given $x = r\sin \theta \cos \phi, y = r\sin \theta \sin \phi, z=r\cos\theta$

$$\begin{bmatrix} A_x\\ A_y\\ A_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} A_r\\ A_\theta\\ A_\phi \end{bmatrix}$$

Also how show that $$\begin{bmatrix} \hat i\\ \hat j\\ \hat k \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} \hat e_r\\ \hat e_\theta\\ \hat e_\phi \end{bmatrix}$$ How to change $(a,b,c)$ into spherical polar coordinates and $(r ,\theta, \phi)$ into cartesian coordinates using this matrix? Thank you!!

-

Find a transformation from Cartesian to cylindrical coordinates. Find a transformation from cylindrical to spherical coordinates. Compose them. – Potato Jun 24 '12 at 0:36
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 3, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8123617172241211, "perplexity_flag": "middle"}