# Chapter 10Cross products

"Every dimension is special."

- Jeff Lagarias

Last chapter, I talked about the dot product, showing both the standard introduction to the topic, as well as the deeper view of it related to linear transformations. I'd like to do the same for cross products, which also have a standard introduction along with a deeper understanding in the light of linear transformations, but this time I'm dividing it into two chapters.

Here, I'll try to hit the main points that students are usually shown about the cross product, and in the next chapter I'll show a view which is less commonly taught, but really satisfying when you learn it.

## Two dimensions

We'll start in two dimensions. If you have two vectors, $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$, think about the parallelogram that they span out. What I mean by this is that if you take a copy of $\vec{\mathbf{v}}$, and move its tail to the tip of w, and you take a copy of $\vec{\mathbf{w}}$, and move its tail to the tip of $\vec{\mathbf{v}}$, the four vectors enclose a certain parallelogram.

The cross product of $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$, written with the x-shaped multiplication symbol ($\times$), is the area of this parallelogram.

Well, almost, we also need to consider orientation. If $\vec{\mathbf{w}}$ is a counterclockwise rotation away from $\vec{\mathbf{v}}$, then $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ is positive and equal to the area of that parallelogram.

But if $\vec{\mathbf{w}}$ is a clockwise rotation away from $\vec{\mathbf{v}}$, the cross product is $-1$ times the area of that parallelogram.

Notice, this means order matters. If you swap $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$, and instead consider $\vec{\mathbf{w}}$ cross $\vec{\mathbf{v}}$, the cross product becomes the negative of whatever it was before.

The way I always remember this is that when you take the cross product of the two basis vectors in order, $\hat{\imath} \times \hat{\jmath}$, the result should be positive. In fact, the order of your basis vectors is what defines orientation. So since $\hat{\imath}$ is on the right of $\hat{\jmath}$, I remember that $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ is positive whenever $\vec{\mathbf{w}}$ a counterclockwise rotation away from $\vec{\mathbf{v}}$.

