# Why is cosine used in the definition of the dot product

## Recommended Posts

When defining the dot product, the cosine of the angle between two vectors is chosen. Why not the sine?

What advantages are there by choosing the cosine?

##### Share on other sites
When defining the dot product, the cosine of the angle between two vectors is chosen. Why not the sine?

•
• First and foremost, the cosine is not used in the definition of the dot product. For vectors in a Cartesian space, the dot product is defined as

$\mathbf a \cdot \mathbf b = \sum_i a_i b_i$

That this is equal to $||\mathbf a||\,||\mathbf b||\,\cos\theta$ is a consequence of the definition.

• The generalization of the dot product is the inner product. Inner products can be defined for spaces where the concept of angle doesn't really make sense other than tautologically via

$\cos\theta \equiv \frac{\mathbf a \cdot \mathbf b}{||\mathbf a||\,||\mathbf b||}$

• The inner product between a vector and itself, $(\mathbf a,\mathbf a)$, must only be zero if $\mathbf a$ is the zero vector. Defining the dot product in terms of sine would violate this fundamental precept. The result might be a scalar, but it would not be an inner product.

• Lack of a clear-cut meaning. What is the sign (not sine) of the angle $\theta$? Since $\cos\theta = \cos(-\theta)$, that the sign of the angle is a bit ambiguous doesn't really matter if the dot product is defined in terms of $\cos\theta$. It obviously makes a big difference if the inner product was defined in terms of $\sin\theta$.

• For vectors in three-space there already is a product that depends on the sine of the angle between the vectors. This is the cross product.

• Finally, there is a matter of utility. A scalar product that depends on the cosine of the angle of the angle between the vectors turns out to have a lot more utility than one based on the sine of the angle. The cross product only makes sense in three-space and seven-space. The dot product makes sense in any space.

##### Share on other sites

Alot of good arguments.

A comment the cross product "making sense". The cross product only exists in those dimension because it is required to be perpendicular to both the vectors that are crossed. Right?

##### Share on other sites
A comment the cross product "making sense". The cross product only exists in those dimension because it is required to be perpendicular to both the vectors that are crossed. Right?

No. Note that I said $\mathbb R^3$ and $\mathbb R^7$ -- but not $\mathbb R^4$ (or anything but 3 and 7).

The dot and cross product are but two of many products that can be defined with respect to vectors. One generalization of the cross product is the wedge product. However, the wedge product of two vectors is not a vector. It is a bivector. The cross product is rather unique; it is the only product where the result is also a vector, and a vector that is a member of the same space that contains the multiplicands.

The cross product can only be defined for $\mathbb R^3$ and $\mathbb R^7$. What's so special about 3 and 7? The answer is that 3=4-1 and 7=8-1.

"Okay, smartass. What's so special about 4 and 8?" The answer is the quaternions and the octonions.

One way to represent quaternions is that a quaternion, like a complex number, comprises a real and imaginary part. Unlike complex numbers, the imaginary part of a quaternion is a three vector. The product of two quaternions can be expressed using the dot and cross product. Given two quaternions $\mathcal Q_1$ and $\mathcal Q_2$,

$\mathcal Q_1 = (q_{1,r}\,,\, \mathbf q_{1,v})$

$\mathcal Q_2 = (q_{2,r}\,,\, \mathbf q_{2,v})$

The product of these quaternions can be expressed as

