How to use this calculator
- Enter or choose vector a.
- Enter or choose vector b.
- The a · b updates as you type. Use Copy result or Share to keep it.
Method
a · b = Σ aᵢbᵢ = |a||b| cos θ; θ = 2·atan2(|â − b̂|, |â + b̂|)
- aᵢ, bᵢ
- the components
- |a|, |b|
- the lengths
- θ
- the angle between the vectors
- â, b̂
- the unit vectors
Worked example
- a · b = 1·4 + 2·(−5) + 3·6 = 4 − 10 + 18 = 12.
- |a| = √14 ≈ 3.7417 and |b| = √77 ≈ 8.7750.
- cos θ = 12 ÷ (3.7417 × 8.7750) ≈ 0.36549, so θ ≈ 68.56°.
(1, 2, 3) · (4, −5, 6) = 12, and the vectors are about 68.56° apart.
What the result means
A positive dot product means the angle is acute, a negative one obtuse, and zero means the vectors are perpendicular (orthogonal).
Assumptions and limits
- Both vectors are in the same Euclidean space with the standard dot product.
- The angle is undefined if either vector is the zero vector.
Questions
Why is the angle not just arccos of cos θ?
arccos loses accuracy for nearly parallel vectors. The calculator uses the equivalent formula 2·atan2(|â − b̂|, |â + b̂|), which stays accurate at every angle.
What is the dot product used for?
Work done by a force (F · d), projections, testing perpendicularity, and similarity scores between vectors.