For example, with the vectors shown here, the area of that parallelogram is 7 (You'll see how to compute this below). Because $\vec{\mathbf{w}}$ is a clockwise rotation away from $\vec{\mathbf{v}}$, the cross product should be negative, so $\vec{\mathbf{v}} \times \vec{\mathbf{w}} = -7$.

**Given the diagram below:**

Is the cross product $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ positive?

**Given the diagram below:**

Is the cross product $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ positive?

## Compute with determinant

Of course, you want to be able to compute this without someone telling you the area. This is where the determinant comes in from chapter 5. For the 2d cross product $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$, you write the coordinates of $\vec{\mathbf{v}}$ as the first column of a matrix, write the coordinates of $\vec{\mathbf{w}}$ as the second column, then you compute the determinant.

This is because a matrix whose columns represent $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$ corresponds with a linear transformation that moves the basis vectors $\hat{\imath}$ and $\hat{\jmath}$ to $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$.

The determinant is all about measuring how areas change due to a transformation, and the prototypical area to look at is the unit square resting on $\hat{\imath}$ and $\hat{\jmath}$. After the transformation, that square turns into the parallelogram we care about. So the determinant, which generally measures the factor by which areas are changed, gives the area of this parallelogram, since it evolved from a square that started with area 1.

What's more, if $\vec{\mathbf{w}}$ is a *clockwise* rotation away from $\vec{\mathbf{v}}$, it means orientation is flipped during the transformation, which is what it means for a determinant to be negative.

### Determinant example

For example, if $\vec{\mathbf{v}}$ has coordinates $\begin{bmatrix}-3\\1\end{bmatrix}$, and $\vec{\mathbf{w}}$ has coordinates $\begin{bmatrix}2\\1\end{bmatrix}$, the determinant is:

Evidently the area of the parallelogram formed by the two vectors is $5$, and since $\vec{\mathbf{w}}$ is a clockwise rotation away from $\vec{\mathbf{v}}$ it should make sense that this value is negative.

I'd recommend playing around with this notion a bit in your head to get an intuitive feel for the cross product.

What is result of of $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ where $\vec{\mathbf{v}} = \begin{bmatrix}1\\-2\end{bmatrix}$ and $\vec{\mathbf{w}} = \begin{bmatrix}4\\3\end{bmatrix}$?

## Properties

For example, you might notice that when two vectors are perpendicular, or close to being perpendicular, their cross product is larger than it would be if they were pointing in a very similar direction, because the area of that parallelogram is larger when its sides are perpendicular.

Something else you might notice is that if you scale up one of the vectors, perhaps multiplying $\vec{\mathbf{v}}$ by $3$, then the area of that parallelogram is scaled up by a factor of three, so $(3\vec{\mathbf{w}}) \times \vec{\mathbf{w}} = 3 (\vec{\mathbf{w}} \times \vec{\mathbf{w}})$.

## Standard 3d View

Now, even though everything we just did is a perfectly fine mathematical operation, what I just described is technically not the cross product. The true cross product is something that combines two 3d vectors to get a new 3d vector.

You still consider the parallelogram defined by the two vectors, and the area of that parallelogram still plays a big role. To be concrete the area is $9$ units for the vectors shown here.

The 3d cross product does not return a number, it returns a vector. This new vector's length will be the area of that parallelogram, which in this example is $9$, and the direction of that new vector is perpendicular to that parallelogram.

But which way? There are two possible vectors with length $9$ pointing perpendicular to a given plane. This is where the right-hand rule comes in. Point the forefinger of your right hand in the direction of $\vec{\mathbf{v}}$, and stick out your middle finger in the direction of $\vec{\mathbf{w}}$. Now when you point up your thumb, that's the direction of the cross product.

For example, let $\vec{\mathbf{v}}$ be the vector with length $2$ in the $z$ direction, and let $\vec{\mathbf{w}}$ be the vector with length $2$ in the $y$ direction. The parallelogram they define in this simple example is actually a square, since they're perpendicular, and the area of that square is $4$. Using the right hand rule, their cross product should point in the negative $x$ direction, so this cross product is $-4 \hat{\imath}$.

What is $\vec{\mathbf{v}} \times \vec{\mathbf{w}}$ where $\vec{\mathbf{v}} = \left[\begin{array}{c} 2 \\ 0 \\ 0 \end{array}\right]$ and $\vec{\mathbf{w}} = \left[\begin{array}{c} 0 \\ -3 \\ 0 \end{array}\right]$?

## Computing

There is a formula you could memorize for this cross product:

However, it's common and easier to remember a certain process involving the 3d determinant. This process looks truly strange at first. Write a 3d matrix where the second column is the coordinates of $\vec{\mathbf{v}}$, and the third column is the coordinates $\vec{\mathbf{w}}$. Then for the first column, write in the basis vector $\hat{\imath}$, $\hat{\jmath}$, and $\hat{k}$. Then, you compute the determinant of this matrix.

The silliness is probably clear here. What on earth does it mean to put a vector in as the entry to a matrix? Students are often told that this is just a notational trick; when you carry out all the computations as if $\hat{\imath}$, $\hat{\jmath}$ and $\hat{k}$ were numbers. Then you get some linear combination of those basis vectors, and the vector defined by that linear combination, students are told to just believe, is the unique vector perpendicular to $\vec{\mathbf{v}}$ and $\vec{\mathbf{w}}$ whose magnitude is the area of the appropriate parallelogram, and whose direction obeys the right-hand-rule.

And sure, in some sense this is a notational trick, but there is a reason for doing it. It's not just a coincidence that the determinant is once again important, and putting the basis vectors in these slots is not just random. To understand where this all comes from, it helps to use the idea of duality that I introduced in the last chapter. This concept is a bit heavy, though, so I'm putting it into a separate follow-on chapter for those of you curious to learn more.

Arguably, it falls outside the essence of linear algebra, so you can feel comfortable if you want to skip that next chapter and go straight to the lesson on Cramer's Rule. But for those of you willing to go a bit deeper, it's just really cool.