angle between two vectors — Definition, Formula & Examples
The angle between two vectors is the smallest rotation needed to align one vector's direction with the other, measured where their tails meet. You find it using the dot product formula and inverse cosine.
Given two nonzero vectors and in , the angle between them is defined by , where (i.e., to ).
Key Formula
Where:
- = Angle between the two vectors (between 0° and 180°)
- = Dot product of vectors a and b
- = Magnitude (length) of vector a
- = Magnitude (length) of vector b
How It Works
First, compute the dot product of the two vectors. Next, find each vector's magnitude. Divide the dot product by the product of the magnitudes to get . Finally, apply (inverse cosine) to obtain the angle. The result always falls between and : an angle of means the vectors point in the same direction, means they are perpendicular, and means they point in opposite directions.
Worked Example
Problem: Find the angle between the vectors a = (1, 2, 2) and b = (4, 0, −3).
Dot product: Multiply corresponding components and add them up.
Magnitudes: Find the length of each vector.
Apply formula: Divide and take the inverse cosine.
Answer: The angle between the two vectors is approximately 97.7°.
Why It Matters
Physics courses use vector angles constantly — for example, work equals , so knowing the angle between force and displacement determines how much energy is transferred. In computer graphics, the angle between surface normals and light direction controls shading brightness.
Common Mistakes
Mistake: Forgetting to divide by BOTH magnitudes and dividing by only one.
Correction: The denominator must be the product , not just one magnitude. Without both, the cosine value can exceed the valid range of −1 to 1.
