#how does conversion of unit vectors work
101 messages · Page 1 of 1 (latest)
,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};
cloud
so the trigonometry is the unit vectors???
that makes alot alot of sense
man this piture
makes so much sense
thank you so so much 😭
so so so very much
😭
@cinder nymph what about the third co oridnate?
(R,angle1,angle2) why is angle 2 zero?
the unit vector $\vec a_\phi$ points in the direction of increasing $\phi$. this makes it entirely horizontal
cloud
cloud
no, but it's a combination of ax and ay
the unit vectors point in the direction you would go if you increased that coordinate and held the other coordinates constant
so in the ar and a(angle) drawing its poiting towards me?
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
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)
no this is definetly Ax.ex
so i suppose its this
well then
i think i may have got it
TYSM CLOUD
🫶
yes, it is in terms of all 3 angles
wikipedia has a list of all the conversions in matrix form: https://en.wikipedia.org/wiki/Vector_fields_in_cylindrical_and_spherical_coordinates
THIS IS SO HELPFUL
whats ur major if u dont mind me asking or is this all self taught?!?!?
cuz ur so smart 😭 like wow 🫶
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.
they didnt give me linear algebra aaaaa
they just gave me this physics course after matrices and calc 4
wait did u say 2 matrices
do you mean this?
i dont get where the cos and sin came from i cannot lie
that is a rotation matrix

professor said to memorize it
we did NOT take a spherical matrix either
professor praying for our downfall
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
so i dont need to know how the matrix is formed? i can actually just memorize?
its for gauss law
imma save this and try applying it on the questions
tysm
both you and cloud
🫶
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
cloud
its 3 am and its too many words im sorry but i didnt really get this 😭
but well ill keep note of it
and try to read it another time
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}
]
cloud
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} ]
cloud
Honestly, you are crazy to write an answer to this involving TikZ
You deserve some sort of medal
i fully agree
im helping someone out rq ill read these in a bit
tysm again cloud 🫡
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*}
cloud
and the inverse matrices work similarly
Oh yes we just transpose the matrix
On the left side
rotations have the nice property of being orthogonal, which does mean the transpose is equal to the inverse
Yessssss
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
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
cloud
THANK YOU
How do you speak in the language of definitions
This is something id expect to see from wikipedia
Ur just too much smarter than what im used to seeing