Find the dot product of two vectors and the angle between them. Enter both vectors, components separated by commas.
Usage Tip
Projection, work in physics, and similarity in machine learning all rest on the dot product.
cos(angle) = (A · B) ÷ (|A| |B|)
Zero means perpendicular; positive means a similar direction, negative the opposite.
The angle between them and both magnitudes are shown.
The dot product is zero exactly when the vectors are perpendicular.
The dot product multiplies matching components of two vectors and adds the results into a single number. It also equals the product of the two lengths times the cosine of the angle between them, which is how the angle is found. A positive dot product means the vectors point in broadly the same direction, zero means they are perpendicular, and a negative value means they point in opposite directions.
The dot product is used to find the component of one vector along another, to test for perpendicular directions, and to calculate work done by a force. Both vectors must have the same number of components. If either vector has zero length, the angle between them is undefined.
