How this calculator works
The dot product combines matching components into a scalar. For nonzero vectors, dividing it by their magnitudes gives the cosine of the included angle. Projection keeps only the part of A along B; it is undefined when B is zero, so that output is omitted. The dot product itself remains valid for zero vectors. Missing-component mode recovers the final B component; reorder both vectors together to solve for another position. Magnitude modes reject a right angle, where the equation provides no unique magnitude.
Formula
A dot B = sum(Ai Bi) = |A||B| cos(theta). Projection of A onto B = (A dot B / |B|^2)B.
Worked example
With A = (3, 4) and B = (1, 0), the dot product is 3 and the projection is (3, 0). The included angle is arccos(3/5), about 53.130102 degrees.
Advertisement
Frequently asked questions
Is the result a vector?
The dot product is a scalar. The separate projection result is a vector.
Do perpendicular vectors have zero dot product?
Yes. Conversely, two nonzero vectors with zero dot product are perpendicular.
What units apply?
A dot product has the product of the component units. Projection onto a geometric direction has the same units as A; all components within each vector must be consistent.