# Dot product of basis vectors in orthogonal coordinate systems

1. Aug 26, 2006

I'm doing a series of questions right now that is basically dealing with the dot and cross products of the basis vectors for cartesian, cylindrical, and spherical coordinate systems.

I am stuck on $\hat R \cdot \hat r$ right now.

I'll try to explain my work, and the problem I am running into as well as I can. It's somewhat difficult to do since I can't draw pictures, but...

Ok, first the notation being used is:

Cylindrical: $(r,\phi,z)$
Spherical: $(R, \phi, \theta )$

First, the dot product of any two unit vectors, say $\hat A$ and $\hat B$ will be: $\hat A \cdot \hat B = \cos \theta_{AB}$

So my trouble is finding the angle between $\hat r$ and $\hat R$. I know that $\phi$ does not affect this angle, so it really comes down to $\theta$.

So lets say $\theta = 0$, then $\theta_{rR}$ would be 90 degrees right?

Now say $\theta = 45\,\,deg$, then $\theta_{rR}$ would be 45 degrees right?

Now say $\theta = 135 \,\,deg$, then does $\theta_{rR}$ equal 45 degrees?

I'm not sure how to deal with measuring the angle between the two vectors when $\theta$ causes $\hat R$ to point below the x-y plane.

I hope this makes sense. Any help would be nice. Thanks :)

Last edited: Aug 26, 2006
2. Aug 26, 2006

### quasar987

It's probably easier to go at this problem from the point of view $\vec{A}\cdot \vec{B}=A_xB_x+A_yB_y$ rather than $\vec{A}\cdot \vec{B}=ABcos(\theta_{AB})$

In the partcular case $$\hat{R}\cdot \hat{r}$$, try expressing $$\hat{R}$$ in cylindrical coordinates*. If you can do that, then the dot product will be obviously just the r-component of $$\hat{R}$$!

*If you struggle too long on this, it is because you're not using the easiest approach.. I'll give you a hint if you need one.

Last edited: Aug 26, 2006
3. Aug 27, 2006

### HallsofIvy

Staff Emeritus
The $\hat r$, in cylindrical coordinates, is just the projection of the $\hat R$, in spherical coordinates, projected onto the xy-plane. Since $\phi$ is the "co-latitude", the angle $\hat R$ makes with the z-axis, the angle you want, between $\hat R$ and $\hat r$ is the complement of that $\frac{\pi}{2}-\phi$.

4. Aug 27, 2006

Thanks quasar987 for pointing me in the right direction. I didn't really struggle on the problem. I actually posted it, went up to the store and got some food, ate it and fell asleep I had every intention of working on it last night, but sleep got the best of me. Good looking out though

I ended up solving it (I think?) by finding the scalar projection of $\hat R$ on the x-y plane in the direction of $\hat r$, and the $\hat z$ component along the cylinder with another projection in the direction of $\hat z$.

I ended up with,

$$\hat R = \hat r \sin \theta + \hat z \cos \theta$$
(in cylindrical coordinates)

Thus, the dot product $\hat R \cdot \hat r = \sin \theta$

HallsofIvy: I appreciate the help I think what you are saying is a confirmation of what I found. Does everything look ok?

Last edited: Aug 27, 2006
5. Aug 27, 2006

### quasar987

$\sin\theta$ is my answer too. (Or in cartesian coordinates, $\sqrt{x^2+y^2}/\sqrt{x^2+y^2+z^2}$)

Though if you want an honest answer to "Does everything look ok?", I'd answer that when you wrote...

I'm not sure this is correct. In my understanding of the term "coordinates", what you wrote is $\hat R$ in spherical coordinates in the $\hat{r},\hat{\phi},\hat{z}$ (cylindrical) basis.

But I could easily be wrong! Anyone can comment on that?

6. Aug 27, 2006

I'm very glad you expressed the concern in my wording. I see where you are coming from. It is definitely not accurate for me to say "in cylindrical coordinates" while the variable $\theta$ is in use for the basis vector.