$\mathcal Q_1\,\mathcal Q_2 = (q_{1,r}q_{2,r}-\mathbf q_{1,v}\cdot\mathbf q_{2,v}\,,\, q_{1,r}\mathbf q_{2,v} + q_{2,r}\mathbf q_{1,v} + \mathbf q_{1,v}\times\mathbf q_{2,v}$

What if those two quaternions are pure imaginary quaternions: $q_{1,r} = q_{2,r} = 0$? The above reduces to

$\mathcal Q_1\,\mathcal Q_2 = (-\mathbf q_{1,v}\cdot\mathbf q_{2,v}\,,\, \mathbf q_{1,v}\times\mathbf q_{2,v})$

In other words, the quaternion product of two pure imaginary quaternion comprises real and imaginary parts that are respectively equal to the dot product (negated) and the cross product of the imaginary parts of those two quaternions.

What goes around comes around. The dot product and cross product for three vectors can be expressed in terms of the quaternion product. In fact, this is one of the two independent paths by which our modern view of vectors arose. (Aside: If you read Thomas Pynchon, the war between the quaternionists and vectorialists plays a part in his novel "Against the Day.")

The question is, can this concept be extended to higher dimensions? The answer is yes: To $\mathbb R^7$. First though, an aside on these different algebras. The complex numbers can be viewed as an extension of the reals, the quaternions as an extension of the complex numbers, and so on. Each step up the chain doubles the dimensionality. The reals are one dimensional, the complex numbers are two dimensional, the quaternions four dimensional, and so on. Each step adds something (e.g., with the complex numbers you can now solve equations like $x^2+1=0$) but also takes something away. The reals can be sorted; the complex numbers cannot. The reals and complex numbers are commutative ($ab=ba$); the quaternions are not.

The next step up the chain after the quaternions are the octonions. These are 8 dimensional things. As mentioned before, something is lost with each step up the chain. What is lost with the octonions is that they are no longer associative: $(ab)c \ne a(bc)$ in general for the octonions. This is not a big enough loss to preclude the construction of a cross product for $\mathbb R^7$.

How about higher dimensions? Nope. octonions are still alternative: $a(ab) = (aa)b$. The next step up after the octonions, the sedonions, are not alternative. It turns out that alternativity is an essential property for defining the cross product in the manner first used by Gibbs, Wilson, and Heaviside. The cross product is unique to $\mathbb R^3$ and $\mathbb R^7$.

Edited by D H
##### Share on other sites

Interesting stuff!

A few questions.

What are "r" and "v" supposed to indicate in the quaternions?

I will repeat; "Okay, smartass. What's so special about 4 and 8?". I fail to see the connection between the 4 and 8 and the 3 and 7.

##### Share on other sites
A few questions.

What are "r" and "v" supposed to indicate in the quaternions?

First, the complex numbers: They have a scalar real part and a scalar imaginary part. One way to represent quaternions is that they too have real and imaginary parts. The real part is still a scalar but the imaginary part is now a 3-vector. The "r" designates the (scalar) real part of a quaternion while the "v" represents the designates the vectorial (imaginary) part of the quaternion. To be consistent I should have used "s" to designate the scalar (real) part.

The octonions are similar. They can be represented as having a scalar real part and an imaginary part that is a 7-vector.

I will repeat; "Okay, smartass. What's so special about 4 and 8?".

The quaternions and the octonions are respectively 4 and 8 dimensional thingies.

I fail to see the connection between the 4 and 8 and the 3 and 7.

Snarky response: 3=4-1, and 7=8-1. Not so snarky, 3 is the dimensionality of the imaginary part of a quaternion while 7 is the dimensionality of the imaginary part of an octonion.

##### Share on other sites

You can also think of it in terms of Hurwitz's theorem. As DH has noted bilinear multiplication on $V \oplus R$ is important ($V$ is the Euclidean vector space under question ). I forget any details, (see DH's post) but the existence of the cross product is equivalent to the bilinear multiplication forming a normed division algebra over $R$.

Hurwitz's theorem states that (up to isomorphisms) the only normed division algebras are the real numbers, the complex numbers, the quaternions and the octonions.

So there exists a cross product in 0, 1, 3, 7 dimensions. The first two are trivial.

##### Share on other sites

Okay, so v and r are just to clarify the parts (although you already bolded the vectors).

As I understand your snarky response (through your not so snarky) is that the cross product "naturally" arises in the quaternions "imaginary" part from the definition of quaternions. the Tesponse 4=3-1 is due to q-nions are 4-dimensional, and the cross product only occurs in three of those?

Thanks for the insight. I will have a readup on quaternions. It looks interesting.

##### Share on other sites

I think you missed a key point. I said "What goes around comes around. The dot product and cross product for three vectors can be expressed in terms of the quaternion product."

I showed how the quaternion product can be expressed in terms of the dot product and cross product. That is, as is much of math and physics, an after the fact presentation. What happened in history was that the quaternion product was defined first; i.e. without using the dot and cross product. Gibbs & Heaviside developed our modern vector mathematics as an offshoot of the Hamilton's quaternions. In particular, they showed how to first define the dot product and cross product in terms of the quaternion product. Only then did they show how to do it without the quaternion stuff.

BTW, there are still a few vestiges of the quaternion heritage in our vector notation. Sometimes you will see the unit vectors designated as $\hat x$, $\hat y$, and $\hat z$, but other times as $\hat i$, $\hat j$, and $\hat k$. The x,y,z hat stuff makes sense, but where does that i,j,k stuff come from. The answer to that is some graffiti Hamilton drew on a bridge in Dublin: $i^2=j^2=k^2=ijk=-1$ His i, j, and k represented the three different imaginary units (c.f. i in the complex numbers). His i, j, and k became $\hat i$, $\hat j$, and $\hat k$ in the initial development of vector analysis.

##### Share on other sites
When defining the dot product, the cosine of the angle between two vectors is chosen. Why not the sine?

