Your Equation

Library / Foundations: Maths / FMA-40

Foundations: Maths

Dot product

Scalar product of two vectors.

Ref
FMA-40
Rev
v1
Field
Foundations: Maths
Result
a·b

|a| and |b| are the lengths of the two vectors and θ the angle between them when drawn from the same point, from 0° (same direction) to 180° (opposite). The result is a number, not a vector. In components, a·b = aₓbₓ + a_yb_y + a_zb_z.

Scalar product of two vectors. It is largest when they point the same way and zero when they are at right angles.

Calculator

Solve for
0.1100
0.1100
°
0180
  • Component of a along b2.5
  • Component of a perpendicular to b4.33

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Dot product () current value 10
|b|Magnitude of bKey driver
0.25250
|a|Magnitude of a
0.2200
θAngle between them
−2020
  • The dot product is zero for perpendicular vectors, so it tests for a right angle.
  • Work is a dot product: a 5 N force along a 4 m path at 60° does 10 J, because only the component along the path counts.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
|b| Magnitude of b0.1 to 100 0.25250249.8+10%+10 %
|a| Magnitude of a0.1 to 100 0.2200199.8+10%+10 %
θ Angle between them0 to 180 °−202040+10%−18.7 %

Sweep of Angle between them

Angle between them (°)Dot product
020
22.518.48
4514.14
67.57.654
901.225e-15
112.5−7.654
135−14.14
157.5−18.48
180−20

Sweep one variable

Dot product ()Hover, touch, or use the arrow keys on the chart
−20−1001020 050100150 Angle between them (°) now 10

Variables and how each one contributes

a·b

Dot product

Result ·

What the equation gives you. Everything else feeds it.

|a|

Magnitude of a

· typical 0.1 to 100

The length of the first vector. Directly proportional.

|b|

Magnitude of b

· typical 0.1 to 100

The length of the second vector. Directly proportional.

θ

Angle between them

° · typical 0 to 180

The angle between the vectors. Acts through cos θ: flat near 0° and steepest near 90°. From 60° to 70° the product falls from 10 to 6.8, and beyond 90° it turns negative.

Worked example with the values above

  1. cos 60° = 0.5.
  2. Product of the lengths: 5 × 4 = 20.
  3. a·b = 20 × 0.5 = 10.

Assumptions and limits

  • Both vectors are measured from the same point or are free vectors.
  • The angle is the smaller one between the directions, from 0° to 180°.

Common mistakes

  • Using the angle between a vector and a plane instead of between the two vectors.
  • Setting the calculator to radians when θ is in degrees.

Statistics and uncertainty

Near 90° the dot product is a small difference of large contributions, so a small error in the angle gives a large relative error in the result; near 0° or 180° the same angle error matters very little.

Where it is used

  • Work done by a force along a displacement.
  • Component of a velocity or wind along a line of sight.

Maths you need

  • Vectors: magnitude and direction
  • Cosine: the component along a direction

Related formulas

Practise this formula