2
$\begingroup$

I would like to change $(3,4,12)$ in $xyz$ coordinate to spherical coordinate using the following relation
enter image description here
It is from the this link. I do not understand the significance of this matrix (if not for coordinate transformation) or how it is derived. Also please check my previous question building transformation matrix from spherical to cartesian coordinate system. Please I need your insight on building my concept.

Thank you.
EDIT::
I understand that $ \left [ A_x \sin \theta\cos \phi \hspace{5 mm} A_y \sin \theta\sin\phi \hspace{5 mm} A_z\cos\theta\right ]$ gives $A_r$ but how is other coordinates $ (A_\theta, A_\phi)$ equal to their respective respective rows from Matrix multiplication?

  • 0
    @Siminore i would like to know how $ \theta $ and $ \phi $ are equal to their respective rows from that matrix multiplication.2012-06-24

4 Answers 4

5

The transformation from Cartesian to polar coordinates is not a linear function, so it cannot be achieved by means of a matrix multiplication.

  • 0
    @Babak, I got the impression that the OP wanted to transform the coordinates. So for example $r=r(x,y,z)=\sqrt{x^2+y^2+z^2}$ is not a linear function of $(x,y,z)$, and therefore there cannot be a matrix $M$ such that $r=M(x,y,z)^T$. The given matrix will transform a representation of a *vector* in terms of its coordinates w.r.t. the cartesian basis to the coordinates w.r.t. a local basis. May be I misunderstood what the OP wanted to do?2012-06-24
2

I have checked the formula on the link to transform from cartesian to spherical co-ords and it is correct. While it is correct that this is a nonlinear transformation for a vector field, the formula represent the correct linear transformation of a vector at any particular point in that field. Hope that helps since you helped me to fine that link.

1

This is not the Matrix you're looking for. For a simple co-ordinate switch you can just use the relations:

$\begin{align*}x &= \rho\sin\theta\cos\phi\\ y &= \rho\sin\theta\sin\phi \\ z &= \rho\cos\theta\end{align*}$

And the inverse operations:

$\begin{align*}\rho &= \sqrt{x^2 + y^2 + z^2}\\ \phi &= \arctan\dfrac yx\\ \theta &= \arctan\left(\frac{\sqrt{x^2 + y^2}}z\right)\end{align*}$

However the matrix you've found is for mapping a vector between the co-ordinate systems. For example (using a textbook, Engineering Electromagnetics by Demarest. Example 2-6, p34)

Need to do an integration of $\int( r^3\cos\phi\sin\theta\cdot Ar) d\theta d\phi$

Where $Ar$ is a unit vector in the radial direction. The integral is over phi and theta but also dependent on phi and theta, therefore it's much easier to do this by switching back to cartesian coordinates by the relation:

$Ar = \sin\theta\cos\phi\cdot Ax + \sin\theta\sin\phi\cdot Ay + \cos\theta\cdot Az$

Once we substitute that straight in for Ar the integral looks longer but we've removed the dependence inside the integrand, so we can do the integration in a straight forward way.

0

This is actually the matrix used for Rotation. if u have a coordinate of point X, this matrix gives the rotational matrix to find point Y, given theta.