67
$\begingroup$

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.

$\endgroup$
3
  • 1
    $\begingroup$ 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... $\endgroup$
    – Zhen Lin
    Sep 6, 2011 at 15:34
  • 2
    $\begingroup$ Related... $\endgroup$ Sep 6, 2011 at 15:38
  • $\begingroup$ 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... $\endgroup$
    – gman
    Feb 25, 2019 at 12:17

6 Answers 6

58
$\begingroup$

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!

$\endgroup$
15
$\begingroup$

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 i$, $\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.ㅤㅤㅤㅤ

$\endgroup$
1
  • 1
    $\begingroup$ Yes! Thank you! I was growing more and more astonished reading through the answers that this was not mentioned! $\endgroup$
    – Vincent
    Jan 16, 2018 at 9:48
11
$\begingroup$

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:

History

In $1773$, Joseph-Louis Lagrange introduced the component form of both the dot and cross products in order to study the tetrahedron in three dimensions.$^{[23]}$ In $1843$, William Rowan Hamilton introduced the quaternion product, and with it the terms "vector" and "scalar". Given two quaternions $[0,{\bf u}]$ and $[0,{\bf v}]$, where ${\bf u}$ and ${\bf v}$ are vectors in ${\bf R^3}$, their quaternion product can be summarized as $[−{\bf u}\cdot{\bf v},{\bf u}\times{\bf v}]$. James Clerk Maxwell used Hamilton's quaternion tools to develop his famous electromagnetism equations, and for this and other reasons quaternions for a time were an essential part of physics education.

In $1878$ William Kingdon Clifford published his Elements of Dynamic which was an advanced text for its time. He defined the product of two vectors$^{[24]}$ to have magnitude equal to the area of the parallelogram of which they are two sides, and direction perpendicular to their plane.

Oliver Heaviside and Josiah Willard Gibbs also felt that quaternion methods were too cumbersome, often requiring the scalar or vector part of a result to be extracted. Thus, about forty years after the quaternion product, the dot product and cross product were introduced — to heated opposition. Pivotal to (eventual) acceptance was the efficiency of the new approach, allowing Heaviside to reduce the equations of electromagnetism from Maxwell's original $20$ to the four commonly seen today.$^{[25]}$

Largely independent of this development, and largely unappreciated at the time, Hermann Grassmann created a geometric algebra not tied to dimension two or three, with the exterior product playing a central role. In $1853$ Augustin-Louis Cauchy, a contemporary of Grassmann, published a paper on algebraic keys which were used to solve equations and had the same multiplication properties as the cross product.$^{[26]}$$^{[27]}$ Clifford combined the algebras of Hamilton and Grassmann to produce Clifford algebra, where in the case of three-dimensional vectors the bivector produced from two vectors dualizes to a vector, thus reproducing the cross product.

The cross notation and the name "cross product" began with Gibbs. Originally they appeared in privately published notes for his students in $1881$ as Elements of Vector Analysis. The utility for mechanics was noted by Aleksandr Kotelnikov. Gibbs's notation and the name "cross product" later reached a wide audience through Vector Analysis, a textbook by Edwin Bidwell Wilson, a former student. Wilson rearranged material from Gibbs's lectures, together with material from publications by Heaviside, Föpps, and Hamilton. He divided vector analysis into three parts:

First, that which concerns addition and the scalar and vector products of vectors. Second, that which concerns the differential and integral calculus in its relations to scalar and vector functions. Third, that which contains the theory of the linear vector function.

Two main kinds of vector multiplications were defined, and they were called as follows:

  • The direct, scalar, or dot product of two vectors
  • The skew, vector, or cross product of two vectors

Several kinds of triple products and products of more than three vectors were also examined. The above-mentioned triple product expansion was also included.

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

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.

$\endgroup$
6
  • 3
    $\begingroup$ Historically, the applications in electromagnetism were the most influential in getting vector algebra accepted. $\endgroup$ Sep 6, 2011 at 16:31
  • 4
    $\begingroup$ Yeah, since Maxwell's equations didn't look too well when couched in quaternion form. :) $\endgroup$ Sep 6, 2011 at 16:34
  • $\begingroup$ @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. $\endgroup$
    – justin
    Nov 27, 2015 at 8:28
  • $\begingroup$ @justin : I've added an example from geometry. ${}\qquad{}$ $\endgroup$ Nov 27, 2015 at 19:00
  • $\begingroup$ @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? $\endgroup$
    – justin
    Nov 30, 2015 at 7:24
5
$\begingroup$

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

$\endgroup$
5
$\begingroup$

It is Sir William R. Hamilton who originally touched upon the concept. Near the end of his letter to John T. Graves about his recent discovery of quaternions in the same year (1843), he writes the following:

Multiplication will be easy if we are familiar with the rules for the product of two pure imaginaries. This product is, by (B.),

$$(0, b, c, d)(0, b′, c′, d′) = (−bb′ − cc′ − dd′, cd′ − dc′, db′ − bd′, bc′ − cb′);$$

the product-line is perpendicular to the plane of the factors; its length is the product of their lengths multiplied by the sine of the angle between them: and the real part of the product, with its sign changed, is the same product of the lengths of the factors multiplied by the cosine of their inclination.

In essence, he recognized that (using modern notation for quaternions):

$$(0, \vec{v})(0, \vec{w}) = (-\Vert \vec{v} \Vert \Vert \vec{w} \Vert \cos(\theta), \Vert \vec{v} \Vert \Vert \vec{w} \Vert \sin(\theta) \vec{k})$$

where $\theta$ is the angle between $\vec{v}$ and $\vec{w}$, and $\vec{k}$ is perpendicular to $\vec{v}$ and $\vec{w}$.

This discovery precedes Gibbs and Heaviside, who were born in 1839 and 1850 respectively.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .