# Origin of the dot and cross product?

Most questions usually just relate to what these can be used for, that's fairly obvious to me since I've been programming 3D games/simulations for a while, but I've never really understood the inner workings of them... I could get the cross product equation as a determinant of a carefully-constructed matrix,

but what I want to ask is... How did the dot and cross product come to be? When were they "invented"? Some detailed proofs? Did someone say: "Hey, wouldn't it be nice if we could construct a way to calculate a vector that is perpendicular to two given operands?"

Basically, how/why do they work?

I would appreciate explanations, links to other explanations, other web resources... I've been searching the Internet lately for explanations, but most of them are on how to use it and nothing that really gives substance to it.

• I'm very tempted to say that they came out of quaternion analysis, but Grassmann's work on exterior algebra was also from the same era. But I'm sure someone will give a detailed answer soon enough... – Zhen Lin Sep 6 '11 at 15:34
• Related... – J. M. is a poor mathematician Sep 6 '11 at 15:38
• I thought this was going to answer why it's called "dot" and "cross". Like 127 dot 0 dot 0 dot 1 there is actually a dot . between the numbers. Why is called a "dot" product. Like the square of something is actually about squares etc... – gman Feb 25 at 12:17

A little bit more of the 'how and why': the dot product comes about as a natural answer to the question: 'what functions do we have that take two vectors and produce a number?' Keep in mind that we have a natural additive function (vector or componentwise addition) that takes two vectors and produces another vector, and another natural multiplicative function (scalar multiplication) that takes a vector and a number and produces a vector. (We might also want another function that takes two vectors and produces another vector, something more multiplicative than additive — but hold that thought!) For now we'll call this function $D$, and specifically use the notation $D({\bf v},{\bf w})$ for it as a function of the two vectors ${\bf v}$ and ${\bf w}$.

