Angles from components
How steep is the diagonal of a cube compared with one of its edges? What angle does the line from a room's corner to the opposite ceiling corner make with the floor? In three-space you cannot just lay a protractor on the picture. But you can compute the angle exactly with the dot product.
Put the two formulas for u · v side by side: |u||v| cos θ = u₁v₁ + u₂v₂ + u₃v₃. Divide both sides by |u||v|:
cos θ = (u · v) / (|u||v|)
Then θ = cos⁻¹ of that number. Because θ is always between 0° and 180°, and cos⁻¹ gives exactly one angle in that range, there is never a second answer to look for.
Direction angles and direction cosines
A vector in three-space makes an angle with each positive axis. These are its direction angles: α (alpha) with the x-axis, β (beta) with the y-axis and γ (gamma) with the z-axis.
Dot v = [v₁, v₂, v₃] with i = [1, 0, 0]: v · i = v₁ and |i| = 1, so cos α = v₁/|v|. In the same way, cos β = v₂/|v| and cos γ = v₃/|v|. These three numbers are the direction cosines of v. They are exactly the components of the unit vector v/|v|, so
cos²α + cos²β + cos²γ = 1.
Hands-on activityMeasure a diagonal in a box
You need: a cardboard box with an open top or a removable lid (a shoebox works well), a ruler or tape measure, a piece of string, tape, a protractor and a calculator.
- Choose one bottom corner of the box as the origin O. Measure the box's length a (x-direction), width b (y-direction) and height c (z-direction) in centimetres.
- Tape one end of the string at O and stretch it straight through the inside of the open box to the diagonally opposite top corner, and tape it there. This is the body diagonal d = [a, b, c].
- Compute the direction angles of d from cos α = a/|d|, cos β = b/|d|, cos γ = c/|d|.
- Hold the protractor's centre at O, in the plane that contains the string and the x-edge, and measure the angle between them. Compare with α.
- Repeat for the angle between the string and the vertical edge (γ).
What to look for: a 40 cm × 30 cm × 20 cm box has |d| ≈ 53.9 cm, α ≈ 42.0°, β ≈ 56.1° and γ ≈ 68.2°. Measuring in three dimensions is hard, so within about 3° is a good result. That is exactly why the dot product is so useful.