The cross product accumulates interactions between different dimensions. Taking two vectors, we can write every combination of components in a grid:

This completed grid is the *outer product*, which can be separated into the:

**Dot product**, the interactions between similar dimensions (`x*x`

`y*y`

,`z*z`

)**Cross product**, the interactions between different dimensions (`x*y`

,`y*z`

,`z*x`

, etc.)

The dot product (vec(a) · vec(b)) measures similarity because it only accumulates interactions in matching dimensions. It’s a simple calculation with 3 components.

The cross product (written vec(a) times vec(b)) has to measure a half-dozen “cross interactions”. The calculation looks complex but the concept is simple: accumulate 6 individual differences for the total.

Instead of thinking “When do I need the cross product?” think “When do I need interactions between different dimensions?”.

Area, for example, is formed by vectors pointing in different directions (the more orthogonal, the better). Indeed, the cross product measures the area spanned by two 3d vectors (source):

(The “cross product” assumes 3d vectors, but the concept extends to higher dimensions.)

Did the key intuition click? Let’s hop into the details.

Contents

## Defining the Cross Product

The dot product represents vector similarity with a single number:

(Remember that trig functions are percentages.) Should the cross product (difference between interacting vectors) be a single number too?

Let’s try. Sine is the percentage difference, so we could use:

Unfortunately, we’re missing a lot of detail. `x`

is 100% different from both `y`

and `z`

, but shouldn’t `x*y`

and `x*z`

be different from each other? As Tolstoy wrote, “All happy families are alike; each unhappy family is unhappy in its own way.”

Instead, let’s express these unique differences as a vector:

The

*size*of the cross product is the numeric “amount of difference” (with sin(theta) as the percentage)The

*direction*of the cross product is based on both inputs: it’s the direction orthogonal to both (i.e., favoring neither)

A vector result represents the `x*y`

and `x*z`

separately, even though `y`

and `z`

are both “100% different” from `x`

.

(Should the dot product be turned into a vector too? Well, we have the inputs and a similarity percentage. There’s no new direction that isn’t available from either input.)

## Geometric Interpretation

Two vectors determine a plane, and the cross product points in a direction different from both (source):

Here’s the problem: there’s two perpendicular directions. By convention, we assume a “right-handed system” (source):

If you hold your first two fingers like the diagram shows, your thumb will point in the direction of the cross product. I make sure the orientation is correct by sweeping my first finger from vec(a) to vec(b). With the direction figured out, the magnitude of the cross product is |a| |b| sin(theta), which is proportional to the magnitude of each vector and the “difference percentage” (sine).

## The Cross Product For Orthogonal Vectors

To remember the right hand rule, write the `xyz`

order twice: `xyzxyz`

. Next, find the pattern you’re looking for:

`xy => z`

(`x`

cross`y`

is`z`

)`yz => x`

(`y`

cross`z`

is`x`

; we looped around:`y`

to`z`

to`x`

)`zx => y`

Now, `xy`

and `yx`

have opposite signs because they are forward and backward in our `xyzxyz`

setup.

So, without a formula, you should be able to calculate:

Again, this is because `x`

cross `y`

is positive `z`

in a right-handed coordinate system. I used unit vectors, but we could scale the terms:

## Calculating The Cross Product

A single vector can be decomposed into its 3 orthogonal parts:

When the vectors are crossed, each pair of orthogonal components (like a_x times b_y) casts a vote for where the orthogonal vector should point. 6 components, 6 votes, and their total is the cross product. (Similar to the gradient, where each axis casts a vote for the direction of greatest increase.)

`xy => z`

and`yx => -z`

(assume vec(a) is first, so`xy`

means a_x b_y)`yz => x`

and`zy => -x`

`zx => y`

and`xz => -y`

`xy`

and `yx`

fight it out in the `z`

direction. If those terms are equal, such as in (2, 1, 0) times (2, 1, 1), there is no cross product component in the `z`

direction (2 – 2 = 0).

The final combination is:

where vec(n) is the unit vector normal to vec(a) and vec(b).

Don’t let this scare you:

- There’s 6 terms, 3 positive and 3 negative
- Two dimensions vote on the third (so the
`z`

term must only have`y`

and`x`

components) - The positive/negative order is based on the
`xyzxyz`

pattern

If you like, there is an algebraic proof, that the formula is both orthogonal and of size |a| |b| sin(theta), but I like the “proportional voting” intuition.

## Example Time

Again, we should do simple cross products in our head:

Why? We crossed the `x`

and `y`

axes, giving us `z`

(or vec(i) times vec(j) = vec(k), using those unit vectors). Crossing the other way gives -vec(k).

Here’s how I walk through more complex examples:

- Let’s do the last term, the z-component. That’s (1)(5) minus (4)(2), or 5 – 8 = -3. I did
`z`

first because it uses`x`

and`y`

