Chapter 6. The cross product

The cross product is the last major linear algebra tool we’ll need to introduce (together with determinants and the dot product). Like the dot product, the cross product also has two definitions, one algebraic and one geometric.

However, unlike the dot product, the cross product is more stilted and unnatural, and not used as much — in fact it won’t show up again until Chapter 29. (More on that in Section 6.4.) I’ll try to keep this chapter brief.

§6.1 [TEXT] The two definitions of the cross product

This definition is terrible, so bear with me.

Definition

Suppose 𝐯=(𝑎1𝑎2𝑎3) and 𝐰=(𝑏1𝑏2𝑏3) are two vectors in ℝ3.

The algebraic definition of the cross product is:

𝐯×𝐰≔|𝑎2𝑎3𝑏2𝑏3|𝐞1−|𝑎1𝑎3𝑏1𝑏3|𝐞2+|𝑎1𝑎2𝑏1𝑏2|𝐞3=(𝑎2𝑏3−𝑎3𝑏2𝑎3𝑏1−𝑎1𝑏3𝑎1𝑏2−𝑎2𝑏1).

(2)

(See the tip below for a way to remember this formula more easily.)

The geometric definition of the cross product is based on specifying both the direction and magnitude.

  • The magnitude of 𝐯×𝐰 is equal to the area of the parallelogram formed by 𝐯 and 𝐰. In trigonometry terms, if 𝜃 is the included angle, this equals |𝐯||𝐰|sin𝜃.
  • The direction is given by requiring 𝐯×𝐰 to be perpendicular to both 𝐯 and 𝐰, and also satisfying the right-hand rule (we’ll say more about it in a moment).

The geometric definition is illustrated in Figure 13 below.

Figure 13: Illustration of the geometric definition of the cross product.

Like with the dot product, it’s not obvious at all why these definitions are compatible! Equation 2 is probably also really mysterious and seems to come from nowhere. In this case, I think the idea is that you should start with the geometric definition, then grind through some calculation to get a system of equations. If you solve the system of equations, you wind up with Equation 2 as the result. We do this in the next section as an optional sidenote.

Type signature
The cross product only accepts two vectors both in ℝ3. And it outputs a single vector in ℝ3.
Remark: The right-hand rule

The hack with the right-hand rule is necessary because if I tell you only the length of a vector in ℝ3 and that it is normal to two other vectors in ℝ3, there are actually two vectors that work. (For example, there are two vectors of length 5 perpendicular to 𝐞1 and 𝐞2: namely ±5𝐞3.)

So we need to pick one, and the right-hand rule says that if you point your right index finger along 𝐯 and right middle finger along 𝐰 closer to your palm, and stick out your right thumb, then 𝐯×𝐰 points along your thumb.

Another way to describe the right-hand rule is to require the following table to be true:

𝐞1×𝐞2=𝐞3=−𝐞2×𝐞1𝐞2×𝐞3=𝐞1=−𝐞3×𝐞2𝐞3×𝐞1=𝐞2=−𝐞1×𝐞3.

It may not be that easy to remember Equation 2. In practice, I think almost everyone uses the following mnemonic for it.

Tip: How to remember the algebraic cross product definition

The algebraic definition is usually remembered using the following mnemonic:

𝐯×𝐰=|𝐞1𝐞2𝐞3𝑎1𝑎2𝑎3𝑏1𝑏2𝑏3|.

(3)

Mathematically speaking, the right-hand side doesn’t make sense and is a type-error, because one can’t have a matrix where some things in it are numbers and other things in it are vectors. However, if you ignore that and multiply anyway, you’ll get the algebraic definition above.

In these notes I will always use Equation 3 rather than Equation 2 because that’s what people actually do in practice. (I do so quite grudgingly, because Equation 3 is officially a type-error, and in theory it is nonsense. But in the words of Linus Torvalds: “Theory and practice sometimes clash. And when that happens, theory loses. Every single time.”)

Warning: Cross product is anti-commutative

From either definition, you should be able to see that

𝐯×𝐰=−𝐰×𝐯

in contrast to the dot product. Note the minus sign. (The right hand rule means that you can’t swap your index and middle finger.)

Also, note that 𝐯×𝐯=𝟎 (or indeed 𝐯×𝐰=𝟎 whenever 𝐯 and 𝐰 are parallel).

