Friday, December 16, 2011

Derivation of the dot product formula

There is a very famous formula in the field of vectors known as the dot product formula or the scalar product formula. It is used widely to find the angle between two vectors, or to find the length of projection of one vector onto another. This is what the formula looks like:

My aim is to derive this formula from basic geometric principles. I will also be giving you the rationale behind these derivations- that is, the initial ideas that could have occurred to the pioneers of vectors, during the time in which they were inventing these formulas. Here we go.

The rationale for this formula goes as follows. Two vectors a and b exist in the manner shown below. How can I find the angle between these two vectors? (Note: This angle refers to the angle between the vectors such that they are diverging outwards together or converging inwards together.) Is there a function (of the components of the vectors) that exists that could allow me to deduce the angle between the vectors? Now that this logical basis for the derivation is set up, here is how the questions can be answered and how the formula can be derived:

(Note: The actual pioneers may not have done this. I am just providing a logical path for people to follow and to ultimately understand where these formulas came from.)

This is what the vectors would look like visually:

We are interested in finding theta, or some relation to theta. Using the cosine rule, one can deduce the following:

We found the function that determines the angle between the two vectors! Through further manipulation, we arrive at the dot product formula and will also understand how it is defined.

Voila! When I worked this out a couple of months back, I was blown off my feet. I never knew that this formula, which as a student I had to memorize, could actually be derived so beautifully from basic principles.

The beauty of this formula and of vectors in general is that information pertaining to the vectors, such as the angle between two vectors, can be found easily through a process of manipulating and computing a certain set of numbers in a specific manner. That's all. No algebra or complex thinking is required. Nothing novel too. It's just a simple set of rules.

LaTeX code source:


  1. I'm extremely impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the nice quality writing, it is rare to see a nice blog like this one these days.

    Here is my weblog ... how you can help

    1. Hi. Thanks for writing. I'm glad to know that you like my work. This is not a paid theme, it's in fact available under the standard themes offered by blogger. Oh and I can't seem to access your blog for some reason.

      Anyways, good day!

  2. Very nice read! For someone who's been trying to get some sort of intuition as to why vector multiplication is defined the way it is, this is great!

  3. This is very nice indeed...

    Also, be sure to check out this brilliant alternative proof (though along the same vain) on the website below:

    ...It is very similar, but extends the proof to any number of dimensions. The messy algebra that can occur is completely avoided by first proving one or two extremely simple lemmas, reducing the proof to about three steps.

  4. Hi Atreya,
    Nice proof, I was just wondering though does it only work if angle A and angle B are both theta. You have pi-theta for the unknown angle but what would happen if angle A wasn't theta. Would the unknown be pi-theta-A. Also is the total angle between a and b theta or 2 x theta.

  5. Heya, I'm not sure I understand why the other angle is labelled pi-theta, shouldnt it be pi-theta-the_other_interior_angle?

  6. nevermind, i see where i went wrong, sorry for that silly question :D

  7. Why did you write cos(π-x) while proving in very 1st step

    1. As u know the angle between two vector a and b is pi-theta so using expansion ...u get cos(pi-theta)=above relation in first step of prooving