Dot Product Calculator

Calculate the dot product of two vectors in 2D or 3D. See each component multiplication, vector magnitudes, the angle between the vectors, and whether the vectors are perpendicular.

Calculate the dot product

Enter two vectors with the same number of components. Separate values with commas or spaces. For example: 2, 3, 4.

Enter 2 or 3 finite numeric components.
Use the same dimension as Vector A.

Ready to calculate?

The example vectors are filled in above. Select Calculate Dot Product to display the result and the calculation steps.

What is the dot product?

The dot product, also called the scalar product, combines two vectors to produce a single number. It is widely used in linear algebra, geometry, physics, computer graphics, and engineering.

Dot product formula

For two vectors with the same dimension, A = (a₁, a₂, ..., aₙ) and B = (b₁, b₂, ..., bₙ), the dot product is:

A · B = a₁b₁ + a₂b₂ + ... + aₙbₙ

Example: 3D vectors

Suppose A = (2, 3, 4) and B = (1, −2, 2).

A · B = (2 × 1) + (3 × −2) + (4 × 2)
A · B = 2 − 6 + 8 = 4

The dot product is 4.

How to interpret the result

Common applications

Frequently asked questions

Can the dot product be negative?

Yes. For two nonzero vectors, a negative dot product indicates that the angle between them is greater than 90° and less than 180°.

What does a dot product of zero mean?

If both vectors are nonzero, a dot product of zero means they are perpendicular. If one vector is the zero vector, the dot product is also zero, but the angle is undefined.

Can I use this calculator for 2D and 3D vectors?

Yes. Enter two 2D vectors with two components each, or two 3D vectors with three components each. The dimensions must match.

Is the dot product the same as the cross product?

No. The dot product produces a scalar. The 3D cross product produces a vector perpendicular to both input vectors.

Related matrix and vector tools

Continue exploring calculations on Matrices.org.