Angle Between Two Vectors Calculator
Find the angle between two vectors in 2D or 3D using the dot product, step by step
The Dot Product Formula
The angle between two vectors comes from the dot product:
In 2D, with and :
In 3D the pattern just gains a term:
The formula requires both vectors to be non-zero — the zero vector has no direction, so the angle is undefined. It returns the smaller angle between the two directions, always in .
Step-by-Step, and Reading the Sign
- Dot product: multiply matching components and add.
- Magnitudes: square each component, sum, take the square root.
- Divide: . This value always lies in ; anything outside means an arithmetic slip.
- Inverse cosine: . Set your calculator to degrees or radians deliberately — radians .
What the sign tells you immediately
| Angle | |
|---|---|
| acute, | |
| perpendicular, | |
| obtuse, |
Angle between two points
Points have no direction, so first convert to vectors. For the angle at vertex in triangle , build and — both pointing away from the vertex — then apply the same formula. Subtracting in the wrong direction gives the supplement, .
Direction angle of a single vector
For one 2D vector measured from the positive -axis, use and adjust by when .
Common Mistakes to Avoid
- Forgetting to divide by the magnitudes. alone is meaningless and usually out of domain.
- Adding components instead of multiplying them. The dot product is , not .
- Using the cross product in 2D. works, but cannot distinguish from . The dot product is unambiguous over the full range.
- Rounding too early. Keep four or five decimals before applying ; near or the inverse cosine is extremely sensitive.
- Ignoring degree/radian mode. An answer of is radians, is degrees — same angle.
- Using position vectors when you need displacement vectors. For an angle at a point, subtract that point from the other two first.
Examples
Frequently Asked Questions
θ = arccos((u · v) / (‖u‖‖v‖)). Take the dot product of the two vectors, divide by the product of their magnitudes, then apply the inverse cosine. The same formula works unchanged in 2D, 3D, and any higher dimension.
Yes — only the component count changes. The dot product becomes u₁v₁ + u₂v₂ + u₃v₃ and each magnitude gains a third squared term under the root. Nothing else about the procedure differs, which is why the dot-product method is preferred over cross products in 3D.
Points alone do not define an angle, so pick the vertex where the angle sits and subtract it from the other two points to form vectors. For the angle at B in triangle ABC, use BA = A − B and BC = C − B, then apply the dot-product formula. Both vectors must point away from the vertex.
It means the angle is obtuse — greater than 90° — because cos θ is negative there. A dot product of exactly zero means the vectors are perpendicular, and a positive value means the angle is acute. You can read the shape of the answer before computing any inverse cosine.
Related Solvers
Related Guides
Try AI-Math for Free
Get step-by-step solutions to any math problem. Upload a photo or type your question.
Start Solving