Lost Among Notes

<< Newer Xmonad
Older >> Number of trailing zeros in n factorial
Tags:

Scalar product and direction cosines

When I learned about the scalar product in high school, I was somewhat surprised by how lucky its properties are.
The treatment is usually this: define \( x \cdot y = |x| |y| \cos \theta \), where \( \theta \) is the angle between \( x \) and \( y \). Then deduce that \( x \cdot y \) is linear on the left and right arguments. Then, deduce that \( (x_1 \vec i + x_2 \vec j + x_3 \vec k) \cdot (y_1 \vec i + y_2 \vec j + y_3 \vec k) = x_1 y_1 + x_2 y_2 + x_3 y_3 \)

Now, define the direction cosines of a vector \( x \) as the cosines of the angles the vector forms with the basis vectors. By definition: \( x = |x| (\cos \phi_1, \cos \phi_2, \cos \phi_3) \).
If we define \( \theta \) as the angle between \( x \) and \( y \), \( \alpha_i \) as the angles between \( x \) and the axis, and \( \beta_i \) as the angles between \( y \) and the axis, we have: \( \cos \theta = \sum \cos \alpha_i \cos \beta_i \).

This last formula mystified me. The deduction was so purely algebraic that I found it unsatisfactory. I wanted to see the geometric meaning.

A more geometric deduction follows: given a point \(a\) on the unit sphere, its coordinates are given by its direction cosines: \( (\cos \alpha_1, \cos \alpha_2, \cos \alpha_3) \). If we take another point \( b \) on the unit sphere (with direction cosines \( \cos \beta_1, \cos \beta_2, \cos \beta_3 \), \( a \) and \( b \) subtend an angle \( \theta \):
On the unit sphere

On the unit sphere, we can find the angle \( \theta \) subtended by \( a \) and \( b \) by calculating the distance \( l \) between them:
Calculating the angle

As you can see in the picture, \( l = 2 \sin \frac{\theta}{2} \). Therefore: $$ l^2 = 4\ \sin^2 \frac{\theta}{2} = \sum (\cos \alpha_i - \cos \beta_i)^2$$ By basic trigonometry: $$ \sin \frac{\theta}{2} = \sqrt{\frac{1 - \cos \theta}{2}}$$ Putting the above two together: $$ l^2 = 4 \frac{1 - \cos \theta}{2} = 2 - 2\ \cos \theta = \sum (\cos^2 \alpha_i - 2 \cos \alpha_i \cos \beta_i + \cos^2 \beta_i)$$ Since \( a\) and \( b\) are both on the unit sphere: $$ \sum \cos^2 \alpha_i = \sum \cos^2 \beta_i = 1$$ therefore: $$ 2 - 2\ \cos \theta = 2 - \sum 2 \cos \alpha_i \cos \beta_i $$ so: $$ \cos \theta = \sum \cos \alpha_i \cos \beta_i $$

In this deduction of \( \cos \theta \), we didn’t assume any knowledge of the scalar product. In fact, we could have used it as a basis for the definition of the scalar product.