What does the dot product of two vectors measure, and what does it mean when the dot product is zero? What is a⋅b for a=(2,1) and b=(1,−2)?

Linear algebra and optimisation, Vectors and dot product
Level L1 Beginner. Length Short. Nature Th+Mat Both.

What's being asked

Whether you know the dot product is one number that says how much two vectors point the same way, and can do the tiny multiply-and-add.

Key idea

A vector is a list of numbers, such as a point or an arrow on a map. The dot product multiplies matching entries and adds them: a⋅b=a1b1+a2b2. A large positive value means the arrows point roughly the same way, a negative value means roughly opposite ways, and exactly zero means they are at a right angle (perpendicular, also called orthogonal).

Steps

  1. Say what a vector is: an ordered list of numbers, like a step of 2 east and 1 north. Here a is 2 east, 1 north and b is 1 east, 2 south.
  2. Multiply matching entries: 2×1=2 and 1×(−2)=−2.
  3. Add them: a⋅b=2+(−2)=0.
  4. Read the result: zero means a and b are perpendicular. Sketch both arrows from the origin to see the right angle.
  5. Say why it matters: models use the dot product to measure similarity. A weight vector dotted with a feature vector gives a score.

Common mistakes

How long your answer should be

About 1 minute; two lines of arithmetic and one sentence of meaning.

Read this

Previous in Linear algebra and optimisation: none
Next in Linear algebra and optimisation: What is a vector norm, how do the ℓ1 (Manhattan) norm and the ℓ2 (Euclidean) norm differ geometrically, and what are both norms for v=(3,−4)⊤?