# Unit vectors

1. Nov 19, 2011

### queenstudy

can i get some help in how i can convert from cartesian to cylindrical and spherical unit vectors and vice versa ???? thank you

2. Nov 19, 2011

### I like Serena

3. Nov 19, 2011

### queenstudy

4. Nov 19, 2011

### I like Serena

Hmm, well, you can basically read them directly off the drawing of the coordinates.

Is there any one in particular for which you would like an explanation?

5. Nov 19, 2011

### queenstudy

yes
in the definition of unit vectors how did we get the cartesian coordinates in terms of cylinderical coordinates

6. Nov 19, 2011

### I like Serena

Do you mean:
$$\begin{matrix} \mathbf{\hat x} & = & \cos\phi\boldsymbol{\hat \rho}-\sin\phi\boldsymbol{\hat\phi} \\ \mathbf{\hat y} & = & \sin\phi\boldsymbol{\hat \rho}+\cos\phi\boldsymbol{\hat\phi} \\ \mathbf{\hat z} & = & \mathbf{\hat z} \end{matrix}$$
?

7. Nov 19, 2011

### queenstudy

yes please because we know how the opposite happens

8. Nov 19, 2011

### I like Serena

The only interesting ones are $\mathbf{\hat x}$ and $\mathbf{\hat y}$.
So we're actually talking about 2-dimensional polar coordinates.

Here's one way to derive the unit vectors.

$\boldsymbol{\hat \rho}$ corresponds in this case with the vector from the origin to a point on the unit circle at angle $\phi$.

The vector $\boldsymbol{\hat \rho}$ can be seen as the result of a rotation of $\mathbf{\hat x}$ over an angle of $\phi$.

Or in reverse, the vector $\mathbf{\hat x}$ is the result of a rotation of $\boldsymbol{\hat \rho}$ over an angle of $-\phi$.
Similarly the vector $\mathbf{\hat y}$ is the result of a rotation of $\boldsymbol{\hat \phi}$ over an angle of $-\phi$.

We need the rotation matrix for an angle $\phi$ is to get what we want:
$$R = \begin{pmatrix}\cos \phi & -\sin \phi \\ \sin \phi & \cos \phi \end{pmatrix}$$

Multiply $R$ with $\boldsymbol{\hat \rho}$ and $\boldsymbol{\hat \phi}$ and the result rolls out:
$$\begin{matrix} \mathbf{\hat x} & = & \cos\phi\boldsymbol{\hat \rho}-\sin\phi\boldsymbol{\hat\phi} \\ \mathbf{\hat y} & = & \sin\phi\boldsymbol{\hat \rho}+\cos\phi\boldsymbol{\hat\phi} \end{matrix}$$

9. Nov 20, 2011

### queenstudy

i know how raw and phy are in terms of x hat and y hat how did you change that to the last line im still not getting the idea??

10. Nov 20, 2011

### I like Serena

$$\begin{matrix} \boldsymbol{\hat \rho} & = & \cos\phi\mathbf{\hat x}+\sin\phi \mathbf{\hat y}\\ \boldsymbol{\hat\phi} & = & -\sin\phi\mathbf{\hat x}+\cos\phi \mathbf{\hat y} \end{matrix}$$

Which is:
$$\begin{pmatrix} \boldsymbol{\hat \rho} \\ \boldsymbol{\hat\phi} \end{pmatrix} = \begin{pmatrix} \cos \phi & \sin \phi \\ -\sin \phi & \cos \phi \end{pmatrix} \begin{pmatrix} \mathbf{\hat x} \\ \mathbf{\hat y} \end{pmatrix}$$

The inverse is:

$$\begin{pmatrix} \mathbf{\hat x} \\ \mathbf{\hat y} \end{pmatrix} = \begin{pmatrix} \cos \phi & -\sin \phi \\ \sin \phi & \cos \phi \end{pmatrix} \begin{pmatrix} \boldsymbol{\hat \rho} \\ \boldsymbol{\hat\phi} \end{pmatrix}$$

11. Nov 20, 2011

### queenstudy

ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh now i get it okay okay thank you alotttttttttttttttttttt