Angle Between Two 2D Vectors (Components)
Worked example: (1, 0) and (1, 1) → 45° — press Try an example to run it live, then adjust anything.
Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!
The angle between →
Grade 12Grade 12 Math
Test your skills in the Exam Room: new numbers every attempt — free lessons for students, no sign-up, just pure learning.
share your results
Angle Between Two 2D Vectors (Components) explained
Divide the dot product by both magnitudes and what is left is a pure cosine, so the angle between any two vectors falls out of their coordinates with no drawing required. Take a = (1, 0) and b = (1, 1): the dot product is 1, the magnitudes are 1 and √2, and arccos(1/√2) = 45°, which is obviously right. Take a = (3, 4) and b = (4, 3): the dot product is 24, both magnitudes are 5, and arccos(24/25) = arccos(0.96) ≈ 16.26° — a result no sketch would give you to two decimals.
The Cauchy–Schwarz inequality guarantees the fraction never leaves the range −1 to 1, so an angle always exists. Floating-point arithmetic does not care: for two nearly parallel vectors the computed ratio can come out as 1.0000000000000002, and arccos of that is NaN. This is one of the most reported bugs in graphics and robotics code, and the fix is a one-line clamp before the arccos — which formula.expert applies. Note also that the answer runs from 0° to 180° and carries no sense of rotation; if you need to know whether b sits clockwise or counterclockwise from a, use the cross product's sign instead.
Angle Between Two 2D Vectors (Components) formula
- = Angle between a and b (°)
- = x-component of a
- = y-component of a
- = x-component of b
- = y-component of b
Missing one of these? Work it out first, then come back
- Angle between a and b — Dot Product from Magnitudes and Included Angle, Cross Product Magnitude
- x-component of a — Direction Angle of a 2D Vector, Dot Product of Two 2D Vectors (Components)
- y-component of a — Direction Angle of a 2D Vector, Dot Product of Two 2D Vectors (Components)
- x-component of b — Direction Angle of a 2D Vector, Dot Product of Two 2D Vectors (Components)
- y-component of b — Direction Angle of a 2D Vector, Dot Product of Two 2D Vectors (Components)