So what kind of properties would we want this hypothetical function to have? Well, it seems natural to start by not distinguishing the two things it's operating on; let's make $D$ symmetric, with $D({\bf v},{\bf w})=D({\bf w},{\bf v})$. Since we have convenient addition and multiplication functions it would be nice if it 'played nice' with them. Specifically, we'd love it to respect our addition for each variable, so that $D({\bf v}_1+{\bf v}_2,{\bf w}) = D({\bf v}_1,{\bf w})+D({\bf v}_2,{\bf w})$ and $D({\bf v},{\bf w}_1+{\bf w}_2) = D({\bf v},{\bf w}_1)+D({\bf v},{\bf w}_2)$; and we'd like it to commute with scalar multiplication similarly, so that $D(a{\bf v}, {\bf w}) = aD({\bf v}, {\bf w})$ and $D({\bf v}, a{\bf w}) = aD({\bf v}, {\bf w})$ — these two conditions together are called linearity (more accurately, 'bilinearity': it's linear in each of its arguments). What's more, we may have some 'natural' basis for our vectors (for instance, 'North/East/up', at least locally), but we'd rather it weren't tied to any particular basis; $D({\bf v},{\bf w})$ shouldn't depend on what basis ${\bf v}$ and ${\bf w}$ are expressed in (it should be rotationally invariant). Furthermore, since any multiple of our function $D$ will satisfy the same equations as $D$ itself, we may as well choose a normalization of $D$. Since $D(a{\bf v},a{\bf v}) = aD({\bf v},a{\bf v}) = a^2D({\bf v},{\bf v})$ it seems that $D$ should have dimensions of (length$^2$), so let's go ahead and set $D({\bf v},{\bf v})$ equal to the squared length of ${\bf v}$, $|{\bf v}|^2$ (or equivalently, set $D({\bf v},{\bf v})$ to $1$ for any unit vector ${\bf v}$; since we chose $D$ to be basis-invariant, any unit vector is as good as any other).

But these properties are enough to define the dot product! Since \begin{align} |{\bf v}+{\bf w}|^2 &= D({\bf v}+{\bf w},{\bf v}+{\bf w}) \\ &= D({\bf v}+{\bf w},{\bf v})+D({\bf v}+{\bf w},{\bf w}) \\ &= D({\bf v},{\bf v})+D({\bf w},{\bf v})+D({\bf v},{\bf w})+D({\bf w},{\bf w})\\ &= D({\bf v},{\bf v})+2D({\bf v},{\bf w})+D({\bf w},{\bf w}) \\ &= |{\bf v}|^2+|{\bf w}|^2+2D({\bf v},{\bf w}) \end{align} then we can simply set $D({\bf v},{\bf w}) = {1\over2} \bigl(|{\bf v}+{\bf w}|^2-|{\bf v}|^2-|{\bf w}|^2\bigr)$. A little arithmetic should convince you that this gives the usual formula for the dot product.

While the specific properties for the cross product aren't precisely the same, the core concept is: it's the only function that satisfies a fairly natural set of conditions. But there's one broad catch with the cross-product — two, actually, though they're related. One is that the fact that the cross product takes two vectors and produces a third is an artifact of $3$-dimensional space; in general the operation that the cross-product represents (orthogonality) can be formalized in $n$ dimensions either as a function from $(n-1)$ vectors to a single result or as a function from $2$ vectors that produces a 2-form, essentially a $n(n-1)/2$-dimensional object; coincidentally when $n=3$ this means that the cross-product has the 'vector$\times$vector$\rightarrow$vector' nature that we were looking for. (Note that in $2$ dimensions the natural 'orthogonality' operation is essentially a function from one vector to one vector — it takes the vector $(x,y)$ to the vector $(y,-x)$!) The other catch is lurking in the description of the cross product as a 2-form; it turns out that this isn't quite the same thing as a vector! Instead it's essentially a covector - that is, a linear function from vectors to numbers (note that if you 'curry' the dot-product function $D$ above and consider the function $D_{\bf w}$ such that $D_{\bf w}({\bf v}) = D({\bf v},{\bf w})$, then the resulting object $D_{\bf w}$ is a covector). For most purposes we can treat covectors as just vectors, but not uniformly; the most important consequence of this is one that computer graphics developers have long been familiar with: normals don't transform the same way vectors do! In other words, if we have ${\bf u} = {\bf v}\times{\bf w}$, then for a transform $Q$ it's not (necessarily) the case that the cross product of transformed vectors $(Q{\bf v})\times(Q{\bf w})$ is the transformed result $Q{\bf u}$; instead it's the result ${\bf u}$ transformed by the so-called adjoint of $Q$ (roughly, the inverse of $Q$, with a few caveats). For more background on the details of this, I'd suggest looking into exterior algebra, geometric algebra, and in general the theory of linear forms.

ADDED: Having spent some more time thinking about this over lunch, I think the most natural approach to understanding where the cross product 'comes from' is through the so-called volume form: a function $V({\bf u}, {\bf v}, {\bf w})$ from three vectors to a number that returns the (signed) volume of the rhomboid spanned by ${\bf u}$, ${\bf v}$, and ${\bf w}$. (This is also the determinant of the matrix with ${\bf u}$, ${\bf v}$, and ${\bf w}$ as its columns, but that's a whole different story...) Specifically, there are two key facts:

1. Given a basis and given some linear function $f({\bf v})$ from vectors to numbers (remember that linear means that $f({\bf v}+{\bf w}) = f({\bf v})+f({\bf w})$ and $f(a{\bf v}) = af({\bf v})$, we can write down a vector ${\bf u}$ such that $f()$ is the same as the covector $D_{\bf u}$ (that is, we have $f({\bf v}) = D({\bf u}, {\bf v})$ for all ${\bf v}$). To see this, let the basis be $(\vec{e}_{\bf x}, \vec{e}_{\bf y}, \vec{e}_{\bf z})$; now let $u_{\bf x} = f(\vec{e}_{\bf x})$, and similarly for $u_{\bf y}$ and $u_{\bf z}$, and define ${\bf u} = (u_{\bf x},u_{\bf y},u_{\bf z})$ (in the basis we were provided). Obviously $f()$ and $D_{\bf u}$ agree on the three basis vectors, and so by linearity (remember, we explicitly said that $f$ was linear, and $D_{\bf u}$ is linear because the dot product is) they agree everywhere.
2. The volume form $V({\bf u}, {\bf v}, {\bf w})$ is linear in all its arguments - that is, $V({\bf s}+{\bf t}, {\bf v}, {\bf w}) = V({\bf s}, {\bf v}, {\bf w})+V({\bf t}, {\bf v}, {\bf w})$. It's obvious that the form is 'basis-invariant' — it exists regardless of what particular basis is used to write its vector arguments — and fairly obvious that it satisfies the scalar-multiplication property that $V(a{\bf u}, {\bf v}, {\bf w}) = aV({\bf u}, {\bf v}, {\bf w})$ (note that this is why we had to define it as a signed volume - $a$ could be negative!). The linearity under addition is a little bit trickier to see; it's probably easiest to think of the analogous area form $A({\bf v}, {\bf w})$ in two dimensions: imagine stacking the parallelograms spanned by $({\bf u}, {\bf w})$ and $({\bf v}, {\bf w})$ on top of each other to form a sort of chevron, and then moving the triangle formed by ${\bf u}$, ${\bf v}$ and ${\bf u}+{\bf v}$ from one side of the chevron to the other to get the parallelogram $({\bf u}+{\bf v}, {\bf w})$ with the same area. The same concept works in three dimensions by stacking rhomboids, but the fact that the two 'chunks' are the same shape is trickier to see. This linearity, incidentally, explains why the form changes signs when you swap arguments (that is, why $V({\bf u}, {\bf v}, {\bf w}) = -V({\bf v}, {\bf u}, {\bf w})$) : from the definition $V({\bf u}, {\bf u}, {\bf w}) = 0$ for any ${\bf u}$ (it represents the volume of a degenerate 2-dimensional rhomboid spanned by ${\bf u}$ and ${\bf w}$), and using linearity to break down $0 = V({\bf u}+{\bf v}, {\bf u}+{\bf v}, {\bf w})$ shows that $V({\bf u}, {\bf v}, {\bf w}) + V({\bf v}, {\bf u}, {\bf w}) = 0$.

Now, the fact that the volume form $V({\bf u}, {\bf v}, {\bf w})$ is linear means that we can do the same sort of 'currying' that we talked about above and, for any two vectors ${\bf v}$ and ${\bf w}$, consider the function $C_{\bf vw}$ from vectors ${\bf u}$ to numbers defined by $C_{\bf vw}({\bf u}) = V({\bf u}, {\bf v}, {\bf w})$. Since this is a linear function (because $V$ is linear, by point 2), we know that we have some vector ${\bf c}$ such that $C_{\bf vw} = D_{\bf c}$ (by point 1). And finally, we define the cross product of the two vectors ${\bf v}$ and ${\bf w}$ as this 'vector' ${\bf c}$. This explains why the cross product is linear in both of its arguments (because the volume form $V$ was linear in all three of its arguments) and it explains why ${\bf u}\times{\bf v} = -{\bf v}\times{\bf u}$ (because $V$ changes sign on swapping two parameters). It also explains why the cross product isn't exactly a vector: instead it's really the linear function $C_{\bf vw}$ disguising itself as a vector (by the one-to-one correspondence through $D_{\bf c}$). I hope this helps explain things better!

Here are a few references about the history of linear algebra:

"A Brief History of Linear Algebra and Matrix Theory"

"History of Linear Algebra"

Cross Product - Wikipedia: History

The Wikipedia article seems to address your question most directly.

• See also "Earliest Uses of Symbols for Matrices and Vectors": jeff560.tripod.com/matrices.html – Robert Israel Sep 6 '11 at 16:20
• What about "A history of vector analysis" by Crowe? – Curiosity Sep 6 '11 at 16:54
• @Curiosity: sounds good. Here is a link – robjohn Sep 6 '11 at 17:10
• I still love your answer! :D – Curiosity Sep 8 '11 at 18:56
• The first two links are broken. :-( – lhf Nov 6 '14 at 1:29

I don't know the historical details beyond the fact that it must have been in the 19th century, but I know some ways in which the dot product is motivated by physics. Gravity acts in a downward direction, and an object rolls down a slope that is not vertical. How much work is done? Work equals force times distance, but in this case the force is in a particular direction and the displacement is in a particular direction. Work is the dot product of force and displacement.

One thing (certainly far from the only one) that can similarly motivate cross products comes from geometry: the area of a plot of ground is its length times its width, if it's a rectangle. But if two straight sides meet at an angle other than $90^\circ$ and the two opposite sides are parallel to those, then it's one length times the other times the sine of the angle between them, i.e. the magnitude of the cross product. The direction of the cross product tells you the orientation of the plane in which the surface lies, whose area is measured: it's a plane perpendicular to the cross product.

• Historically, the applications in electromagnetism were the most influential in getting vector algebra accepted. – Robert Israel Sep 6 '11 at 16:31
• Yeah, since Maxwell's equations didn't look too well when couched in quaternion form. :) – J. M. is a poor mathematician Sep 6 '11 at 16:34
• @Michael Hardy:That's a good intuitive answer for 'dot product'.Could you give an similar example for 'cross product'.I can't think one example. – justin Nov 27 '15 at 8:28
• @justin : I've added an example from geometry. ${}\qquad{}$ – Michael Hardy Nov 27 '15 at 19:00
• @MichaelHardy:Wow that's great.Could you tell is there any reason why we use the sine angle?Is is because we're applying trigonometric equations? – justin Nov 30 '15 at 7:24

Seems remarkable that no one seems to remember the true origin of the vector and the dot products. The answer is actually hidden in i, j,k notations for the vector. This is the same notation used for quaternions. It happens that Josiah Willard Gibbs did not like the quaternions formalism, which was mostly used in physics at his time and as a result he came up with vector analysis. Recall that quaternions have these properties: $\mathbf i^2=\mathbf j^2=\mathbf k^2=\mathbf i \mathbf j \mathbf k=-1$ and what follows from these identities $\mathbf i \mathbf j =\mathbf k$ , $\mathbf j \mathbf k = \mathbf j$, $\mathbf k \mathbf i = \mathbf j$ (for example, to get $\mathbf i \mathbf j =\mathbf k$ use $\mathbf i \mathbf j \mathbf k=-1$ and multiply by $\mathbf k$ from the right. It is important to keep track from which side you multiply, because quaternion multiplication is not commutative (for example if you take $\mathbf i \mathbf j =\mathbf k$ and multiply both sides by $\mathbf j$ from the right you will get $\mathbf i \mathbf j^2 =- \mathbf i = \mathbf k \mathbf j= - \mathbf j \mathbf k$).

Now take two "vectors" $\mathbf u=u_1 \mathbf i + u_2 \mathbf j + u_3 \mathbf k$ and $\mathbf v=v_1 \mathbf i + v_2 \mathbf j + v_3 \mathbf k$ and multiply them as quaternions. What you will discover is that the answer will break in the real (scalar) part and the imaginary (vector) part. The real part (with the minus sign) will be the scalar (dot) product and the imaginary part will be the vector (cross) product.

• Yes! Thank you! I was growing more and more astonished reading through the answers that this was not mentioned! – Vincent Jan 16 '18 at 9:48

Here is a discussion of the same topic, where one contributor suggests that the cross product is attributed to Josiah Gibbs and Oliver Heaviside.