I really want to get this section over with so I’ll just give you one example with numbers and not even talk about the corresponding geometry.

Sample Question
Compute the cross product of 𝐯=(123) and 𝐰=(456).

Solution. Write

𝐯×𝐰≔|𝐞1𝐞2𝐞3123456|=|2356|𝐞1−|1346|𝐞2+|1245|𝐞3=−3𝐞1+6𝐞2−3𝐞3=(−36−3).

□

As a sanity check for the geometry definition, you can verify that indeed this vector is perpendicular to both 𝐯 and 𝐰 using the dot product:

(−36−3)⋅(123)=(−3)(1)+(6)(2)+(−3)(3)=0(−36−3)⋅(456)=(−3)(4)+(6)(5)+(−3)(6)=0.

§6.2 [SIDENOTE] Outline of derivation of the cross product formula

In this sidenote, we outline how the algebraic definition of the cross product can be derived from the geometric one. This proof is too hard to be on an 18.02 exam, but I decided to include it here instead of the appendix because it is actually good practice with using dot products and determinants. For simplicity, I won’t worry at all about division-by-zero issues.

So let’s say we have two given vectors

𝐯=𝑎1𝐞1+𝑎2𝐞2+𝑎3𝐞3𝐰=𝑏1𝐞1+𝑏2𝐞2+𝑏3𝐞3.

Let’s denote the cross product by

𝐯×𝐰=𝑥𝐞1+𝑦𝐞2+𝑧𝐞3.

We need to solve for 𝑥, 𝑦, 𝑧 in terms of 𝑎1, 𝑎2, 𝑎3, 𝑏1, 𝑏2, 𝑏3.

So what are the givens? Well, first we have the requirement that 𝐯×𝐰 should be perpendicular to 𝐯 and 𝐰. So we get two equations from the dot product:

0=𝐯⋅(𝐯×𝐰)=𝑎1𝑥+𝑎2𝑦+𝑎3𝑧0=𝐰⋅(𝐯×𝐰)=𝑏1𝑥+𝑏2𝑦+𝑏3𝑧.

This is a system of two equations in three variables, but it’s good enough to get the ratio 𝑥:𝑦:𝑧. For example, if you multiply the first equation by 𝑏3 and the second by 𝑎3, then subtract, you will get that

0=𝑏3(𝑎1𝑥+𝑎2𝑦)−𝑎3(𝑏1𝑥+𝑏2𝑦)⟹𝑥𝑦=𝑎2𝑏3−𝑎3𝑏2𝑎3𝑏1−𝑎1𝑏3.

In a similar way, you can get the ratio 𝑦𝑧 as

𝑦𝑧=𝑎3𝑏1−𝑎1𝑏3𝑎1𝑏2−𝑎2𝑏1.

Geometrically, this means we’ve already recovered the direction of 𝐯×𝐰. Algebraically, it means we know the ratio 𝑥:𝑦:𝑧; there should be some scalar constant 𝑘 such that

𝑥=𝑘(𝑎2𝑏3−𝑎3𝑏2)𝑦=𝑘(𝑎3𝑏1−𝑎1𝑏3)𝑧=𝑘(𝑎1𝑏2−𝑎2𝑏1).

So all we need to do now is find 𝑘. For brevity, we’ll let

𝑥0≔𝑎2𝑏3−𝑎3𝑏2𝑦0≔𝑎3𝑏1−𝑎1𝑏3𝑧0≔𝑎1𝑏2−𝑎2𝑏1

so 𝑥=𝑘𝑥0, 𝑦=𝑘𝑦0, 𝑧=𝑘𝑧0, and we need to solve for 𝑘.

We have one more condition to use, which is that we want the magnitude 𝑥2+𝑦2+𝑧2 to be equal to the area 𝐴 of the parallelogram spanned by 𝐯 and 𝐰, and also point in the way specified by the right-hand rule. How can we encode that in an equation? At face value, none of the weapons in our toolkit so far let you access the area of a parallelogram in 3D space. We only have a determinant for parallelograms in 2D space.

But here’s a clever trick to get around it. The trick to get the area is to consider the parallelepiped formed by three vectors: the two given vectors 𝐯 and 𝐰 and the unit vector in the direction of 𝐯×𝐰. That is, consider the vector

