[Math] Calculate Dot Product of 2 3D Vectors

vector-spaces

During school today (Yr 12 Maths C), we covered finding the Dot Product (Scalar Product) of 2D Vectors of the form (Magnitude, Theta) using the equation:

$$A.B=|A||B|\times cos \theta$$

Where $\theta$ is the angle between the two vectors. We then moved onto 3D Vectors of the form (Magnitude, Azimuth, Theta). The process described in our textbook said to converter from (Magnitude, Azimuth, Theta) to (i, j, k) components. However, I thought I would try just multiplying the above equation by $cos \phi$, just to see if it would work:

$$A.B=|A||B|\times cos \theta\times cos \phi$$

Surprisingly, this worked for the vectors $(15, 45 \circ, -33\circ)$ and $(8, 45 \circ, 57\circ)$, as well as $(9, 280 \circ, 16\circ)$ and $(4, 280 \circ, -28\circ)$.

I am a bit stumped as to why this method works. For me it did seem like the next logical step, however now I am having second thoughts. I was unable to test this on any vectors that did not share at least 1 identical value, which might be why.

Can you explain why, how this works, and if it does so for all cases.

Best Answer

If I understand your azimuthal and polar angles correctly as below

spherical

then for any given vector $\mathbf a = (r, \varphi, \theta) = (a_1, a_2, a_3)$ it follows $$ a_1 = r \cos \varphi \sin \theta \\ a_2 = r \sin \varphi \sin \theta \\ a_3 = r \cos \theta $$ Same for $\mathbf b = (\tilde r, \tilde \varphi, \tilde \theta) = (b_1, b_2, b_3)$ $$ b_1 = \tilde r \cos \tilde \varphi \sin \tilde \theta \\ b_2 = \tilde r \sin \tilde \varphi \sin \tilde \theta \\ b_3 = \tilde r \cos \tilde \theta $$ so $$ \mathbf a \cdot \mathbf b = r \tilde r \left [ \cos \varphi \sin \theta \cos \tilde \varphi \sin \tilde \theta + \sin \varphi \sin \theta \sin \tilde \varphi \sin \tilde \theta + \cos \theta \cos \tilde \theta \right ] = \\ r \tilde r \left [ \left ( \cos \varphi \cos \tilde \varphi + \sin \varphi \sin \tilde \varphi \right )\sin \theta \sin \tilde \theta + \cos \theta \cos \tilde \theta \right ] = \\ r \tilde r \left [\cos \left ( \varphi - \tilde \varphi\right )\sin \theta \sin \tilde \theta + \cos \theta \cos \tilde \theta \right ] $$ I don't think it can be simplified further. What you can get from here, it's that if $\varphi = \tilde \varphi$ as in your test pairs, expressions above becomes $$ \mathbf a \cdot \mathbf b = r \tilde r \left [ \sin \theta \sin \tilde \theta + \cos \theta \cos \tilde \theta\right ] = r \tilde r \cos \left ( \theta-\tilde \theta\right ) $$ so it's indeed $|\mathbf a||\mathbf b| \cos \left ( \varphi-\tilde\varphi\right)\cos \left ( \theta - \tilde \theta\right )$, since first $\cos$ is simply one. For other cases (when $\cos \left ( \varphi-\tilde\varphi\right) \ne 1$) your claim is not true.