Dot Product Calculator: Quick and User-Friendly

Enter two vectors of equal length as comma-separated numbers (2D or 3D).

The Dot Product Formula

For two vectors of equal length, the dot product is the sum of the products of corresponding components: a dot b = a1*b1 + a2*b2 + ... + an*bn. The result is a single number (a scalar), not another vector.

Worked Example

Take vector A = (2, -1, 3) and vector B = (4, 5, -2). Multiply matching components: 2x4 = 8, -1x5 = -5, 3x(-2) = -6. Sum them: 8 + (-5) + (-6) = -3. So A dot B = -3.

A negative dot product like this one tells you something geometrically: the angle between the two vectors is greater than 90 degrees. A dot product of exactly zero means the vectors are perpendicular; a positive result means the angle between them is less than 90 degrees.

Why Vector Length Must Match

The formula only makes sense when both vectors have the same number of components - there is no way to pair a 2D vector's missing third term against a 3D vector's z-component. Enter values with matching commas and counts on both sides.

Common Applications

Physics uses the dot product to calculate work done by a force (a force vector dotted with a displacement vector) and to project one vector onto another. In computer graphics, it tests whether two surfaces face the same direction (via their normal vectors) and calculates lighting angles.