𝐧=⟨𝑥0,𝑦0,𝑧0⟩𝑥02+𝑦02+𝑧02.

We’ve just seen 𝐧 is perpendicular to both 𝐯 and 𝐰, and we’ve scaled 𝐧 so that |𝐧|=1. See Figure 14.

Figure 14: The additional vector 𝐧 introduced. It’s a unit vector in the direction we want, and it doesn’t depend on 𝑘.

For simplicity let’s assume that 𝐧 points the correct way for the right-hand rule. (If 𝐧 points the other way, the calculation below will need a bunch of extra minus signs; we won’t dwell on it here, again to keep things simple.) So if we consider the parallelepiped formed by 𝐧, 𝐯, 𝐰, its volume will just be the height times the base parallelogram, i.e. it is 1⋅𝐴=𝐴. And the volume of a parallelepiped is something we can access: it’s a 3×3 determinant. So our trick has managed to let us get our hands on 𝐴:

𝐴=|𝑥0𝑥02+𝑦02+𝑧02𝑦0𝑥02+𝑦02+𝑧02𝑧0𝑥02+𝑦02+𝑧02𝑎1𝑎2𝑎3𝑏1𝑏2𝑏3|.

Here, the determinant is indeed +𝐴 (rather than −𝐴) because 𝐧 was assumed to be pointing the correct direction, so the determinant yields a plus sign. This trick of introducing 𝐧 is what lets us get a formula for 𝐴 which would otherwise be inaccessible with only the determinant at face value.

Now we solve for 𝑘. Because we’re in the case that 𝐧 is pointing the right way, we know we should have 𝑘>0. Now we have to set the magnitude of

|𝐯×𝐰|=𝑘𝑥02+𝑦02+𝑧02

equal to 𝐴 above; that is, we get the equation

𝑘𝑥02+𝑦02+𝑧02=𝐴=|𝑥0𝑥02+𝑦02+𝑧02𝑦0𝑥02+𝑦02+𝑧02𝑧0𝑥02+𝑦02+𝑧02𝑎1𝑎2𝑎3𝑏1𝑏2𝑏3|.

Multiplying both sides by 𝑥02+𝑦02+𝑧02 and expanding the determinant gives

𝑘(𝑥02+𝑦02+𝑧02)=𝑥0|𝑎2𝑎3𝑏2𝑏3|−𝑦0|𝑎1𝑎3𝑏1𝑏3|+𝑧0|𝑎1𝑎2𝑏1𝑏2|.

If you now look at the definition of 𝑥0, 𝑦0, 𝑧0, you will see that the determinants on the right-hand side are conveniently equal to 𝑥0, −𝑦0, and 𝑧0, respectively. So suddenly the whole thing cancels and we just get 𝑘=1. So 𝑥=𝑥0, 𝑦=𝑦0, 𝑧=𝑧0 and this gives the algebraic formula we wanted.

§6.3 [RECIPE] What to use the cross product for

Unlike the dot product, which is just a number, the cross product is a vector. So it has more information in it — both a direction and a magnitude.

However in practice, when we use the cross product, we’ll often only use one piece of information. (It’s not until Chapter 38 that we really start using both parts at once.)

Hence the following two recipes below.

Recipe for normal vectors

To find a vector perpendicular to both 𝐯 and 𝐰 at once:

  1. Output any nonzero multiple of 𝐯×𝐰.
Recipe for area

To find the area of the parallelogram formed by 𝐯 and 𝐰 in ℝ3:

  1. Output the magnitude of 𝐯×𝐰.

Notice in the first recipe, we ignore the magnitude; in the second recipe, we ignore the direction.

Sample Question

Consider the three points 𝐴=(1,0,0), 𝐵=(0,2,0), 𝐶=(0,0,3).

  • Find a normal vector to the plane through 𝐴, 𝐵, 𝐶.
  • Compute the equation of the plane.
  • Compute the area of triangle 𝐴𝐵𝐶.

Solution. First, let’s find a normal vector to the plane through 𝐴, 𝐵, and 𝐶. The idea is to compute two vectors 𝐴𝐵⃗ and 𝐴𝐶⃗:

𝐴𝐵⃗=(0−12−00−0)=(−120)𝐴𝐶⃗=(0−10−03−0)=(−103).

