Math - Cross Product

In this lecture we learn how the cross product of two vectors is used to find the normal vector to a plane.
We also review the left and right handed rules, which can affect the direction that our normal is facing.

Is there any trick to knowing the order of components in the cross product formula? In the example you gave:
a = (0,0,1)
b = (1,0,0)

cy = (az * bx) - (ax * bz) = 1

but if you accidentally reverse the order of subtraction of components:
cy = (ax * bz) - (az * bx) = -1

The result is negated. In subtraction order matters so when calculating the cross product it does not seem clear to know which component should be subtracted from which first.

3 Likes

@Jeff_Simon
yeah, that can catch you out (as it does me… often!)

One common technique is to remember the arches.
So you think:

- - - -
- x x -
x - - x

and

- z z -
z - - z
- - - -

Put them together to get:

- z z -
z x x z
x - - x

and then fill in the blanks with y:

y z z y
z x x z
x y y x

Once you’ve got this far, you can just insert your a, b, and operators:

(ay * bz) - (bz * ay)
(az * bx) - (bx * az)
(ax * by) - (by * ax)

Another option is to start with only the left side.
Start in the bottom left corner and fill in row-by-row with
x, y, z... x, y, z.

So:

y z
z x
x y

Fill in your a and b:

ay * bz
az * bx
ax * by

The pattern for the other side is just the mirror image of this so you end up at:

(ay * bz) - (bz * ay)
(az * bx) - (bx * az)
(ax * by) - (by * ax)

So a couple of options, and there are probably many more. These are just two that I know have helped myself and others in the past (personally, I use the second option).

1 Like

@garypettie
Awesome, those are great! Thanks!

1 Like

What does it say about me if that doesn’t make sense at all? :smiley: I think I’ve reached the end of my math capabilities. From here on out it’s gonna be pain…!

New concepts can always take a while to wrap your head around.

The key things to remember with the cross product are that;

  • The output vector sits perpendicular to both the input vectors
  • The magnitude of the output vector is directly related to the angle between the two vectors

If you’re struggling to remember the processing order for calculating the cross product then there are a couple of useful techniques you can try.

The first is to remember the arches.

Fill in the x's
|   |   | - |   |   |
|   | x | - | x |   |
| x |   | - |   | x |

Then the z's
|   | z | - | z |   |
| z | x | - | x | z |
| x |   | - |   | x |

Then fill the blanks with y's
| y | z | - | z | y |
| z | x | - | x | z |
| x | y | - | y | x |

Or you could look at it the way that I do.
Start in the bottom left corner and only looking at one side, you work your way up filling in x-y-z x-y-z:

|   |   |    |   |   |    |   |   |    | y | z |
|   |   | -> |   |   | -> | z |   | -> | z | x | 
| x |   |    | x | y |    | x | y |    | x | y |

Then for the right side you just mirror that pattern.

1 Like

Thanks @garypettie for taking the time once again to explain. This makes it easier to apply. I probably have to reference this a few time until it clicks. So far I’ve learned a great deal and I think it was just a matter of time to hit the first wall to climb. Thanks for your patience.

2 Likes

I guess the problem for me is that this doesn’t really follow my ingrained logic. When I initally looked at it I got the negative 1 answer because I was looking at things from left to right without repeating (so for xyz, x => yx, y => xz, z => xy). I’ll admit the tools you have given have made me more confused (where did the arches come from?) so for now I’ll be looking at it more as if xyz was repeating from left to right (i.e.; xyzxyz) - the order being relative to the two axis letters directly to the right of the one you are looking for.

1 Like

Hi Gary,

Could this part be a little bit miswritten?

Should’t it be written as below?

(ay * bz) - (az * by)
(az * bx) - (ax * bz)
(ax * by) - (ay * bx)
1 Like

Privacy & Terms