Numford
Vectors

Dot product of two vectors

A·B = 12, a single number with no direction, for 6 and 4 at 60 degrees.

Vectors

Drag the glowing tips, or type values. Angles are measured from the x axis, and θ is the angle from A to B. Pick a result card to see it built in the picture.

Angle between60°cos θ = A·B / AB
Unit vectors1iB = 0.5i + 0.87j

Vector A of size 6 and vector B of size 4 with 60 degrees between them. The resultant is 8.72, 23.41 degrees from A. The dot product is 12 and the cross product has size 20.78.

Show the formulas
Resultant
R = √(A² + B² + 2AB cos θ) = √(6² + 4² + 2 × 6 × 4 × cos 60°) = 8.72
Direction
tan β = B sin θ / (A + B cos θ) = 4 × sin 60° / (6 + 4 × cos 60°), so β = 23.41° from A
Difference
|A - B| = √(A² + B² - 2AB cos θ) = √(6² + 4² - 2 × 6 × 4 × cos 60°) = 5.29
Dot product
A·B = AB cos θ = 6 × 4 × cos 60° = 12
Cross product
|A×B| = AB sin θ = 6 × 4 × sin 60° = 20.78
Components
A·B = AxBx + AyBy + AzBz = 6 × 2 + 0 × 3.46 + 0 × 0 = 12
Determinant
A×B = (AyBz - AzBy) i + (AzBx - AxBz) j + (AxBy - AyBx) k = 20.78k
Unit vector
 = A / |A| = 1i
Working

Step by step

  1. Given A = 6, B = 4 and θ = 60°.
  2. A·B = AB cos θ = 6 × 4 × cos 60° = 12
  3. Check with components. A = 6i, B = 2i + 3.46j, so A·B = 6 × 2 + 0 × 3.46 = 12.
  4. Positive: the angle is less than 90°. The part of B along A is B cos θ = 2.
Derivation

Why it works

  1. The dot product multiplies the length of A by the part of B that lies along A.
  2. That part is the projection of B on A, which is B cos θ.
  3. So A·B = A × (B cos θ) = AB cos θ, and by symmetry it equals B × (A cos θ).
  4. Writing both vectors in components, i·i = j·j = k·k = 1 and i·j = j·k = k·i = 0.
  5. Only matching components survive, so A·B = AxBx + AyBy + AzBz.
Questions

Dot product of two vectors: quick answers

Is the dot product a vector or a scalar?

A scalar. It is a single number, AB cos θ, with no direction.

When is the dot product zero?

When the vectors are perpendicular (θ = 90 degrees), or when one is the zero vector. It is also why i·j = 0.

What does the dot product mean physically?

Work is the dot product of force and displacement: W = F·d = Fd cos θ. Power is F·v.

Try your own vectors