Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

3 · IB Maths

Vectors and the dot product

Drag the two arrowheads, or use the sliders. The sum follows the parallelogram, and the dot product and the angle between the vectors update live.

Predict first

Start from the default vectors a = (3.0, 2.0) and b = (1.0, 3.0). Change b_x from 1.0 to −2.0 so that b = (−2.0, 3.0). What is the angle between a and b?

a b a + b or a − b. Drag either arrowhead.

a · b = a₁b₁ + a₂b₂ = |a||b| cos θ
cos θ = a · b ÷ (|a||b|)
scalar projection = a · b ÷ |b|

Try this

  1. Set a = (3.0, 2.0) and b = (−2.0, 3.0). Read the dot product and the angle, then explain why they show the vectors are perpendicular.
  2. Make b point the opposite way to a, for example b = (−1.5, −1.0). What are the dot product and angle, and what does the sign of a · b tell you?
  3. Tick the projection option. Keep a fixed and swing b round; at which angles is the scalar projection of a onto b positive, zero and negative?

Common error: a · b is a number, not a vector. Its sign tells you whether the angle is acute (positive), a right angle (zero) or obtuse (negative), and the angle itself needs an inverse cosine of a · b ÷ (|a||b|).