School of Mathematics and Statistics, The University of Sydney
 9. The scalar product
Main menu Section menu   Previous section Next section The scalar product in terms of components Algebraic rules
Glossary
Examples
Quiz

Proof of the formula

Page 3 of 6 

If one (or both) vectors are zero vectors then the above formula is obvious. Hence assume that u and v are non-zero.

The vectors u, v and u - v then form a triangle.

   v     h               u - v u

The edges of the above triangles have length |u|, |v| and |u - v|. By the law of cosines (see below)

|u - v |2 = |u|2 + |v |2 - 2|u||v|cosh

By definition u · v = |u||v| cos h, so

|u - v|2 = |u|2 + |v|2- 2u · v.
(1)

By the formula for the magnitude of a vector

|u - v |2 = (u  - v )2 + (u  - v )2 + (u  - v )2              1    1       2    2      3    3

Multiplying the right hand side out we get

|u -  v|2 = u2-  2u v +  v2+ u2 - 2u  v + v2 + u2 - 2u  v + v2             12    21 1 2  1  2 2  2  2 22    2    3     3 3   3        =  (u1 + u 2 + u 3) + (v1 + v2 + v3)- 2(u1v1 + u2v2 + u3v3)                                   =  |u |2 + |v|2- 2(u1v1 + u2v2 + u3v3)

If we substitute the above into (1 ) we get

   2     2                                 2      2     2 |u | + |v| -  2(u1v1 + u2v2 + u3v3) = |u - v | = |u| + |v | - 2u · v,

so u · v = u1v1 + u2v2 + u3v3 as claimed.

Appendix: The law of cosines

The law of cosines asserts that in an arbitrary triangle a2 = b2 + c2 - 2bc cos h, where a, b, c and h are as shown below.

                        C                b                 a                          h            h  A                 c    D            B

The formula follows by applying the Theorem of Pythagoras to the triangles ADC and DBC. Note that the red line AD has length |b cos h| and the green line DB has length c - b cos h. Hence by the Theorem of Pythagoras

 2         2     2    2              2 b - |bcos h| = h  =  a - (c - bcos h) .

Multiplying the right hand side out we get

b2 - b2cos2h = a2 - c2 + 2bccos h-  b2cos2h.

Adding b2 cos 2h and rearranging we get a2 = b2 + c2 - 2bc cos h as required.

Feedback
Main menu Section menu   Previous section Next section The scalar product in terms of components Algebraic rules