# History of dot product and cosine

The fact that the dot product and the cosine of the angle between two vectors are mutually computable is easy to show (see the two sides in the two answers at Dot product in coordinates).

But looking at the dot product, I would never have thought that it somehow captures something about the angle (and vice versa).

How did the connection get discovered? Who were the major players? Did it just fall out of the development of matrix operations for linear algebra (or did the dot product come first) or are these only related by hindsight or what?

-
Very nice question! I'm eager to learn the answer. Hope, somebody can come up with an idea. – Torbjoern Apr 27 '11 at 16:10

3
– J. M. Apr 27 '11 at 16:12

6
I don't know the answer, but addressing the "I would never have thought..." part: If you look at the length of $\vec v-\vec w$ in terms of the dot product and distribute, you get $\|\vec v-\vec w\|^2 = \|\vec v\|^2 + \|\vec w\|^2 - 2\vec v\cdot\vec w$. This is reminiscent of the Law of Cosines. If you look at the triangle with lengths $\|v\|$, $\|w\|$, and $\|v-w\|$ and apply the Law of Cosines with the angle between $v$ and $w$, all the squared lengths cancel right away to give the result. To me it seems natural enough that you or I could have "discovered" it (after the fact). – Jonas Meyer Apr 27 '11 at 18:36
@Jonas: that sounds 'answerish' (actually, the easiest derivation of the dot-product/cosine connection is through the law of cosines. – Mitch Apr 27 '11 at 18:54

1
i think you need the cauchy-schwarz-bunyakowsky inequality $|u.v| \le |u||v|.$ so that $u.v$ can be written as $|u||v|\cos (\theta)$ for some $\theta.$ that this $\theta$ is the angle between the vectors $u,v$ in $R^n$ is fortunate? – abel Apr 27 '11 at 20:19
show 1 more comment

## 2 Answers

I suspect that J.M. is right: historically, quaternions came before vectors. But before the quaternions you had complex numbers.

For two complex numbers $z$ and $w$, the fact that $\text{Re}(\overline{z} w) = |z| |w| \cos \theta$, where $\theta$ is the angle between them measured at the origin, is clear from the polar representation. Write this out in terms of the real and imaginary parts of $z$ and $w$ and you have the two-dimensional version of your relationship.

Hamilton, of course, knew all of this, and a main motivation behind his development of the algebra of quaternions was to get a way to study three-dimensional space analogous to the use of complex numbers to study two-dimensional space. If $P = a i + b j + c k$ and $Q = d i + e j + f k$ are quaternions representing what we would call "vectors", the real part of the quaternion $\overline{P} Q = (-ai-bj-ck)(di+ej+fk)$ is $ad + be + cf$, and this should be (and is) $|P| |Q| \cos \theta$.

Gibbs et al dispensed with the quaternion framework and wrote this as the "dot product" of the two vectors $(a,b,c)$ and $(d,e,f)$.

-

The dot product as an explicit algebraic operation is not so necessary to the 'dischord of appearances', it is the $a d + b e + c f$ a decidedly open calculation in comparison to the obscurantist length of a vector and angle formula (requiring much more machinery). Any idea if this (what Hamilton knew) was popular before Gibbs? – Mitch Apr 25 '12 at 19:25

Looking at mathword under D you'll find:

DOT PRODUCT is found in 1901 in Vector Analysis by J. Willard Gibbs and Edwin Bidwell Wilson:

The direct product is denoted by writing the two vectors with a dot between them as

A·B

This is read A dot B and therefore may often be called the dot product instead of the direct product.

[This citation was provided by Joanne M. Despres of Merriam-Webster Inc.]

If you get a hold of a copy I'm sure they'll have a good discussion on the matter. Gibbs was the big proponent of vectors and I'm willing to bet he'd have discussed the connection between the two. That'd probably be a good starting point to tracking down an answer to your question.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 28, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.956513524055481, "perplexity_flag": "middle"}