Main content

### Course: Linear algebra > Unit 1

Lesson 5: Vector dot and cross products- Vector dot product and vector length
- Proving vector dot product properties
- Proof of the Cauchy-Schwarz inequality
- Vector triangle inequality
- Defining the angle between vectors
- Defining a plane in R3 with a point and normal vector
- Cross product introduction
- Proof: Relationship between cross product and sin of angle
- Dot and cross product comparison/intuition
- Vector triple product expansion (very optional)
- Normal vector from plane equation
- Point distance to plane
- Distance between planes

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Cross product introduction

Introduction to the cross product. Created by Sal Khan.

## Want to join the conversation?

- At2:00There is no proof for that definition?(5 votes)
- Definitions don't get proofs...

A theorem says: 'IF this thing is true THEN that thing must also be true'. Theorems require proof.

A definition says: "IF you have stuff that looks like this, THEN you may call it that'. Definitions don't require proof... they are either used properly or improperly and they are either useful or not, but they don't need to be proved.

Example: Definition... IF a polygon is a triangle and one of it's angles is exactly 90 degrees, THEN that triangle may be called a right triangle.

Definitions just give you smaller names for a collection of facts... if you say a figure is a right triangle then you are saying that figure also embodies all of the characteristics of a right triangle. If you are wrong then the figure is not actually a right triangle, but that does not 'disprove' the definition.

