Angle Between Vectors

Angle Between Vectors
The dot product can be used to measure the angle between vectors u and v in Rn. We call this angle θ.

Another formula for the dot product involves θ:
Notes
Since the norms of the vectors on the RHS are non-negative, the sign of cosθ determines the sign of the dot product.
u⋅v=positive∥u∥∥v∥cos(θ)
0<θ<2π,2π<θ<π,θ=2π,θ=0,θ=π,θacuteobtuseorthogonalparallel (same direction)parallel (opposite direction)u⋅vu⋅v>0u⋅v<0u⋅v=0u⋅v=∥u∥∥v∥ u⋅v=−∥u∥∥v∥

Finding the Angle Between Vectors
Combining the two equations for u⋅v gives us the following:
Steps
- LHS: Calculate the dot product u⋅v = u1v1 + u2v2 + … + unvn
- RHS: Calculate ∥u∥ and ∥v∥
- Solve for cos(θ)
- Solve for θ using special triangles or the inverse cosine, cos−1

Example: Angle Between Vectors
Find the angle between the vectors u=[−21] and v=[−3−1].

The formula is u⋅v=∥u∥∥v∥cos(θ)
LHS: u⋅v = [−21]⋅[−3−1] = (−2)(−3)+(1)(−1) = 5
RHS:∥u∥=(−2)2+12=5∥v∥=(−3)2+(−1)2=10
Subsititute these values into the formula, then solve for cosθ and simplify:
5 = 5105105 = 505 = 2525 = 525 = 21 = cosθcosθcosθcosθcosθcosθ
Finally, we can recall a special triangle to find θ:

∴ θ=4π

Example: Angle Between Vectors
Given u=⟨1,4,−2⟩ and v=⟨0,−2,5⟩, find the angle between u and v.
u⋅v = (1)(0)+(4)(−2)+(−2)(5) = −18
∥u∥=(1)2+(4)2+(−2)2=21
∥v∥=(0)2+(−2)2+(5)2=29
Substituting into the formula:
−18=2129cosθ
So we can solve for cosθ, then use the inverse cosine to find θ:
cosθ=2129−18≈−0.7294θ=cos−1(609−18)≈2.388 rad (136.8°)
Practice: Types of Angles Between Vectors
Match the correct angle to each expression.
θ=π
θ=6π
θ=2π
θ=43π
θ=0
u⋅v=∥u∥∥v∥
u⋅v=−21
u⋅v=−∥u∥∥v∥
u⋅v=7
u⋅v=0
Practice: Angle Between Vectors
Suppose u, v∈Rn are non-zero vectors that are not parallel, and let w=∥v∥u−∥u∥v.
Find a simplified expression for the cosine of the angle between v and w.