Chapter 20. Proofs of the dot product property

§20.1 Deriving the geometric definition of dot product from the algebraic one

This proof is short, but harder to come up with.

We have two definitions in play and we want to show they coincide, which makes notation awkward. So in what follows, our notation 𝐮⋅𝐯 will always refer to the algebraic definition; and we will prove that 𝐮⋅𝐯=|𝐮||𝐯|cos𝜃.

The algebraic definition is already enough to tell us that

𝐰⋅𝐰=|𝐰|2

(1)

by the Pythagorean theorem: if 𝐰=⟨𝑎1,…,𝑎𝑛⟩ then both sides equal 𝑎12+…+𝑎𝑛2.

Let 𝐶 denote the origin, and let 𝐴 and 𝐵 denote the endpoints of 𝐮 and 𝐯 when we draw them as arrows emanating from the origin. Hence 𝐯−𝐮 is a vector pointing from 𝐴 to 𝐵.

Figure 19: We use the law of cosines on triangle 𝐴𝐵𝐶 together with three applications of Equation 1 to show the geometric definition of dot product.

We now use Equation 1 three times as follows:

𝐴𝐵2=(𝐯−𝐮)(𝐯−𝐮)=𝐯⋅𝐯+𝐮⋅𝐮−2𝐮⋅𝐯=𝐶𝐴2+𝐶𝐵2−2𝐮⋅𝐯.

However, the law of cosines on triangle 𝐴𝐵𝐶 also tells us that

𝐴𝐵2=𝐶𝐴2+𝐶𝐵2−2(𝐶𝐴)(𝐶𝐵)cos𝜃

where 𝜃 is the angle between 𝐮 and 𝐯. Setting the two equations for 𝐴𝐵2 equal gives

𝐮⋅𝐯=(𝐶𝐴)(𝐶𝐵)cos𝜃.

As |𝐮|=𝐶𝐴 and |𝐯|=𝐶𝐵, the proof is complete.

§20.2 Deriving the algebraic definition of dot product from the geometric one

The proof in Section 20.1 might seem magical. Indeed, it’s so short because it’s cheating in some way: it starts with the algebraic definition. But if you’ve never seen the dot product before, that algebraic definition is unnatural; you wouldn’t have any idea to write the expression 𝑎1𝑏1+…+𝑎𝑛𝑏𝑛. So in this section we give a proof that starts from the geometric formula and shows how you would come up with 𝑎1𝑏1+…+𝑎𝑛𝑏𝑛.

So this time our convention is flipped from Section 20.1: in what follows, our notation 𝐮⋅𝐯 will always refer to the geometric definition; that is 𝐮⋅𝐯≔|𝐮||𝐯|cos𝜃. And our goal is to show that it matches the algebraic definition.

We will assume that |𝐮|=1 (i.e. 𝐮 is a unit vector) so that 𝐮⋅𝐯 is the length of the projection of 𝐯 onto 𝐮. This is OK to assume because in the general case one just scales everything by |𝐮|.

§20.2.1 Easy special case

As a warmup, try to show that if 𝐮=(𝑎𝑏) is any vector, then 𝐮⋅𝐞1=𝑎. (This is easy. The projection of 𝐮 onto 𝐞1 is literally 𝑎.)

§20.2.2 Main proof

For concreteness, specialize to ℝ2 and consider 𝐮⋅𝐯 where 𝐮=(𝑎𝑏) is a unit vector (i.e. 𝐮=1), and 𝐯=(𝑥𝑦) is any vector in ℝ2. Then we want to show that the projection of 𝐯 onto 𝐮 has length 𝑥𝑎+𝑦𝑏. See Figure 20.

Figure 20: Proof that the dot product is given by the projection

The basic idea is to decompose 𝐯=𝑥𝐞1+𝑦𝐞2. The length of projection of 𝐯 onto 𝐮 can be decomposed then into the lengths of projections of 𝑥𝐞1 and 𝑦𝐞2. (To see this, tilt your head so the green line is horizontal; recall that the black quadrilateral is a rectangle, hence also a parallelogram). In other words,

𝐮⋅𝐯=𝐮⋅(𝑥𝐞1+𝑦𝐞2)=𝑥(𝐮⋅𝐞1)+𝑦(𝐮⋅𝐞2).

But we already did the special cases before:

𝐮⋅𝐞1=𝑎𝐮⋅𝐞2=𝑏.

Hence, we get the right-hand side is

𝐮⋅𝐯=𝑥𝑎+𝑦𝑏,

as advertised. In summary, by using the black parallelogram, we were able to split 𝐮⋅𝐯 into two easy cases we already know how to do.

The same idea will work in ℝ3 if you use 𝐯=𝑥𝐞1+𝑦𝐞2+𝑧𝐞3 instead, and replace the parallelogram with a parallelepiped, in which case one now has 3 easy cases. And so on in 𝑛 dimensions.