Linear Algebra
Basic

Dot Product

Sum of componentwise products of two vectors.

Formula

a⋅b=∑aibi\mathbf{a}\cdot\mathbf{b} = \sum a_i b_i

Variables

a_i,b_iComponents

Example

(1,2)·(3,4)=11

How it works

The dot product takes two vectors and combines them by multiplying matching components and adding the results. This gives a single number that measures how strongly the vectors point in the same direction: it becomes larger when corresponding components line up, and it can be zero for perpendicular vectors. The component-by-component rule comes from breaking each vector into coordinates and adding up their contributions along each axis.

When to use it

Use the dot product when you need a single numerical measure of how aligned two vectors are, such as in geometry, physics, and projection problems. It is also useful for finding work done by a force, checking whether vectors are perpendicular, or computing angles between vectors.

Worked example, step by step

Let a = (2, -1, 3) and b = (4, 0, -2). Compute the matching products: 2·4 = 8, (-1)·0 = 0, 3·(-2) = -6. Add them: 8 + 0 + (-6) = 2. So, a · b = 2.

Common mistakes to avoid

  • Adding vector components instead of multiplying matching ones first
  • Forgetting that negative numbers change the sign of a product
  • Using vectors with different numbers of components without checking they match

Did You Know?

The dot product is zero exactly when two vectors are perpendicular, the cornerstone of 3D graphics lighting.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026