These two vectors can be drawn as arrows contained in the plane through them. So if we compute the cross product, we’ll get a normal vector we wanted! That is,

𝐴𝐵⃗×𝐴𝐶⃗=|𝐞1𝐞2𝐞3−120−103|=(2⋅3−0⋅0)𝐞1−(−1⋅3−0⋅−1)𝐞2+(−1⋅0−2⋅−1)𝐞3=(6−0)𝐞1−(−3−0)𝐞2+(0−(−2))𝐞3=(632).

That’s the normal vector. To find the equation of the plane, we know that we should have

6𝑥+3𝑦+2𝑧=𝑑

for some constant 𝑑. Plugging in any of the three points 𝐴, 𝐵, 𝐶 gives 𝑑=6 (the redundancy here gives us a way to check our arithmetic, too). So the plane is

6𝑥+3𝑦+2𝑧=6.

Finally, the area of △𝐴𝐵𝐶 is half the area of the parallelogram formed by 𝐴𝐵⃗ and 𝐴𝐶⃗, so that

Area(△𝐴𝐵𝐶)=12|𝐴𝐵⃗×𝐴𝐶⃗|=1262+32+22=72.

□

Remark
This shape of question is worth remembering: the cross product often gives you a way to find a normal vector to some plane, because it’s so good at making right angles. Then once you have the normal vector, you can find the equation of the plane using the recipe from Section 5.4.

§6.4 [SIDENOTE] The cross product sucks

Compared to dot products and determinants, the cross product might feel the most unnatural, for good reason — it’s used much less frequently by serious mathematicians than the other tools you see. See Figure 15.

The reason that the cross product isn’t popular with mathematicians is the definition of the cross product is really quite brittle. For example, the cross product can’t be defined for any number of dimensions,11 and you have to remember this weird right-hand rule that adds one more arbitrary convention. So the definition is pretty unsatisfying.

To replace the cross product, mathematicians use a different kind of object called a bivector, an element of a space called ⋀2(ℝ𝑛). (They might even claim that bivectors do everything cross products can do, but better.) Again, this new kind of object is well beyond the scope of 18.02 but it’s documented in Chapter 12 of my Napkin if you do want to see it.

I’ll give you a bit of a teaser though. In general, for any 𝑛, bivectors in ℝ𝑛 are specified by 𝑛(𝑛−1)2 coordinates. So for 𝑛=3 you could translate every bivector in ℝ3 into a vector in ℝ3 by just reading the coordinates (although you end up with the right-hand rule as an artifact of the translation), and the cross product is exactly what you get. But for 𝑛=4, a bivector in ℝ4 has six numbers, which is too much information to store in a vector in ℝ4. Similarly, for 𝑛>4, this translation can’t be done. That’s why the cross product is so brittle and can’t work past ℝ3.

Figure 15: How to think of cross products.

§6.5 [RECAP] Recap of vector stuff up to here

A brief summary of the last few chapters.

See also Table 2, which summarizes some of the vectors we’ve seen in applications.

VectorDirectionMagnitude
Normal vector 𝐧 to planePerpendicular to planeIrrelevant!
proj𝐰(𝐯)Same as 𝐰Scalar component
Cross product 𝐯×𝐰Perpendicular to both 𝐯 and 𝐰Area of parallelogram
Table 2: Some commonly used kinds of vectors we’ve met so far.

§6.6 [EXER] Exercises

Exercise 6.1. Suppose real numbers 𝑎 and 𝑏 satisfy

(123)×(100𝑎𝑏)=𝟎.

Compute 𝑎 and 𝑏.

Exercise 6.2. Let 𝐯 and 𝐰 be vectors in ℝ3 for which 𝐯×𝐰=(123). Compute 5𝐰×4𝐯.

Exercise 6.3. Let 𝐯 and 𝐰 be unit vectors in ℝ3. Compute all possible values of

|𝐯×𝐰|2+(𝐯⋅𝐰)2.

Exercise 6.4. Suppose 𝐯 is a vector in ℝ3 and 𝑘 is a real number such that

(123)×𝐯=(45𝑘).

Compute 𝑘.

  1. 11Just kidding, apparently there’s a seven dimensional cross product? Today I learned. Except that there are apparently 480 different ways to define it in seven dimensions, so, like, probably not a great thing.