Skip to content
← All questions

How do you find the angle between two nonzero vectors using the dot product?

Divide the dot product of the two vectors by the product of their lengths to obtain cos⁡θ\cos \theta. Then, take the arccosine of this value to find the angle θ\theta in the range [0,π][0, \pi].

Conditions

  • Both vectors are nonzero.
  • The vectors are in a real inner product space (e.g., Rn\mathbb{R}^n).

Reasoning, step by step

  1. Calculate the dot product a⋅b\mathbf{a} \cdot \mathbf{b}.
  2. Calculate the length (norm) of vector a\mathbf{a}, denoted ∥a∥\|\mathbf{a}\|.
  3. Calculate the length (norm) of vector b\mathbf{b}, denoted ∥b∥\|\mathbf{b}\|.
  4. Compute the cosine of the angle: cos⁡θ=a⋅b∥a∥∥b∥\cos \theta = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|}.
  5. Take the arccosine: θ=arccos⁡(a⋅b∥a∥∥b∥)\theta = \arccos\left(\frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|}\right).
  6. Ensure the result is in the standard range [0,π][0, \pi].

Example

If a⋅b=−28\mathbf{a} \cdot \mathbf{b} = -28, ∥a∥=46\|\mathbf{a}\| = \sqrt{46}, and ∥b∥=75\|\mathbf{b}\| = \sqrt{75}, then cos⁡θ=−284675\cos \theta = \frac{-28}{\sqrt{46}\sqrt{75}}. The angle is arccos⁡\arccos of this value.

Common misconceptions

  • Forgetting to divide by the product of the lengths.
  • Using the dot product directly as the angle.
  • Taking the arcsine instead of arccosine.
  • Not restricting the angle to the range [0,π][0, \pi].

Watch the explanation

Connected concepts

Explore next

Related questions

Meet the concept

↗
Meet the concept

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.