Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find the Angle Between Two Vectors

Solve the geometric dot product formula for the cosine. The dot product divided by the two lengths gives cos⁡θ\cos\theta, and the inverse cosine gives an angle between 0∘0^\circ and 180∘180^\circ.

Recognize the task

Two vectors and the question "what angle?", "acute or obtuse?", "are they parallel?": the angle between (1,2,2)(1, 2, 2) and (2,−1,2)(2, -1, 2), the angle of a triangle given by its vertex vectors. Test: do you have the components of both vectors?
The formula is derived in the angle between vectors lesson section.

Steps

StepOn u=(1,2,2)\mathbf{u} = (1, 2, 2), v=(2,−1,2)\mathbf{v} = (2, -1, 2)
1Compute the dot product. Multiply matching components and add, as in the dot product.u⋅v=2−2+4=4\mathbf{u} \cdot \mathbf{v} = 2 - 2 + 4 = 4
2Compute both lengths. Neither vector may be the zero vector.Euclidean norm ↗∥u∥=9=3\|\mathbf{u}\| = \sqrt{9} = 3,  ∥v∥=9=3\ \|\mathbf{v}\| = \sqrt{9} = 3
3Divide to get the cosine. The angle formula. By Cauchy–Schwarz the value lies between −1-1 and 11; anything else is an arithmetic error.cos⁡θ=43⋅3=49\cos\theta = \dfrac{4}{3 \cdot 3} = \dfrac{4}{9}
4Take the inverse cosine. The result is always in [0∘,180∘][0^\circ, 180^\circ]. Set your calculator to degrees or radians as the question asks.θ=arccos⁡49≈63.6∘\theta = \arccos\tfrac{4}{9} \approx 63.6^\circ

Worked examples

Example 1 · a standard angle

basic
(1,0)⋅(1,1)=1(1, 0) \cdot (1, 1) = 1, lengths 11 and 2\sqrt{2}
dot product and lengths
cos⁡θ=12\cos\theta = \dfrac{1}{\sqrt{2}}
divide
θ=45∘\theta = 45^\circ
known cosine value

Example 2 · an obtuse angle in three dimensions

negative cosine
(1,−1,0)⋅(0,1,−1)=−1(1, -1, 0) \cdot (0, 1, -1) = -1
negative dot product
cos⁡θ=−12 2=−12\cos\theta = \dfrac{-1}{\sqrt{2}\,\sqrt{2}} = -\dfrac{1}{2}
both lengths are 2\sqrt{2}
θ=120∘\theta = 120^\circ
obtuse, as the sign predicted

Example 3 · opposite directions

parallel
(2,−1)⋅(−4,2)=−8−2=−10(2, -1) \cdot (-4, 2) = -8 - 2 = -10
∥(2,−1)∥=5\|(2, -1)\| = \sqrt{5},  ∥(−4,2)∥=25\ \|(-4, 2)\| = 2\sqrt{5}
second is −2-2 times the first
cos⁡θ=−1010=−1\cos\theta = \dfrac{-10}{10} = -1, so θ=180∘\theta = 180^\circ
antiparallel vectors
Check an angle with the inner product visualizer.

See it happen

Divide each vector by its length and both become unit vectors on the unit circle (or sphere). Their dot product is then just cos⁡θ\cos\theta: the horizontal coordinate of one tip, seen from the other. That is why the formula divides by both lengths before taking the inverse cosine.

Common mistakes

Forgetting to divide by the lengths

✗ cos⁡θ=u⋅v=4\cos\theta = \mathbf{u} \cdot \mathbf{v} = 4
✓ cos⁡θ=43⋅3=49\cos\theta = \dfrac{4}{3 \cdot 3} = \dfrac{4}{9}

Calculator in the wrong mode

✗ arccos⁡49≈1.11\arccos\tfrac{4}{9} \approx 1.11, written as 1.11∘1.11^\circ
✓ 1.111.11 is in radians; in degrees it is about 63.6∘63.6^\circ

Turning an obtuse angle into an acute one

✗ cos⁡θ=−12\cos\theta = -\tfrac{1}{2}, so θ=60∘\theta = 60^\circ
✓ θ=120∘\theta = 120^\circ; the angle between vectors can be obtuse

A cosine larger than 1

✗ cos⁡θ=94\cos\theta = \tfrac{9}{4}, "no angle exists"
✓ an arithmetic slip: by Cauchy–Schwarz ∣cos⁡θ∣≤1|\cos\theta| \le 1 always