The vector cross product,   $\vec{a} \times \vec{b}$


The cross product (also called the vector product), is a special product of two vecotrs in { ℝ3 } space (3-dimensional x,y,z space). The cross product of two 3-space vectors yields a vector orthogonal to the vectors being "crossed." It's one of the most important relationships between 3-D vectors. In this section we'll define the cross product and show how it works.

The symbol of the cross product is the 'times' symbol, ×. Generally there isn't much confusion between taking a cross product and vanilla multiplication because of the context. If a × comes between two vectors, we assume that means cross product.

Below we'll derive the cross product using the dot product, so if you need to, you might want to review that.


Derivation from the dot product


First, recall that the dot product between two vectors   $\vec{a}$   and   $\vec{b}$   yields the angle, θ, between them:

$$\vec{a} \cdot \vec{b} = |a| |b| cos(\theta)$$

From here on I'll drop the arrows above vectors. It should be clear from the context when we're working with vectors. Now lets let the components of vectors a and b be

$$a = (a_1, \; a_2, \; a_3)$$

and

$$b = (b_1, \; b_2, \; b_3).$$

Let's also make a vector $n = (x, y, z)$ that will be the orthogonal vector (the vector perpendicular to a and b) that we hope to construct. If n is perpendicular to a and b then the dot products must equal zero:

$$ \begin{align} a \cdot n &= a_1 x + a_2 y + a_3 z = 0 \\ b \cdot n &= b_1 x + b_2 y + b_3 z = 0 \end{align}$$

Now we'll do a bit of manipulation to get where we want to go. Let's multiply the first dot product by $b_1$ and the second by $a_1$

$$ \begin{align} b_1(a_1 x + a_2 y + a_3 z) &= 0 \\ a_1(b_1 x + b_2 y + b_3 z) &= 0 \end{align}$$

Expanding these gives

$$ \begin{align} a_1 b_1 x + a_2 b_1 y + a_3 b_1 z &= 0 \\ a_1 b_1 x + a_1 b_2 y + a_1 b_3 z &= 0 \end{align}$$

Now subtract the second from the first to get a new equation. Notice that the first terms in each of the above equations, those containing x, are the same, so they'll go away.

$$a_2 b_1 y + a_3 b_1 z - a_1 b_2 y - a_1 b_3 z = 0$$

Now collect terms containing y and z:

$$(a_2 b_1 - a_1 b_2) y + (a_3 b_1 - a_1 b_3) z = 0$$

Now move the second term to the right side:

$$(a_2 b_1 - a_1 b_2) y = (a_1 b_3 - a_3 b_1) z$$

Division by the quantities in parentheses give us an equality of ratios:

$$\frac{y}{a_1 b_3 - a_3 b_1} = \frac{z}{a_2 b_1 - a_1 b_2}$$

Now recall that our original choice of multiplication by $a_1$ and $b_1$ caused the terms with x to vanish. We could easily have made another choice, dropping the z term, for example, and found that

$$\frac{x}{a_3 b_2 - a_2 b_3} = \frac{y}{a_1 b_3 - a_3 b_1}$$

So we can equate all three like this:

$$\frac{x}{a_3 b_2 - a_2 b_3} = \frac{y}{a_1 b_3 - a_3 b_1} = \frac{z}{a_2 b_1 - a_1 b_2}$$

Now this equality is true if*

$$ \begin{align} x &= a_2 b_3 - a_3 b_2 \\ y &= a_3 b_1 - a_1 b_3 \\ z &= a_1 b_2 - a_2 b_1 \end{align}$$

These are the (x, y, z) coordinates of our vector that is orthogonal to vectors a and b.

*The careful reader will not that I changed all of the signs in this last step. It's because of my choice to subtract the second equation from the first a few steps back. Changing the signs just makes sure that the cross product comports with the right hand rule, covered further on. It's no big deal.


Example 1

Find the coordinates of the 3-D vector $\vec{z}$ that is orthogonal to $\vec{a} = (1, 0, 0)$ and $\vec{b} = (0, 1, 0)$.


Solution: We actually alreacy know the answer, because $\vec{a} = (1, 0, 0)$ lies along the x-axis in an x,y,z coordinate system and $\vec{b} = (0, 1, 0)$ lies along the y-axis. Thus the vector we're looking for has coordinates (0, 0, z), where z is some number. We'll talk more about what number later. For now we'll just care about the direction, which we require to be perpendicular to $\vec{a}$ and $\vec{b}$.

Cross product

$$ \begin{align} x &= a_2 b_3 - a_3 b_2 = 0(1) - 1(0) = 0\\ y &= a_3 b_1 - a_1 b_3 = 1(0) - 0(0) = 0\\ z &= a_1 b_2 - a_2 b_1 = 1(1) - 0(0) = 1 \end{align}$$

So our orthogonal vector is $\vec{z} = (0, 0, 1)$ Think of vectors $\vec{a}$ and $\vec{b}$ as lying in the x-y plane. Then our vector $\vec{z}$ is perpendicular (normal) to that plane, by definition of the 3-D Cartesian coordinate system.