, the first two terms. Try seeing (1)(5) as “forward” as you scan from the first vector to the second, and (4)(2) as backwards as you move from the second vector to the first. - Now the
`y`

component: (3)(4) – (6)(1) = 12 – 6 = 6 - Now the
`x`

component: (2)(6) – (5)(3) = 12 – 15 = -3

So, the total is (-3, 6, -3) which we can verify with Wolfram Alpha.

In short:

- The cross product tracks all the “cross interactions” between dimensions
- There are 6 interactions (2 in each dimension), with signs based on the
`xyzxyz`

order

## Appendix

**Connection with the Determinant**

You can calculate the cross product using the determinant of this matrix:

There’s a neat connection here, as the determinant (“signed area/volume”) tracks the contributions from orthogonal components.

There are theoretical reasons why the cross product (as an orthogonal vector) is only available in 0, 1, 3 or 7 dimensions. However, the cross product as a single number is essentially the determinant (a signed area, volume, or hypervolume as a scalar).

**Connection with Curl**

Curl measures the twisting force a vector field applies to a point, and is measured with a vector perpendicular to the surface. Whenever you hear “perpendicular vector” start thinking “cross product”.

We take the “determinant” of this matrix:

Instead of multiplication, the interaction is taking a partial derivative. As before, the vec(i) component of curl is based on the vectors and derivatives in the vec(j) and vec(k) directions.

**Relation to the Pythagorean Theorem**

The cross and dot product are like the orthogonal sides of a triangle:

For unit vectors, where |a| = |b| = 1 , we have:

I cheated a bit in the grid diagram, as we have to track the squared magnitudes (as done in the Pythagorean Theorem).

**Advanced Math**

The cross product & friends get extended in Clifford Algebra and Geometric Algebra. I’m still learning these.

**Cross Products of Cross Products**

Sometimes you’ll have a scenario like:

First, the cross product isn’t associative: order matters.

Next, remember what the cross product is doing: finding orthogonal vectors. If any two components are parallel (vec(a) parallel to vec(b)) then there are no dimensions pushing on each other, and the cross product is zero (which carries through to 0 times vec(c)).

But it’s ok for vec(a) and vec(c) to be parallel, since they are never directly involved in a cross product, for example:

Whoa! How’d we get back to vec(j)? We asked for a direction perpendicular to both vec(i) and vec(j), and made that direction perpendicular to vec(i) again. Being “doubly perpendicular” means you’re back on the original axis.

**Dot Product of Cross Products**

Now if we take

what happens? We’re forced to do vec(a) times vec(b) first, because vec(b) · vec(c) returns a scalar (single number) which can’t be used in a cross product.

If vec(a) and vec(c) are parallel, what happens? Well, vec(a) times vec(b) is perpendicular to vec(a), which means it’s perpendicular to vec(c), so the dot product with vec(c) will be zero.

I never really memorized these rules, I have to think through the interactions.

**Other Coordinate Systems**

The Unity game engine is left-handed, OpenGL (and most math/physics tools) are right-handed. Why?

In a computer game, `x`

goes horizontal, `y`

goes vertical, and `z`

goes “into the screen”. This results in a left-handed system. (Try it: using your right hand, you can see `x`

cross `y`

should point out of the screen).

**Applications of the Cross Product**

- Find the direction perpendicular to two given vectors.
- Find the signed area spanned by two vectors.
- Determine if two vectors are orthogonal (checking for a dot product of 0 is likely faster though).
- “Multiply” two vectors when only perpendicular cross-terms make a contribution (such as finding torque).
- With the quaternions (4d complex numbers), the cross product performs the work of rotating one vector around another (another article in the works!).

Happy math.

## Other Posts In This Series

- Vector Calculus: Understanding the Dot Product
- Vector Calculus: Understanding the Cross Product
- Vector Calculus: Understanding Flux
- Vector Calculus: Understanding Divergence
- Vector Calculus: Understanding Circulation and Curl
- Vector Calculus: Understanding the Gradient
- Understanding Pythagorean Distance and the Gradient

## Leave a Reply

53 Comments on "Vector Calculus: Understanding the Cross Product"

Kalid has done it again! Imagine if we are taught like this in secondary schools, our university engineering education would have been so fantastic

Thanks Theophilus, glad you enjoyed it! I really wish someone showed me how the dot and cross product combine to build out the full picture.

Yeah, very great explanatory series. Very helpful and intuitive. Unfortunately this is often not a norm even at universities. Thanks much ;)

I create two triangles with numbers at their edges, in order to represent two 3D vectors. I use them as base and top of a triangular cylinder. I draw two diagonal lines on each sides of the cylinder. Each of the 6 diagonal lines gets a number. Since I made my triangular representation of vector follow a counter-clockwise pattern, diagonal lines that go down, or approaches the base, as I go counter-clockwise gets (+) sign, and the diagonal lines that go up as I go counter-clockwise gets (-) sign. Each set of 3 pairs of diagonal lines crossing each other generates a number, giving us 3 pieces of information.

