Dot Product

Pre-requisites: Vectors

The dot product is a miracle composed of two definitions. The first definition, the geometric definition, is that

v · w = |v| |w| cos &theta

where theta is the angle between the two vectors. We call this the geometric definition because it is composed entirely of terms with geometric meaning: angles and lengths.

The algebraic definition of the dot product is that

(v1, v2, v3) · (w1, w2, w3) = v1 w1 + v2 w2 + v3 w3

The miracle is that these two definitions, the geometric and the algebraic, are the same.

This is by no means obvious, and indeed you should spend several minutes (or more) thinking about how, why, and if this could be true. Try applying both definitions to pairs of vectors with easily calculatable angles like (1,0,0) and (0,0,1), or between two arbitrary vectors in the plane, or between a vector and itself.

Before we prove that the two definitions are the same, let's look at some of the properties of the dot product. First and foremost, both definitions agree that the dot product of two vectors is a scalar real number. It is not a vector.

Second, both definitions agree that the dot product is commutative (that v · w = w · v) and that it absorbs constants: ( c v) · w = c ( v · w). Also, both definitions imply that 0 · w = 0.

Finally, both definitions (with a little bit of help from the Pythagorean theorem) give v · v = | v |2 = v12 + v22 + v32 . This is nice, and it further implies that v · v >= 0 and that v · v = 0 if and only if v = v = 0.

Okay, so our two definitions of the dot product agree on lots of things. What is even more important is their different strengths:

Well, enough with the suspense. Here's the proof that the two definitions of the dot product. It uses the law of cosines, which says that
C2 = A2 + B2 - 2 A B cos theta
where theta is the angle opposite side C in the triangle ABC. We apply it to the triangle with sides v, w, and v-w to get
|v-w|2 = |v|2 + |w|2 - 2 |v| |w| cos theta

( v1 - w1 )2 + ( v2 - w2 )2 + ( v3 - w3 )2 = v12 + v22 + v32 + w12 + w22 + w32 - 2 |v| |w| cos theta

-2 v1 w1 -2 v2 w2 -2 v3 w3 = -2 |v| |w| cos theta

v1 w1 + v2 w2 + v3 w3 = | v| |w| cos theta

Right. You may have noticed that we have been very careful to always call the dot product the dot product, rather than just the product of two vectors. This is because there are many different ways to take the product of two vectors, including as we will soon see, cross product.

Exercises:

  1. Why can't you prove that the dot product is associative?
  2. Calculate the dot product of (1,2,3) and (4,5,6).
  3. Calculate the dot product of two unit vectors separated by an angle of 60 degrees.
  4. What is i · j? i · i?
  5. Find a vector orthogonal to (1,2,3).
  6. Prove that projection is additive; i.e., that projv ( w1 + w2 ) = ( projv w1 ) + ( projv w2 ).
  7. Calculate the angle between (0,4,-6) and (3,0,-2).
  8. Calculate the projection of (1,2,3) onto (4,4,4).
  9. Calculate the work done against the force (0,0,-30) by moving an object from (1,1,1) to (-10,3,7).
  10. Prove the Cauchy-Bunyakovskii-Schwarz inequality: v · w <= | v | | w |.
  11. Prove the triangle inequality: | v + w | <= | v | + | w |. [Hint: square both sides and apply Cauchy-Bernard-Schwartz.] Where does the name triangle inequality come from?

Solutions to Exercises | Vector Calculus Index | World Web Math Main Page


thomasc@athena.mit.edu
last modified 1 July 1997