Note that the vector $-\vec{z} = (0, 0, -1)$ is also normal to $\vec{a}$ and $\vec{b}$.


The cross product follows the right-hand rule


In example 1, we saw that there are actually two vectors orthogonal to (1, 0, 0) and (0, 1, 0). They are (0, 0, 1) and (0, 0, -1). By convention, we choose the first because it conforms to the right-hand rule.

The right-hand rule refers to a simple rule of thumb (so to speak) that pops up from time-to-time in math and especially physics. There are two versions

RHR version 1


In this version, we imagine that the x-vector (the first in $\vec{x} \times \vec{y}$) hinges at the origin and rotates into the y-vector. If the fingers of the right hand curve along the direction of that arcing route from x to y, then the thumb points in the proper direction for the cross-product vector, upward in the diagram above.

RHR version 2


In this version of the RHR, the index finger, middle finger and thumb of the right hand are arranged so that each is about 90˚ from the others. Then if the index finger is pointed along the x-vector, and the middle finger along the y-vector, then the thumb points along the $\vec{x} \times \vec{y}$ vector.

You should really get to know one or both of these rules. They'll come in handy in future studies. If you're studying the cross product, you're well on your way there.


Example 2

Calculate the normalized vector orthogonal to   $\vec{a} = (1, 1, 1)$   and   $\vec{b} = (1, 2, 3)$. Recall that normalized means that the vector length is adjusted to one. That is, it is a unit vector.


