# Dot product as cosine subtraction

2020-01-25T18:04:00

The two principal definitions of the dot product have always seemed incoherent to me. After trying (and failing) to research this many times, a math.stackexchange.com question finally gave an explanation that made sense to me. Here is my interpretation of it — and trust me, if I can understand a mathematical concept, so can you.

The dot product is a fundamental vector operation in mathematics. Graphics programmers are very familiar with it and will tell you everything is a dot product. There is some truth to that statement: mathematics, and geometry/trigonometry in particular, is very self-referential (much like music). Concepts can often be found hidden in surprising ways in what appear to be unrelated areas.

Today's topic is certainly one of them. I've known the dot product for a long time, but never understood how it could have two seemingly disparate definitions. I'd seen purely algebraic proofs, but developing an intuition for the concepts in the formulae always improves my understanding of them. And, as a bonus, once we establish a few definitions (which aren't much more than restatements of the original formula), the connection between the two definitions is very clear.

To review, the dot (or scalar) product of vectors a and b is: The key for the connection is expressing the vectors as angles and the dot product as the subtraction of those angles: let α and β be the angles between the x axis (i.e. i) and a and b respectively. In two dimensions: All that is left is to apply the cosine subtraction formula: 