How to use this calculator
- Enter or choose vector A.
- Enter or choose vector B.
- The angle between the vectors updates as you type. Use Copy result or Share to keep it.
Method
cos θ = (A·B) ÷ (|A| × |B|); A·B = Σ aᵢbᵢ; |A| = √(Σ aᵢ²); θ = arccos(cos θ)
- A, B
- the two vectors
- aᵢ, bᵢ
- their components
- θ
- the angle between them, from 0° to 180°
Worked example
- A·B = 3×4 + 4×3 = 24.
- |A| = √(9+16) = 5 and |B| = 5.
- cos θ = 24 ÷ 25 = 0.96, so θ = arccos 0.96 ≈ 16.2602°.
The vectors (3, 4) and (4, 3) are about 16.26° apart.
What the result means
A dot product of zero means a right angle; a positive one means less than 90° and a negative one more than 90°. The angle never exceeds 180° because it is measured the short way round.
Assumptions and limits
- Both vectors are in the same space and use the same orthonormal (ordinary Cartesian) basis.
- The angle is undefined if either vector is zero.
- This is the unsigned angle; a signed (clockwise or anticlockwise) angle needs a 2D orientation convention.
Questions
Does the order of the vectors matter?
No. The dot product is symmetric, so the angle from A to B equals the angle from B to A.