The cross product (let's call it $\vec{c}$) is

$$ \begin{align} x &= a_2 b_3 - a_3 b_2 = 1(3) - 1(2) = 1\\ y &= a_3 b_1 - a_1 b_3 = 1(1) - 1(3) = -2\\ z &= a_1 b_2 - a_2 b_1 = 1(2) - 1(1) = 1 \end{align}$$

Now the length of this vector is $|c| = \sqrt{x^2 + y^2 + z^2}$, which is 6 units. In order to normalize vector c, we divide all of its components by this length:

$$\vec{c}_N = \left( \frac{1}{6}, \frac{-2}{6}, \frac{1}{6} \right)$$

The "N" subscript stands for "normalized." You can check for yourself that the length of our new vector is 1. And we can change the length of a vector without changing its direction, so this is the normalized vector orthogonal to $\vec{a} = (1, 1, 1)$ and $\vec{b} = (1, 2, 3)$.


A cross-product mnemonic


There is a handy way to remember how to calculate cross products involving the determinant of a 3-D matrix. If you need to review those, go here.

Let's say we're calculating the cross product of vectors $\vec{a} = (a_1, a_2, a_3)$ and $\vec{b} = (b_1, b_2, b_3).$ Our result vector will be vector c, $\vec{c} = (x, y, z),$ where x, y and z are the unknown components of the cross product result. We begin by constructing a 3 × 3 matrix of these three row vectors like this:

$$\left( \begin{matrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ x & y & z \end{matrix} \right)$$

The cross product turns out to be the determinant of this matrix. You can find it by reproducing its first two columns to the right of the matrix, like this:

$$ \begin{matrix} a_1 & a_2 & a_3 & a_1 & a_2 \\ b_1 & b_2 & b_3 & b_1 & b_2\\ x & y & z & x & y \end{matrix}$$

Now the cross product can be calculated by following the diagonals in that matrix drawn below:

Using the diagonals, the x, y and z components of the cross product vector are the differences between the products indicated by the magenta diagonals and those indicated by the green diagonals. Thus we have

$$ \begin{align} x &= a_2 b_3 - a_3 b_2 \\ y &= a_3 b_1 - a_1 b_3 \\ z &= a_1 b_2 - a_2 b_1 \end{align}$$

3 × 3 determinants are fairly common, so if you can remember those, this is a nice way to remember the cross-product formulas.


The cross product is not commutative:   $\vec{a} \times \vec{b} \ne \vec{b} \times \vec{a}$


We can use our determinant representation of the cross product to show that the cross product is not commutative. That is,

$$\vec{a} \times \vec{b} \ne \vec{b} \times \vec{a}$$

We already know the result of $\vec{a} \times \vec{b}.$ It is:

which gives

$$ \begin{align} x &= a_2 b_3 - a_3 b_2 \\ y &= a_3 b_1 - a_1 b_3 \\ z &= a_1 b_2 - a_2 b_1 \end{align}$$

If we swap $\vec{a}$ and $\vec{b}$ in our construction, we get:

which yields

$$ \begin{align} x &= a_3 b_2 - a_2 b_3 \\ y &= a_1 b_3 - a_3 b_1 \\ z &= a_2 b_1 - a_1 b_2 \end{align}$$

Notice that the second case is just the negative of the first for every component of vector c. Thus we have:

$$\vec{a} \times \vec{b} = -[\vec{b} \times \vec{a}]$$

Recall that for vectors, $-1\cdot(x, y, z) = (-x, -y, -z)$.

Further, if you go back and review the right-hand rule, you'll notice that both cross products obey the rule because a swapping of vectors a and b results in a flipping of the direction of the thumb.

So while the cross product is not strictly communtative, it is to within a multiple of ±1 (change of sign). This kind of relationship is sometimes referred to as anticommutative.


Practice problems

1.

Normalize these vectors:

  1.   $\vec{a} = (2, 2, 3)$

  2.   $\vec{v} = (-1, -1, -2)$

  3.   $\vec{z} = (0, 0, 3)$
Solution

First calculate the lengths each vector:

$$ \begin{align} |\vec{a}| &= \sqrt{2^2 + 2^2 + 3^2} \\ &= \sqrt{17} \\ \\ |\vec{v}| &= \sqrt{(-1)^2 + (-1)^2 + (-2)^2} \\ &= \sqrt{6} \\ \\ |\vec{z}| &= \sqrt{0^2 + 0^2 + 3^2} \\ &= \sqrt{9} = 3 \\ \\ \end{align}$$

Now divide each component of the vector by its length:

$$ \begin{align} \vec{a}_N &= \left( \frac{2}{\sqrt{17}}, \frac{2}{\sqrt{17}}, \frac{3}{\sqrt{17}} \right) \\ \\ \vec{v}_N &= \left( \frac{-1}{\sqrt{6}}, \frac{-1}{\sqrt{6}}, \frac{-2}{\sqrt{6}} \right) \\ \\ \vec{z}_N &= \left( 0, 0, \frac{3}{3} \right) = (0, 0, 1)\\ \\ \end{align}$$

2.

Find the normalized vector orthogonal to   $\vec{a} = (1, 3, 7)$   and   $\vec{b} = (2, -1, 1)$.

Solution

We'll use the 3×3 matrix determinant form of the cross product:

$$ \begin{matrix} a_1 & a_2 & a_3 & a_1 & a_2 \\ b_1 & b_2 & b_3 & b_1 & b_2 \\ x & y & z & x & y \end{matrix}$$

which gives:

$$ \begin{matrix} 1 & 3 & 7 & 1 & 3 \\ 2 & -1 & 1 & 2 & -1 \\ x & y & z & x & y \end{matrix}$$

So our components are:

$$ \begin{align} x &= 3(1) - 7(-1) = 10\\ y &= 7(2) - 1(1) = 13\\ z &= 1(-1) - 3(2) = -7 \end{align}$$

The length of our new vector (we'll call it   $\vec{c}$) is

$$|\vec{c}| = \sqrt{10^2 + 13^2 +(-7)^2} = \sqrt{318}$$

Finally, our normalized vector is

$$\vec{c}_N = \left( \frac{10}{\sqrt{318}}, \frac{13}{\sqrt{318}}, \frac{-7}{\sqrt{318}} \right)$$

3.

Confirm that the unit vectors $\vec{x} = (1, 0, 0),$ $\vec{y} = (0, 1, 0)$   and   $\vec{z} = (0, 0, 1)$ form an orthogonal set of basis vectors in 3-D space.

Solution

We need to show that each vector is the cross product of the other two. Here is one example.

$$ \begin{align} \vec{x} &\times \vec{y}\\ &= [0(0) - 1(0)]x + [0(0)- 1(0)]y + [1(1) - 0(0)]z \\ &= (0, 0, 1) = \vec{z} \end{align}$$

You can confirm the other two on your own.

Note that we could also have calculated the dot product between all three pairs and found that the angle between them is 90˚

4.

Find a vector that is perpendicular to the plane determined by the points p = (1, 2, 3), q = (-1, -1, 2) and r = (0, 2, -1)

Solution

First we need to find two vectors in that plane. We can do that by subtracting the components of one vector (let's choose p) from the other two. That will give us two vectors with the same origin. Here are our three points plotted on a 3-D Cartesian grid:

$$ \begin{align} \vec{Q} &= (-1 - 1, -1 - 2, 2 - 3) \\ &= (-2, -3, -1) \\ \\ \vec{R} &= (0 - 1, 2 - 2, -1 - 3) \\ &= (-1, 0, -4) \end{align}$$

Here are our two new vectors R and Q that form the plane shown with the triangle.

Now we find the cross product of those two vectors.

The

$$ \begin{matrix} a_1 & a_2 & a_3 & a_1 & a_2 \\ b_1 & b_2 & b_3 & b_1 & b_2 \\ x & y & z & x & y \end{matrix}$$

which gives:

$$ \begin{matrix} -2 & -3 & -1 & -2 & -3 \\ -1 & 0 & 4 & -1 & 0 \\ x & y & z & x & y \end{matrix}$$

So our components are:

$$ \begin{align} x &= -3(4) - (-1)0 = -12\\ y &= -1(-1) - 4(-2) = 9\\ z &= -2(0) - (-3)(-1) = -3 \end{align}$$

So our vector is

$$(-12, 9, -4)$$

These vectors can be difficult to visualize, but if you look at the plot above, our cross-product vector seems about right.


X

Orthogonal

In two dimensions, orthogonal means perpendicular. But when we proceed to three or more dimensions, "perpendicular" isn't good enough. In 3-D a line and a plane can be perpendicular when viewed from one direction, but not perpendicular when viewed from an angle 90˚ away on the plane. The word orthogonal means perpendicular in every conceivable direction, no matter how many dimensions.

Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.