What advantages are there by choosing the cosine?

hobz ,i wonder why you don't look for an explanation in WIKIPEDIA ,the explanation there is excellent.

Vector dot product is very common concept and the WEB is full of it

##### Share on other sites
I think you missed a key point. I said "What goes around comes around. The dot product and cross product for three vectors can be expressed in terms of the quaternion product."

I showed how the quaternion product can be expressed in terms of the dot product and cross product. That is, as is much of math and physics, an after the fact presentation. What happened in history was that the quaternion product was defined first; i.e. without using the dot and cross product. Gibbs & Heaviside developed our modern vector mathematics as an offshoot of the Hamilton's quaternions. In particular, they showed how to first define the dot product and cross product in terms of the quaternion product. Only then did they show how to do it without the quaternion stuff.

BTW, there are still a few vestiges of the quaternion heritage in our vector notation. Sometimes you will see the unit vectors designated as $\hat x$, $\hat y$, and $\hat z$, but other times as $\hat i$, $\hat j$, and $\hat k$. The x,y,z hat stuff makes sense, but where does that i,j,k stuff come from. The answer to that is some graffiti Hamilton drew on a bridge in Dublin: $i^2=j^2=k^2=ijk=-1$ His i, j, and k represented the three different imaginary units (c.f. i in the complex numbers). His i, j, and k became $\hat i$, $\hat j$, and $\hat k$ in the initial development of vector analysis.

Very interesting. So the quaternion came first.

Can you recommend some reading on the history of this, and perhaps math in general? It helps quite a deal to know the chronology and history behind.

Merged post follows:

Consecutive posts merged
hobz ,i wonder why you don't look for an explanation in WIKIPEDIA ,the explanation there is excellent.

Vector dot product is very common concept and the WEB is full of it

I have. The explanation from Wikipedia is more a general introduction, where as I am seeking a more intuitive way of thinking about the dot product. For instance, from the definition (given at wikipedia) all else follows which in turn is the motivation for the definition. Sort of a chicken-egg to me. I enjoyed DH's historically based answer, which had a beginning and en end.

I came across this, when I tried to arrive at the definition of the dot product, from the geometrical point of view (area of parallelograms).

Here is occured to me, that what the dot product is normally used for (at least to my knowledge) it could just as easily be defined as the sine.

So if $\vec{a}\cdot\vec{b} =|\vec{a}||\vec{b}| \sin \theta$

then $\vec{a} \perp \vec{b} \Rightarrow \vec{a}\cdot\vec{b} =|\vec{a}||\vec{b}|$

However, as DH pointed out, there are some disadvantages with this.

##### Share on other sites
When defining the dot product, the cosine of the angle between two vectors is chosen. Why not the sine?

What advantages are there by choosing the cosine?

Because to project a vector on another, you need to take into account how similar they point, rather than how perpendicular.

##### Share on other sites
Very interesting. So the quaternion came first.

Kinda, sorta. Talk to a mathematician and they might well bring up the work of Grassmann. Grassmann's work might well led to the development of modern vector analysis, except it didn't. Grassmann was more or less a contemporary with Hamilton, and the path to modern vector analysis was clearly an offshoot of Hamilton's quaternions. Grassmann's work was folded back in after the fact.

A lot of mathematics and science works this way. The pretty picture we have now is not what was initially developed. The development of that pretty package took time, smoothing of some rough edges, and smoothing of some rather rough egos. Physics teachers do teach those rough edges to some extent. For example, understanding the fumblings of the early quantum physicists truly does helps students of physics. For many arenas, however, those initial (mis)steps are a distraction at best. The rough edges of mathematics are, well, rough edges.

Can you recommend some reading on the history of this, and perhaps math in general? It helps quite a deal to know the chronology and history behind.

The best of the bunch (a Reader's Digest version of the author's book on the topic):

http://www.math.ucdavis.edu/~temple/MAT21D/SUPPLEMENTARY-ARTICLES/Crowe_History-of-Vectors.pdf

A bit shorter:

http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html

A *lot* longer:

An alternate history (no mention of Gibbs and Heaviside whatsoever; Hamilton barely deserves a paragraph):

http://www-groups.dcs.st-and.ac.uk/~history/HistTopics/Abstract_linear_spaces.html

##### Share on other sites

Great stuff!

Why is it necessary for the quaternions to have the real part, and later set to zero? Why not just have the three imaginary axis?

Merged post follows:

Consecutive posts merged

Ahhh.. since Q1*Q2=Q3 should apply and because the product of the two produce a real part, which has no place to be in a "triternion", you need the real part.

## Create an account

Register a new account