However... THEOREM: If a triangle has two angles that sum to exactly 90 degrees, then that triangle is a right triangle. This is a theorem and would have to be proven. And if you could find a triangle with two angles that sum exactly to 90 degrees and is not a right triangle, then you would have disproved this theorem in all cases and for all time (not that I'm particularly worried about it).

A definition renames information.

A theorem adds new information.

Cheers.(55 votes)

- What happens in cross multiplication with more than 3 rows? For example 4 rows, 5 rows, and etc?(12 votes)
- In some cases it is easier to think of the result of something to tell you why it's undefined. In R^3 we get 2 vectors from the cross product (both which are orthogonal to the original vectors (one is just the negative of our output)).

However in R^4 or greater. there are multiple orthogonal vectors, as operators only return one value, it is impossible to define a singular answer (and by extension any answer) to a cross product in R^4 or greater.(18 votes)

- I wish this course had some exercises.(18 votes)
- Here I learn that sal is both a great teacher and a pretty good artist(17 votes)
- Could someone please explain to me the point of the Cross Product? Why do we have it and what are some examples of the Cross Product in action?

I'm learning Linear Algebra because of its importance in Economics and Statistics and none of my textbooks even*mention*the Cross Product--all I know is that it has*something*to do with Physics and I'm curious as to what that*something*is... Thanks!(6 votes)- Steve,

Here is a great example of the cross product in action. Imagine that you have a door and you want to apply a force to the door to open it. Now you could apply that force anywhere on the door… maybe you apply it near the side of the door that has the hinge, or maybe you apply the force far away from the hinge. Also, you could apply the force in any direction-- maybe you apply it perpendicular to the plane of the door, or maybe you apply it parallel to the plane of the door.

What happens? Well, if you apply the force parallel to the door, the door doesn't swing open. Instead, it's like you are pushing or pulling the door towards or away from the door jamb and the hinge. Kind of like you are trying to pull the door off the hinges.

Suppose instead you apply the force perpendicular to the door… but on the side of the door near the hinge? Well now the door will swing open… but it takes an awful lot of force to move the door. It would take much less force to open the door if you pushed perpendicularly on the door on the side of the door far away from the hinge.

What moves the door is something called a 'moment,' and moment is the cross product of a Force vector and a distance or position vector. In other words, not only does the force need to be at some distance from the point about which we are creating the moment, but it also needs to be applied perpendicularly to that distance.

It turns out that the cross product describes this relationship perfectly. The cross product of two parallel vectors is 0, and the magnitude of the cross product of two vectors is at its maximum when the two vectors are perpendicular.

There are lots of other examples in physics, though. Electricity and magnetism relate to each other via the cross product as well. For example, if you move a wire through a magnetic field, it will produce a current in the wire that moves perpendicularly to the magnetic field.(21 votes)

- how does multiplying a×b×a and a×b×b and getting 0 out of it prove me that a×b is orthogonal(3 votes)
- I think you are getting a little confused about similar terms which is really easy to do so I'm going to state some definitions first.

a and b are both vectors, the video talks about two different operations you can do on vectors,**Cross Product**(which it introduces and the**Dot Product**which it expects you to already know.

The**Dot Product**of two vectors gives a scaler, let's say we have vectors x and y, x (dot) y could be 3, or 5 or -100. if x and y are**orthogonal**(visually you can think of this as perpendicular) then x dot y is 0. (And if x dot y is 0 x and y are orthogonal).

The**Cross Product**, the new one in this video, of two vectors gives a new vector not a scaler like the dot product. So if we say x and y are vectors again then x cross y = z and z is a vector of the same size as x and y. It's a special vector, though, because it is orthogonal to x and y. This isn't magic, the cross product is defined to cause this result. (The video mentions you might notice a relationship between determinants and how it is defined, but you aren't expected to understand the construction of the definition of cross product at this point)

So the video has vectors A and B and it creates AxB. This new vector AxB is orthogonal to A and it is orthogonal to B because that's what the cross product does. That means AxB (dot) A =0 and AxB(dot) B=0. The video then does the calculations to show that both of those statements are true. Since AxB (dot) A does turn out to equal 0 and AxB (dot) B =0, we have confirmed that AxB, the vector created with the cross product, is in fact*orthogonal to*A*and orthogonal*to B.

(orthogonal is a relationship between two vectors, not a property of a vector, so axb can't be orthogonal, but it can be orthogonal to a. Like a line in the x y plane can't be perpendicular, but it could be perpendicular to another line)

Hope this helps. If any of it isn't clear, reply and I can try to say it another way.(14 votes)

- Bro just became picasso for a moment then moved on(9 votes)
- Does this imply that vector a cross vector b is different to vector b cross vector a?(3 votes)
- Yes, they are different, but share a simple relation.
**a**x**b**= negative**b**x**a**.(5 votes)

- How is linear algebra used in economics?(3 votes)
- You can Google "linear algebra in economics" to get a more complete picture, but it's hard to understate the importance. For a single elementary example, here is a video using the Leontief input-output model to solve a problem.

https://youtu.be/-1jT5NOk93w(4 votes)

- How does one find a vector perpendicular to two linearly independent R5 vectors?(3 votes)
- Say we have two vectors
**x**= (x1, x2, x3, x4, x5) and**y**= (y1, y2, y3, y4, y5) that are linearly independent, and a vector**u**= (u1, u2, u3, u4, u5) is perpendicular to both. Then we know that**x**dot**u**= 0, and**y**dot**u**= 0. This gives a system of equations:

x1*u1+...+x5*u5 = 0

y1*u1+...+y5*u5 = 0

We have row reduction/gaussian elimination to efficiently solve such a system, and any solution (note there will be infinitely many solutions) this system will produce a vector**u**= (u1, u2, u3, u4, u5) that is perpendicular to both.(3 votes)

## Video transcript

We've learned a good bit
about the dot product. But when I first introduced it,
I mentioned that this was only one type of vector
multiplication, and the other type is the cross product, which
you're probably familiar with from your vector calculus
course or from your physics course. But the cross product is
actually much more limited than the dot product. It's useful, but it's
much more limited. The dot product is defined
in any dimension. So this is defined for any two
vectors that are in Rn. You could take the dot product
of vectors that have two components. You could take the dot product
of vectors that have a million components. The cross product is
only defined in R3. And the other, I guess, major
difference is the dot produc, and we're going to see this in a
second when I define the dot product for you, I haven't
defined it yet. The dot product results
in a scalar. You take the dot product
of two vectors, you just get a number. But in the cross product you're
going to see that we're going to get another vector. And the vector we're going to
get is actually going to be a vector that's orthogonal to
the two vectors that we're taking the cross product of. So now that I have you excited
with anticipation, let me define it for you. And you probably already have
seen this once or twice in your mathematical careers. Let's say I have the vector a. It has to be in R3, so
it only has three components: a1, a2 and a3. And I'm going to cross that with
the vector b and it has three components:
b1, b2 and b3. a cross b is defined
as a third vector. And now this is going to seem a
little bit bizarre and hard to essentially memorize because
this is a definition. But I'll show you how I think
about it when I have my vectors written in
this column form. If you watch the physics
playlist, I have a bunch of videos on the cross product
and I show you how I think about the cross product when I
have it in the i, j, k form. But when I have it like this,
the way you think about this first term up here, this is
going to be another three vector or another vector in R3,
so it's going to have 1, 2, 3 terms. For the first term, what you do
is you ignore these top two terms of this vector and then
you look at the bottom two and you say, a2 times b3
minus a3 times b2. And I've made a few videos on
determinants, although I haven't formally done them in
kind of this linear algebra playlist yet. But if you remember kind of
co-factor-- finding out the co-factor terms for when
you're determining the determinant or if you're just
taking the determinant for a 2x2 matrix, this might
seem very familiar. So this first term right here is
essentially the determinant of-- if you get rid of this
first row out of both of these guys right here, you take a2
times b3 minus a3 times b2. So it's a2 times b3
minus a3 times b2. That was hopefully pretty
straightforward. Now, not to make your life any
more complicated, when you do the second, when you do the
middle row, when you do this one right here, so you
cross that out. And you might want to do a1
times b3 minus a3 times b1. And that would be natural
because that's what we did up there. But the middle row you
do the opposite. You do a3 times b1 minus
a1 times b3. Or you can kind of view it as
the negative of what you would have done naturally. So you would have done
a1 b3 minus a3 b1. Now we're going to do
a3 b1 minus a1 b3. And that was only for
that middle row. And then, for the bottom
row, we cross that out again or ignore it. And we do a1 times b2, just like
we do with the first row. Times a2 b1. Or minus a2 b1. This seems all hard to-- and
it is hard to remember. That's why I kind of have to get
that system in place like I just talked to you about. But this might seem pretty
bizarre and hairy. So let me do a couple of
examples with you, just so you get the hang of our definition
of the dot product in R3. So let's say that I have the
vector-- let's say I'm crossing the vector. I have the vector 1,
minus 7, and 1. And I'm going to cross that
with the vector 5, 2, 4. So this is going to be equal
to a third vector. Let me get some space to
do my mathematics. So for the first element in
this vector, the first component, we just ignore the
first components of these vectors and we say minus 7
times 4 minus 1 times 2. And these are just regular
multiplication. I'm not taking the
dot product. These are just regular
numbers. Then for the middle term, we
ignore the middle terms here and then we do the opposite. We do 1 times 5 minus
1 times 4. Remember, you might have been
tempted to do 1 times 4 minus 1 times 5 because that's how we
essentially did it in the first term. But the middle term
is the opposite. And then finally, the third
term you ignore the third terms here and then you do it
just like the first term. You start in the top left. 1 times 2 minus 7. Put that in parentheses. Minus minus 7 times 5. And so that is equal
to-- let me see. What do we get? Minus 7 times 4. I don't want to make a careless
mistake here. That's minus 28. Minus 2. So this is minus 30 for
that first term. This one is 5 minus 4. 5 minus 4 is just 1. And then 2 minus minus 35. So 2 minus minus 35. That's 2 plus 35. That's 37. So there you go. Hopefully you understand at
least the mechanics of the cross product. So the next thing you're
saying well, OK. I can find the cross product
of two things. But what is this good for? What does this do for me? And the answer is, is that this
third vector right here, and depending on whether I stay
in the abstract case or whether this case with numbers,
this is orthogonal to the two vectors that we took
the cross product of. So this vector right here is
orthogonal to a and b. Which is pretty neat. If you just go think about the
last video when we were talking about normal vectors
to a plane, we can define a vector by-- we can define
a plane by two vectors. If we define a plane-- let's say
that I have vector a right there, and then I
have vector b. Let me do vector b like this. Those define a plane in R3. Let me define your plane. So all the linear combinations
of those two guys, that's a plane in R3. You can kind of view it
as they might form a subspace in R3. That forms a plane. If you take a cross b, you
get a third vector that's orthogonal to those two. And so a cross b will
pop out like this. It'll be orthogonal to both of
them and look like that. And so this vector right
there is a cross b. And you might say, Sal, how did
you know-- I mean, there's multiple vectors that
are orthogonal. Obviously, the length of the
vector, and I didn't specify that there, but it could pop
straight up like that or why didn't it-- you know, you just
as easily could have popped straight down like that. That also would be orthogonal
to a and b. And the way that a cross b is
defined, you can essentially figure out the direction
visually by using what's called the right hand rule. And the way I think about it
is you take your right hand and let me see if I can draw
a suitable right hand. Point your index finger
in the direction of a. So if your index finger is in
the direction of a and then I point my middle finger in
the direction of b. So my middle finger, in this
case, is going to go something like that. My middle finger is going to
do something like that. And then my other fingers
do nothing. Then my thumb will go in the
direction of a cross b. You could see that there. My thumb is in the direction
of a cross b. And assuming that you are
anatomically similar to me, then you still get
the same result. Let me draw it all. So this is vector a. Vector b goes in
that direction. Hopefully you don't have a
thumb hanging down here. You know that a cross b in this
example will point up and it's orthogonal to both. To kind of satisfy you a little
bit, that the vector's definitely orthogonal or that
this thing is definitely orthogonal to both of these,
let's just play with it and see that that definitely
is the case. And what is orthogonal? What is in our context, the
definition of orthogonal? Orthogonal vectors. If a and b are orthogonal, that
means that a dot b is equal to 0. Remember, the difference
between orthogonal and perpendicular is that
orthogonal also applies to 0 vectors. So these could also
be 0 vectors. Notice that I didn't say that
any of these guys up here had to be nonzero. Well, in a little bit, we'll
talk about the angle between vectors and then you have
to assume nonzero. But if you're just taking a
cross product, nothing to stop you from taking-- no reason
why any of these numbers can't be 0. But let me show you that
a cross b is definitely orthogonal to both a and b. I think that might be somewhat
satisfying to you. So let me copy a cross b here. I don't feel like
rewriting it. OK. Let me paste it. OK, bundle up little other
stuff with it. Let me take the dot product of
that with just my vector a, which was just a1, a2, a3. So what does the dot
product look like? That term times that, so it's
a1-- let me get some space. It's a1 times a2 b3 minus
a1 times that. Minus a1 times a3 b2. And then you have plus
this times this. So plus a2 times a3. So plus a2 times a3 times b1. And then minus a2 a1 b3. And then finally, plus-- I'll
just continue it down here. Plus a3 times a1 b2 minus
a3 times a2 b1. All I did I just took the
cross-- the dot product of these two things. I just took each of this. This guy times that was equal
to those two terms. That guy times that was equal to the next
two terms, equal to those two terms. And then this guy
times that was equal to those two terms. And if these guys
are really orthogonal, then this should be equal to 0. So let's see if that's
the case. So I have an a1 a2 b3, a
positive here, and then I'm subtracting the same
thing here. This is the same thing as a1 a2
b3, but it's just a minus. So that will cancel
out with that. Let's see, what else
do we have? We have a minus a1 a3 b2. We have a plus a1 a3 b2 there,
so these two are going to cancel out. And I think you see where
this is going. You have a positive a2 a3 b1 and
then you have a negative a2 a3 b1 there. So these will also cancel out. Now, I just showed you that
it's orthogonal to a. Let me show you that it's
orthogonal to b. Let me get another version of
my-- the cross product of the two vectors. Probably scroll down
a little bit. And let me go back. And let me multiply that
times the vector b. b1, b2 and b3. I'll do it here just so
I have some space. So b1 times this whole thing
right here is b1 a2 b3 minus b1 times this. Minus b1 a3 b2. Let me switch colors. And then b2 times this thing
here is going to be b2-- so it's going to be plus. This is all really one
expression, I'm just writing it on multiple lines. This isn't a vector. Remember, when you take the dot
product of two things, you get a scalar quantity. So plus b2 times this thing. So b2 a3 b1 minus b2 a1 b3. And then finally,
b3 times this. So plus b3 a1 b2
minus b3 a2 b1. So if these guys are definitely
orthogonal, then this thing needs to equal 0. And let's see if that's
the case. We have a b1, a2, b3. So b1 and a b3. b1 a2 b3, that's a positive
one and this is a negative one. You have a b3, an a2 and a b1
so that and that cancel out. Here you have a minus
b1 a3 b2. So you have a b1 and a b2. It's a minus b1 a3 b2. This is a plus the same thing. Just switching the order
of the multiplication. But these two are
the same term. They're just opposites of each
other, so they cancel out. And then finally, you have
a b2, an a1 and a b3. It's a negative. And then you have a positive
version of the same thing. So these two guys cancel out. So you see that this
is also equal to 0. So hopefully you're satisfied
that this vector right here is definitely orthogonal
to both a and b. And that's because that's
how it was designed. This is a definition. You could do a little bit of
algebra and you could have without me explaining this
definition to you, you could have actually come up with this
definition on your own. But obviously this was kind
of designed to have other interesting properties to it. And I'll cover those in the next
few videos, so hopefully you found that helpful.