#how does conversion of unit vectors work

101 messages · Page 1 of 1 (latest)

wheat plover
#

i have cartesian co ordinates with unit vectors ax, ay, az but i need to transform them to cylindrical or spherical

  • in the question i was solution they did this
spice lodgeBOT
wheat plover
#

YES

#

HELP HAS ARRIVED

#

HE TYPED

#

IM SAVED

cinder nymph
#

,tikz[scale=3]
{[thick, -Latex]
\draw (0,0) coordinate(O) -- node[midway, left]{$\vec a_z$} (0,1) coordinate(A);
\draw (O) -- node[midway, below right]{$(\vec a_R)\cos\theta$} ({cos(30)*cos(60)},{cos(30)*sin(60)}) coordinate (B);
\draw (B) -- node[midway, above right]{$(-\vec a_\theta)\sin\theta$} (A);
{[shift={(1,0.5)}]
\draw (0,0) -- node[midway, below right]{$\vec a_R$} ({cos(60)},{sin(60)});
\draw (0,0) -- node[midway, below left]{$\vec a_\theta$} ({-cos(150)},{-sin(150)});
}
}
\draw pic[draw, angle eccentricity = 2, "$\theta$"]{angle=B--O--A} pic[draw]{right angle=O--B--A};

tawny berryBOT
wheat plover
#

that makes alot alot of sense

#

man this piture

#

makes so much sense

#

thank you so so much 😭

#

so so so very much

#

😭

wheat plover
#

(R,angle1,angle2) why is angle 2 zero?

cinder nymph
#

the unit vector $\vec a_\phi$ points in the direction of increasing $\phi$. this makes it entirely horizontal

tawny berryBOT
wheat plover
#

is it not perpendicular to ar and a(angle)?

#

sorry idk latex

cinder nymph
#

it is, yes

#

but it also happens to be perpendicular to $\vec a_z$

tawny berryBOT
wheat plover
#

OH

#

OHHH

#

its parallel to ax?

cinder nymph
#

no, but it's a combination of ax and ay

wheat plover
#

wait let me try to note take this

#

1s

cinder nymph
#

the unit vectors point in the direction you would go if you increased that coordinate and held the other coordinates constant

wheat plover
cinder nymph
#

it depends on exactly how you set up your coordinate system. if it looks something like this then it would point directly into the page

wheat plover
#

is x in terms of all 3?

#

like is ex = er + e(angle1) + e(angle2)

#

or is it ex = Ar.er + Aangle1 . e(angle1) + Aangle2 .e(angle2)

wheat plover
wheat plover
#

well then

#

i think i may have got it

#

TYSM CLOUD

#

🫶

cinder nymph
#

yes, it is in terms of all 3 angles

wheat plover
#

whats ur major if u dont mind me asking or is this all self taught?!?!?

#

cuz ur so smart 😭 like wow 🫶

pine crescent
#

This is all a lot easier to understand if you take linear algebra first. This is just a linear transformation made by composing two rotation matrices that represent phi and theta.

wheat plover
#

they just gave me this physics course after matrices and calc 4

#

wait did u say 2 matrices

wheat plover
#

do you mean this?

#

i dont get where the cos and sin came from i cannot lie

cinder nymph
#

that is a rotation matrix

wheat plover
pine crescent
wheat plover
wheat plover
#

monkey professor praying for our downfall

pine crescent
#

I'm not going to pull the matrices apart but you can see the terms like sin(theta)cos(phi) come from a matrix product of two rotations

wheat plover
#

its for gauss law

wheat plover
#

tysm

#

both you and cloud

#

🫶

cinder nymph
# pine crescent I'm not going to pull the matrices apart but you can see the terms like sin(thet...

specifically you rotate $\vec a_x$ and $\vec a_y$ by angle $\phi$ about the $\vec a_z$-axis to obtain $\vec a_r$ and $\vec a_\phi$ which obtains the cartesian-to-cylindrical coordinate transformations.

you also rotate $\vec a_z$ and $\vec a_r$ about the $\vec a_\theta$-axis to obtain $\vec a_R$ and $\vec a_\theta$, this defines the cylindrical-to-spherical transformation.

composing the two transformations (multiplying the matrices) gives the spherical transformation matrix

tawny berryBOT
wheat plover
#

but well ill keep note of it

#

and try to read it another time

cinder nymph
#

basically the conversion from cartesian to cylindrical is a rotation that looks like this rotation

