Dot Product Calculator
Find the dot product and angle between two vectors.
Results update as you type.
How it works
The dot product, also called the scalar product, combines two vectors into a single number that measures how much they point in the same direction. This dot product calculator takes two vectors in two or three dimensions and returns both the dot product and the angle between them. You compute the dot product by multiplying the vectors' matching components together and summing those products, so for vectors (1, 2, 3) and (4, minus 5, 6) the result is 4 minus 10 plus 18, which is 12. The value carries clear geometric meaning: it is positive when the vectors point in broadly the same direction, negative when they point in opposing directions, and exactly zero when they are perpendicular. Because the dot product also equals the product of the magnitudes times the cosine of the angle between the vectors, the calculator rearranges that relationship to report the angle directly. The dot product is fundamental in physics, where work is force dotted with displacement, and in computer graphics, where lighting and shading depend on the angle between a surface and a light source. Engineers, game developers, and students all use it constantly to project one vector onto another or to test for perpendicularity.
a · b = aₓbₓ + a_yb_y + a_zb_z; cos θ = (a · b) / (|a||b|)
The dot product multiplies the matching components of two vectors and adds the results into a single number. That number also equals the product of the two magnitudes times the cosine of the angle between them, so rearranging lets you recover the angle by dividing the dot product by the product of the magnitudes and taking the inverse cosine. A dot product of zero means the vectors are perpendicular.
Source:Euclidean inner product
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter vector a — x, vector a — y, vector b — x and vector b — y.
- 2
Adjust the options
Adjust vector a — z (optional) and vector b — z (optional) if they apply — sensible defaults are already set.
- 3
Read your result
Dot product updates instantly as you type — no button to press.
Frequently asked questions
What is the dot product of two vectors?
The dot product is a single number obtained by multiplying the corresponding components of two vectors and adding the results. It measures how aligned the vectors are: large and positive when they point the same way, negative when they oppose, and zero when they are at right angles. Unlike the cross product, the dot product returns a scalar rather than another vector.
How do I find the angle between two vectors?
Divide the dot product by the product of the two vectors' magnitudes, then take the inverse cosine of that ratio. This works because the dot product equals the magnitudes multiplied by the cosine of the angle. The calculator does all of this automatically and reports the angle in degrees, from zero for parallel vectors up to one hundred eighty for opposite ones.
What does a zero dot product mean?
A dot product of zero means the two vectors are perpendicular, meeting at a right angle of ninety degrees. This is one of the most useful properties of the dot product: it provides an instant test for orthogonality without computing the angle explicitly. In geometry, physics, and graphics, checking whether the dot product is zero is the standard way to confirm two directions are at right angles.
Is the dot product the same as the cross product?
No. The dot product yields a single number and measures alignment, while the cross product yields a new vector perpendicular to both inputs and measures the area they span. The dot product exists in any dimension, whereas the cross product is defined mainly in three dimensions. They answer different geometric questions and are used in different situations.
Where is the dot product used?
In physics the work done by a force is the dot product of the force and the displacement, capturing only the component along the motion. In computer graphics, the brightness of a surface depends on the dot product of its normal with the light direction. It also underlies projections, similarity measures in machine learning, and tests for perpendicularity throughout engineering.