A perplexing point to me is that we choose to store the number we get by observing interaction of (y&z) and (z&y) into x! My childish guess is that x is neutral to y and z, so both y and z are happy to have their votes stored in x’s chest.

Actually this is the completely wrong way to teach this. In actual fact it’s actually properly taught by using Geometric Algebra. I.e clifford algebra.

Using the “proper way” leads to far more insight and intuition into how this is used and what it really means in actual use.

It’s a shame that it’s never taught properly.

Except that no textbook on linear algebra or vector calculus known to mankind has included clifford algebra when discussing cross products, normal vectors or determinants, and most of the people reading this site are going to be undergraduate students in these courses looking for clarity, help and explanations that look familiar enough to them to help them understand what their book is saying. To this end, I think Kalid succeeded dramatically.

@Mike: Glad you enjoyed it!

@Jae: I might need to see a diagram, but yep — the idea is that x is perpendicular (not favoring) either y or z.

@Haniff: The idea is to show how the traditionally taught dot/cross product fit into a larger picture, but not to start with geometric algebra on day 1 (“I thought we were in a vector calculus class?”).

Ever since my kids came home from school with the “lattice method” of multiplication and it took me a score of tries to “get it”, the true insight of using the distributive property to break numbers into smaller (or different) components has fascinated me. Kalid does it again with this nice graphic. Can’t wait for the day when he and Vihart are in the same real (or virtual) space.

Thanks Mark, glad the matrix/lattice clicked. You might like this one too:

http://betterexplained.com/articles/how-to-understand-combinations-using-multiplication/

I’d love to collaborate with Vi one day.

Kalid ,well done again, can we see result of complex multiplication in terms of total contribriution of components,I mean complex multiplication is multiplication of x and y coordinates, where similar coordinates multiplication indicates the total push (dot product) and different coordinates multiplication indicate magnitude (area,volume;cross product) and then we subtract the push which is useless( i square),plz comment ,thanks once again for insight

Great article but I’m a little confused on why the dot product is a number whereas the cross product is a vector. Could you elaborate further please? Also, off the topic, do you think you’ll ever do an abstract algebra section?

Thanks.

Hi Jackson, great question. The dot product measures similarity (how similar is vector A to vector B?), and the result is a percentage. The assumption is you already have vector B, so a percentage is enough. If you like, you can do “(A dot B) times B” to get an actual vector.

The cross product asks “How different are A and B?”. Although the difference can be quantified as a percentage, there is ambiguity because two vectors can be entirely different from a given vector. (I.e., North and South are entirely different from East). Specifying the cross product as a vector means we can distinguish “The difference between North and East” from “The difference between South and East”.

Abstract algebra would a fun topic down the line, thanks for the suggestion.

mr. kalid simply you are a geneous of math. but on the contrary i am really a foolish one.

einstein?

Please answer my question

Excellent

This is a fantastic explanation and answer. I finally have a fundamental understanding and knowledge of the cross product after all these years. This is well-written and it all makes sense to me now. I will be coming back to this site again for more articles like these after what I’ve learnt today. Thank you.

Thanks Jake, glad you enjoyed it. Hope you enjoy the rest of the site.

w=fa why scalar quantities

Your articles are inevitably good brother!

They give a complete insight and provokes visualization of math equations.

Beyond everything, you are very good amazing person I feel.

Keep up the Best work;

@Suresh: Thanks, it’s awesome to hear when it helps. I’d like to help other people avoid the frustrations I had, appreciate the kind words.

Oh my gosh! Thank you so much! As an astronomy nut and physics student, I was terrified over my difficulty grasping the cross product. This is so much better than my professors and textbook

thank you for your explanation

but how we can find unit vector from a given points with out using cross product?

Thank you kalid sir it is very useful for us because you explain very beautifully. I think it is amagine.. Again thank u so much.

Thanks so much for this wonderfully lucid explanation! I have always been baffled by this.

This is missing a section on physical intuition.

Good question — the physical intuition is that the cross product tracks the area of the parallelogram spanned by two vectors. We get the most area when the vectors are perpendicular (i.e. the parallelogram is a square).

In a more abstract sense, the cross product is tracking the “non-similar interactions”, i.e. getting stronger the more different the vectors are. Sometimes we want to measure similarity (dot product), sometimes we want to measure differences (cross product).

All my respect to you sir

Let me share you my confusing that since we can measure the similarity (dot product) that also indicate the difference as well without (cross product),that is base on the idea of the similarity somehow indicate the differences.

as u pointed out that in right hand rule there are two possible directions .i am bit confused in point that what is reason for chosing one direction not other.is it a random rule chosen by mathimatician or there is solid reason behind this plz .