\begin{tikzpicture}[scale=3]
{[thick, -Latex]
\draw (0,0) coordinate (O) -- (1,0) node[right]{$\vec a_x$} coordinate (A);
\draw (0,0) -- (0,1) node[right]{$\vec a_y$} coordinate(C);
\draw (0,0) -- ({cos(30)},{sin(30)}) node[above right]{$\vec a_r$} coordinate(B);
\draw (0,0) -- ({cos(90+30)},{sin(90+30)}) node[above right]{$\vec a_r$} coordinate(D);
}
\filldraw[fill=white] (0,0) circle[radius=0.1] node[below left]{$\vec a_z$};
\fill (0,0) circle[radius=0.05];
\draw pic[draw, -Latex, "$\phi$", angle eccentricity = 2, angle radius=20]{angle=A--O--B};
\draw pic[draw, -Latex, "$\phi$", angle eccentricity = 2, angle radius=20]{angle=C--O--D};
\end{tikzpicture}

and has this rotation matrix
[
\mat{\vec a_r \ \vec a_\phi \ \vec a_z} = \mat{\cos\phi & \sin\phi & 0 \ -\sin\phi & \cos\phi & 0 \ 0 & 0 & 1} \mat{\vec a_x \ \vec a_y \ \vec a_z}
]

tawny berryBOT
cinder nymph
#

and similarly the conversion from cylindrical to spherical looks like this
\begin{tikzpicture}[scale=3]
{[thick, -Latex]
\draw (0,0) coordinate (O) -- (1,0) node[right]{$\vec a_r$} coordinate (A);
\draw (0,0) -- (0,1) node[right]{$\vec a_z$} coordinate(C);
\draw (0,0) -- ({cos(-30)},{sin(-30)}) node[above right]{$\vec a_\theta$} coordinate(B);
\draw (0,0) -- ({cos(90-30)},{sin(90-30)}) node[above right]{$\vec a_R$} coordinate(D);
}
\filldraw[fill=white] (0,0) circle[radius=0.1] node[below left]{$\vec a_\phi$};
\fill (0,0) circle[radius=0.05];
\draw pic[draw, Latex-, "$\theta$", angle eccentricity = 2, angle radius=20]{angle=B--O--A};
\draw pic[draw, Latex-, "$\theta$", angle eccentricity = 2, angle radius=20]{angle=D--O--C};
\end{tikzpicture}

and has this rotation matrix

[ \mat{\vec a_R \ \vec a_\theta \ \vec a_\phi} = \mat{\sin\theta & 0 & \cos\theta \ \cos\theta & 0 & -\sin\theta \ 0 & 1 & 0} \mat{\vec a_r \ \vec a_\phi \ \vec a_z} ]

tawny berryBOT
pine crescent
#

Honestly, you are crazy to write an answer to this involving TikZ

#

You deserve some sort of medal

wheat plover
#

im helping someone out rq ill read these in a bit

#

tysm again cloud 🫡

cinder nymph
#

from that you can see that
\begin{align*}
\mat{\vec a_R \ \vec a_\theta \ \vec a_\phi} &= \mat{\sin\theta & 0 & \cos\theta \ \cos\theta & 0 & -\sin\theta \ 0 & 1 & 0} \mat{\vec a_r \ \vec a_\phi \ \vec a_z} \
&=\mat{\sin\theta & 0 & \cos\theta \ \cos\theta & 0 & -\sin\theta \ 0 & 1 & 0} \mat{\cos\phi & \sin\phi & 0 \ -\sin\phi & \cos\phi & 0 \ 0 & 0 & 1} \mat{\vec a_x \ \vec a_y \ \vec a_z} \
&= \mat{\sin\theta\cos\phi& \sin\theta\sin\phi & \cos\theta \ \sin\theta\cos\phi& \cos\theta\sin\phi& -\sin\theta \ -\sin\phi & \cos\phi & 0} \mat{\vec a_x \ \vec a_y \ \vec a_z}
\end{align*}

tawny berryBOT
cinder nymph
#

and the inverse matrices work similarly

wheat plover
#

On the left side

cinder nymph
#

rotations have the nice property of being orthogonal, which does mean the transpose is equal to the inverse

wheat plover
#

Im gonna be honest i actually thought inverse and transpose are the same thing symbol wise

#

U just pointed it out

#

Wait

#

Matrix power -1 is inverse or transpose?

#

Oh ok ok so transpose has a t symbol

#

And inverse has a -1

cinder nymph
#

if $A$ is a square matrix then $A^{-1}$ is the inverse, defined such that $A A^{-1} = A^{-1} A = I$, and $A^T$ is the transpose, obtained by swapping the rows and columns

tawny berryBOT
wheat plover
#

This is something id expect to see from wikipedia

#

Ur just too much smarter than what im used to seeing