intuition.
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
Linear Algebra
Step 16 of 22

The dot product

Understand first: linear transformations

Two vectors, one question: how much do they point the same way?

The recipe is suspiciously simple. Multiply matching coordinates and add:

(3,4)(2,1)=3(2)+4(1)=10(3, 4) \cdot (2, 1) = 3(2) + 4(1) = 10

Easy to compute, and it looks like it should mean nothing.

What the number is measuring

Watch the visual. One vector casts a shadow onto the other, as if lit from directly above. The dot product is the length of that shadow times the length of the vector it fell on.

That single sentence explains all the behaviour:

  • Same direction gives a long shadow and a large positive number.
  • Perpendicular gives no shadow at all, so the dot product is exactly zero.
  • Opposite directions put the shadow behind the origin, so the number is negative.

Test the middle case: (1,0)(0,1)=1(0)+0(1)=0(1,0) \cdot (0,1) = 1(0) + 0(1) = 0. Two perpendicular vectors, zero, as promised.

That is the cleanest right-angle test in mathematics. No angles measured, no trigonometry: multiply, add, and check for zero.

Length comes free

Dot a vector with itself and the shadow is the whole vector:

(3,4)(3,4)=9+16=25(3,4) \cdot (3,4) = 9 + 16 = 25

which is 525^2, and 5 is the length of (3,4)(3,4) by Pythagoras. So v=vv|v| = \sqrt{v \cdot v}, and Pythagoras turns out to be a special case of the dot product rather than a separate fact.

Why the ugly formula matches the elegant picture

Projecting every vector in the plane onto a fixed line is itself a linear transformation, and its output is a single number. By Act II, such a transformation is described by a one-row matrix — and that row turns out to be precisely the coordinates of the vector you are projecting onto.

So "dot with ww" and "apply the projection that ww defines" are the same operation wearing different clothes. Every vector secretly is a transformation. That correspondence is called duality, and it is why the coordinate formula and the shadow picture were never really two different things.

In 3D there is a second way to combine two vectors, and it answers a different question entirely.