Polar coordinates system uses the counter clockwise angle from the positive direction of x axis and the straight line distance to the point as the coordinates. The polar coordinates can be represented as above in the two dimensional Cartesian coordinates system. The transformation between polar and Cartesian systems is given by following relations. Cartesian / Rectangular to Polar Conversion The java code converts the Cartesian coordinate values (x,y) into polar coordinate values (r,Θ). The input values for x and y are read from the user using scanner object and these values are converted into corresponding polar coordinate values by following two equations.
I would like to change $(3,4,12)$ in $xyz$ coordinate to spherical coordinate using the following relation
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.
![Cartesian Cartesian](https://study.com/cimages/videopreview/videopreview-full/zjgogo5sxl.jpg)
Thank you.
EDIT::
I understand that $ left [ A_x sin thetacos phi hspace{5 mm} A_y sin thetasinphi hspace{5 mm} A_zcosthetaright ]$ gives $A_r$ but how is other coordinates $ (A_theta, A_phi)$ equal to their respective respective rows from Matrix multiplication?
4 Answers
$begingroup$The transformation from Cartesian to polar coordinates is not a linear function, so it cannot be achieved by means of a matrix multiplication.
Jyrki LahtonenJyrki LahtonenI 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.
This is not the Matrix you're looking for. For a simple co-ordinate switch you can just use the relations:
![Transformation matrix polar to cartesian form Transformation matrix polar to cartesian form](https://image.slidesharecdn.com/coordinatesystemsandvectorcalculus1-140608235926-phpapp01/95/coordinate-systems-and-transformations-and-vector-calculus-10-638.jpg?cb=1402272122)
$$begin{align*}x &= rhosinthetacosphiy &= rhosinthetasinphi z &= rhocosthetaend{align*}$$
And the inverse operations:
$$begin{align*}rho &= sqrt{x^2 + y^2 + z^2}phi &= arctandfrac yxtheta &= arctanleft(frac{sqrt{x^2 + y^2}}zright)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^3cosphisinthetacdot Ar) dtheta dphi$
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 = sinthetacosphicdot Ax + sinthetasinphicdot Ay + costhetacdot 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.
Dennis GulkoThis 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.