Transforming Unit Vectors from Cartesian to Cylindrical Coordinates

coordinate systemstransformation

Let $ (\hat i, \hat j, \hat k) $ be unit vectors in Cartesian coordinate and $ (\hat e_\rho, \hat e_\theta, \hat e_z)$ be on spherical coordinate.
Using the relation, $$ \hat e_\rho = \frac{\frac{\partial \vec r}{\partial \rho}}{ \left | \frac{\partial \vec r}{\partial \rho} \right |}, \hat e_\theta = \frac{\frac{\partial \vec r}{\partial \theta}}{ \left | \frac{\partial \vec r}{\partial \theta} \right |}, \;\; \hat e_z = \frac{\frac{\partial \vec r}{\partial z}}{ \left | \frac{\partial \vec r}{\partial z} \right |} $$
We have the relation $$\begin{bmatrix} \hat e_{\rho}\\ \hat e_{\theta}\\ \hat e_{z} \end{bmatrix} = \begin{bmatrix} \cos \phi & \sin \phi & 0\\ -\sin \phi & \cos \phi & 0\\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \hat i\\ \hat j\\ \hat k \end{bmatrix}$$
$$\text { Let } A = \begin{bmatrix} \cos \phi & \sin \phi & 0\\ -\sin \phi & \cos \phi & 0\\ 0 & 0 & 1 \end{bmatrix}$$
To express unit vectors of Cartesian coordinate in Spherical coordinates, the author uses,
$$\hat i = \frac { \begin{vmatrix} \hat e_{\rho} & \sin \phi & 0\\ \hat e_{\theta} & \cos \phi & 0\\ 0 & 0 & 1 \end{vmatrix} }{|A|} \\ \hat j = \frac { \begin{vmatrix} \cos \phi & \hat e_{\rho} & 0\\ -\sin \phi & \hat e_{\theta} & 0\\ 0 & 0 & 1 \end{vmatrix} }{|A|} \\\hat k = \frac { \begin{vmatrix} \cos \phi & \sin \phi & 0\\ -\sin \phi & \cos \phi & 0\\ 0 & 0 & \hat e_z \end{vmatrix} }{|A|}
$$
Which I cannot understand! Can anyone help me to understand it?
$$ \begin{bmatrix} \hat i\\ \hat j\\ \hat k \end{bmatrix} = \begin{bmatrix} \cos \phi & \sin \phi & 0\\ -\sin \phi & \cos \phi & 0\\ 0 & 0 & 1 \end{bmatrix}^{-1} \begin{bmatrix} \hat e_{\rho}\\ \hat e_{\theta}\\ \hat e_{z} \end{bmatrix} $$
Looks intuitive but certainly the previous way is faster. I would like to know above relation works if it works.
Thank you!!

Best Answer

A far more simple method would be to use the gradient.
Lets say we want to get the unit vector $\boldsymbol { \hat e_x } $. What we then do is to take $\boldsymbol { grad(x) } $ or $\boldsymbol { ∇x } $.
This; $\boldsymbol ∇ $, is the nabla-operator. It is a vector containing each partial derivative like this...

$\boldsymbol { ∇= ( \frac {∂} {∂x}, \frac {∂} {∂y}, \frac {∂} {∂z}) } $

When we take the gradient of x we get this...

$\boldsymbol { ∇x= ( \frac {∂x} {∂x}, \frac {∂x} {∂y}, \frac {∂x} {∂z})=(1,0,0)=\hat e_x } $

To get the unit vector of $\boldsymbol x$ in cylindrical coordinate system we have to rewrite $x$ in the form of $\boldsymbol {r_c}$ and $\boldsymbol {\phi}$.

$\boldsymbol {x= r_c cos(x) } $

Now you have to use the more general definition of nabla ($\boldsymbol ∇ $).
Lets say we have a curve-linear coordinate system where the position vector is defined like this...

$\boldsymbol {\vec r = u_1 \hat e_{u1} + u_2 \hat e_{u2} + u_3 \hat e_{u3}} $

... Then the nabla operator for that coordinate system is as follows...

$\boldsymbol { ∇ = \frac {1}{h_1} \frac {∂}{∂u_1} \hat e_{u1} + \frac {1}{h_2} \frac {∂}{∂u_2} \hat e_{u1} + \frac {1}{h_3} \frac {∂}{∂u_3} \hat e_{u1}} $

"$\boldsymbol { h_n } $" is the scale factor to the variable "$\boldsymbol { u_n } $". The scale-factor is defined as: $\boldsymbol {h_n = \frac {\partial \vec r}{\partial u_n}}$
For cylindrical coordinates the position vector is defined as: $\boldsymbol {\vec r = r_c \hat e_{rc} + z \hat e_z }$
With some simple math we can get the scale factors and they are...

$\boldsymbol {h_{rc} = 1 \ \ ,\ h_{\phi} = r_c \ \ ,\ h_z = 1}$

We already know that in cylindircal cooridnates $\boldsymbol x $ is defined as $\boldsymbol {x = r_c cos(x)}$, so now we can get the gradient.

$\boldsymbol { ∇x = ∇(r_c cos(x))= \frac {\partial (r_c \cos(x))}{\partial r_c} \hat e_{rc} + \frac {1}{r_c} \frac {\partial (r_c \cos(x))}{\partial \phi} \hat e_{\phi} + \frac {\partial (r_c cos(x))}{\partial z} \hat e_{z}}$

The result from this gradient is then...

$\boldsymbol {\hat e_{x} = \cos(\phi)\hat e_{rc} - \sin(\phi) \hat e_{\phi}}$

When the same method is applied to $\boldsymbol y$, where $\boldsymbol {y = r_c sin(\phi) }$, we get with ease that...

$\boldsymbol {\hat e_{y} = sin(\phi)\hat e_{rc} + \cos(\phi) \hat e_{\phi}}$

Hope it helped!
I also hope the use of $\boldsymbol \phi $ instead of $\boldsymbol \theta $ and $\boldsymbol {r_c} $ instead of $\boldsymbol \rho $ wasn't to confusing. As a physics student I am more used to the $\boldsymbol {(r_c,\phi,z)}$ standard for cylindrical coordinates.

Related Question