Dot Product and Angle Calculator
Find the dot product, lengths, unit vectors, and the angle between two vectors, with exact roots like √14. Drag them and watch the sign change at 90°.
Vectors
Enter two vectors with the same number of entries, or start from an example.
Result
Updates as you type.
- Lengths
- Cosine of the angle
- Angle
- Unit vectors
The angle is less than 90°, so the dot product is positive.
What the dot product measures
The dot product of two vectors multiplies matching entries and adds the results:
It also has a geometric meaning, which connects it to the angle between the vectors:
So its sign tells you the direction. It's positive when the vectors point broadly the same way, zero when they're perpendicular, and negative when they point apart. Each entry of a matrix product is one of these dot products, a row with a column, as the Matrix Multiplication Calculator shows.
Lengths, unit vectors, and angles
A vector's dot product with itself is its squared length, so:
Dividing a vector by its length gives the unit vector, , with the same direction and length 1. Dividing the dot product by both lengths gives the cosine of the angle:
This calculator keeps roots exact, so you see rather than a rounded decimal, and it recognizes angles such as and exactly. Any other angle shows as an approximation, marked with . A zero vector has no direction, so it has no angle or unit vector.
Where it comes up
- Testing for perpendicular. Two vectors are orthogonal exactly when their dot product is 0. That's quicker and more reliable than measuring an angle.
- Projections. The dot product measures how much of one vector lies along another.
- Work in physics. Force dotted with displacement gives the work done, so only the part of the force along the motion counts.
- Similarity. Cosine similarity compares the directions of two lists of numbers while ignoring their sizes, which is common in search and machine learning.
The Linear Transformation Visualizer shows the same idea in reverse: a rotation keeps every dot product, so it keeps all lengths and angles.
Related calculators
Keep working with vectors and matrices.
Vector Projection Calculator
Project one vector onto another in exact fractions. Get the vector projection, scalar projection, and orthogonal remainder, and see the projection as a shadow.
Cross Product Calculator
Find the cross product of two 3-D vectors in exact fractions, step through the determinant, and see the perpendicular vector and the parallelogram area in 3-D.
Matrix Multiplication Calculator
Multiply two to four matrices with exact fractions, entry-by-entry explanations, and Python list import and export.