StatGardenREF. DESK
Calculators/Maths/Vector dot product
Maths

Vector dot product calculator

Scalar dot product of two 3D vectors, and the angle between them.

Published 6 August 2026 · Updated 23 September 2026

What this calculator does

The dot product multiplies two vectors and returns a single number rather than a vector. That number encodes how much the two point in the same direction: positive when broadly aligned, zero when perpendicular, negative when opposed.

The perpendicular case is the useful one. Two unit vectors along different axes give a dot product of exactly 0 and an angle of 90.00 degrees, which makes the dot product the standard test for orthogonality.

The formula

Formulaa·b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b|cos θ

Corresponding components are multiplied and summed. Dividing that by the product of the two magnitudes gives the cosine of the angle between them.

TermMeaning
Dot productThe sum of component-wise products, a scalar.
OrthogonalPerpendicular, which corresponds to a dot product of zero.
MagnitudeThe length of a vector, needed to recover the angle.

The inputs explained

FieldWhat to enter
a₁ (x)First vector, x component.
a₂ (y)First vector, y component.
a₃ (z)First vector, z component.
b₁ (x)Second vector, x component.
b₂ (y)Second vector, y component.
b₃ (z)Second vector, z component.

When to use it

Testing whether two vectors are perpendicular

A dot product of zero is the definitive test.

Finding the angle between directions

The dot product with the magnitudes recovers the angle.

Calculating work in physics

Work is the dot product of force and displacement.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

What does each second vector give?

The x unit vector against three others.

First vector (1, 0, 0)
Second vector x componentDot product a·bAngle between them
(-1, 0, 0)-1.000180.00°
(0, 0, 0)0N/A: zero vector
(1, 0, 0)1.0000.00°
Against itself the dot product is 1.000 at 0 degrees. Against the opposite direction it is −1.000 at 180 degrees, and a zero vector leaves the angle undefined.

Questions

Why does a dot product of zero mean perpendicular?

Because the dot product equals the product of the magnitudes times the cosine of the angle. Cosine is zero at 90 degrees, so unless one vector has zero length, a zero dot product can only mean a right angle.

What does a negative dot product mean?

That the angle between the vectors exceeds 90 degrees, so they point in broadly opposite directions. The cosine is negative across that range.

How does this differ from the cross product?

The dot product returns a scalar and measures alignment; the cross product returns a vector perpendicular to both and measures the area they span. They answer opposite questions about the same pair.

Why is it used for work in physics?

Because only the component of force along the direction of motion does work. The dot product extracts exactly that component, which is why pushing perpendicular to motion does no work at all.

For the perpendicular vector instead, see the cross product calculator. For vector length, see the vector magnitude calculator.