Main content

## Linear algebra

### 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

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Vector triple product expansion (very optional)

A shortcut for having to evaluate the cross product of three vectors. Created by Sal Khan.

## Want to join the conversation?

- At10:10, you were doing the component j, should it be negative, not positive??(19 votes)
- In short, no. The sign swap business that happened with the first j was due to the fact that he is computing the determinant using the method of cofactors. So it's not something special about j, but rather a step in properly computing the determinant. So, if you properly compute the determinant of the second (big) matrix to get a x b x c, you'll get the result shown at10:10.

Try it... it's a fun exercise. It's much more satisfying to do it yourself rather than watch someone else "smarter than you" do it on a blackboard. Once you've done it, then you're the smart one.(30 votes)

- Two cross products gives us a scalar! How is it possible?(9 votes)
- It is quite natural to get confused and view it as a scalar because our mind has got into this habit of viewing any dot product as a scalar. But if you look carefully and analyse, you will realise that it is not a scalar. It is difference of two vectors scaled by dot products. I.e

b.(a.c) - c.(a.b). ---- (1)

Suppose, I call the dot products a.c as m and a.b as n. (Note here m and n are scalars)

Then (1) can be written as

bm - cn

(Vector b scaled by m minus vector c scaled by n )

So it turns out to be difference of two scaled vectors and not a scalar as you view it to be. I hope this answer helped. :)(22 votes)

- how can i simply remember a x (b x c)?(5 votes)
- Where does Sal do videos on determinants? I cannot find it in this playlist.(6 votes)
- When Sal says multiply b and c by the dot products of a and c and a and b at13:31(b(a dot c) - c(a dot b)) what does he mean by multiply?(5 votes)
- Scalar multiplication of the vector b with the scalar (a dot c) and so on(8 votes)

- Is vector multiplication associative? For instance, in the video, does it matter if it's
**a**X (**b**X**c**), (**a**X**b**) X**c**, or**a**X**b**X**c**, or are they all equal?(4 votes)- Unfortunately it is not. If you want to, just use some simple vectors and try it yourself. First calculate b x c and then a x the result. And then calculate a x b and take the result x c.(7 votes)

- How to find product of 3 expressions in optional math?(5 votes)
- If a x (b x c) = b(a⋅c) - c(a⋅b), then (b x c) x a = ? and (a x b) x c = ?

I know that cross products are neither commutative nor associative.(2 votes)- You're right that it isn't commutative, but the good news is that it is what we call
*anti-commutative*. That is, a x b = -(b x a). You can plug that into the formula and see it for yourself, or just use the right hand rule and the proof from two videos ago to see that b x a has the same magnitude and opposite direction as a x b.

Using that and the formula from this video, you can evaluate the two expressions you are interested in.(6 votes)

- Can we practice some problems somewhere here?(2 votes)
- Sadly there are no exercises for Linear algebra :/

Nor are there for Differential equations and Multivariable calculus.(6 votes)

- why don't b.(a.c) and c.(a.b) cancel out?(3 votes)
- Why would they? We're taking the dot product of two different sets of vectors and using the results to scale two different vectors before subtracting the different results.(3 votes)

## Video transcript

What I want to do
with this video is cover something called the
triple product expansion-- or Lagrange's
formula, sometimes. And it's really just
a simplification of the cross product
of three vectors, so if I take the cross product
of a, and then b cross c. And what we're
going to do is, we can express this really
as sum and differences of dot products. Well, not just
dot products-- dot products scaling
different vectors. You're going to see what I mean. But it simplifies this
expression a good bit, because cross products
are hard to take. They're computationally
intensive and, at least in my
mind, they're confusing. Now this isn't
something you have to know if you're going to
be dealing with vectors, but it's useful to know. My motivation for
actually doing this video is I saw some problems for the
Indian Institute of Technology entrance exam that seems to
expect that you know Lagrange's formula, or the triple
product expansion. So let's see how we
can simplify this. So to do that,
let's start taking the cross product of b and c. And in all of these
situations, I'm just going to assume--
let's say I have vector a. That's going to be a,
the x component of vector a times the unit of vector i
plus the y component of vector a times the unit vector j
plus the z component of vector a times unit vector k. And I could do the same
things for b and c. So if I say b sub y,
I'm talking about what's scaling the j component
in the b vector. So let's first take this
cross product over here. And if you've seen me
take cross products, you know that I like to do
these little determinants. Let me just take it over here. So b cross c is going to be
equal to the determinant. And I put an i, j, k up here. This is actually the definition
of the cross product, so no proof necessary to
show you why this is true. This is just one way to
remember the dot product, if you remember how
to take determinants of three-by-threes. And we'll put b's x
term, b's y coefficient, and b's z component. And then you do the same
thing for the c, cx, cy, cz. And then this is going
to be equal to-- so first you have the i component. So it's going to be the
i component times b. So you ignore this
column and this row. So bycz minus bzcy. So I'm just ignoring
all of this. And I'm looking
at this two-by-two over here, minus bzcy. And then we want to
subtract the j component. Remember, we alternate signs
when we take our determinant. Subtract that. And then we take out
that column and that row, so it's going to be bxcz--
this is a little monotonous, but hopefully, it'll have
an interesting result-- bxcz minus bzcx. And then finally,
plus the k component. OK, we're going to have
bx times cy minus bycx. We just did the dot product, and
now we want to take the-- oh, sorry, we just did
the cross product. I don't want to
get you confused. We just took the cross
product of b and c. And now we need take the
cross product of that with a, or the cross product of a with
this thing right over here. So let's do that. Instead of rewriting
the vector, let me just set up
another matrix here. So let me write
my i j k up here. And then let me
write a's components. So we have a sub x,
a sub y, a sub z. And then let's clean
this up a little bit. Let's ignore this. We're just looking at-- no,
I want to do that in black. Let's do this in black, so
that we can kind of erase that. Now this is a
minus j times that. So what I'm going
to do is I'm going to get rid of the
minus and the j, but I am going to rewrite
this with the signs swapped. So if you swap the signs,
it's actually bzcx minus bxcz. So let me delete
everything else. So I just took the negative
and I multiplied it by this. I hope I'm not making any
careless mistakes here, so let me just check and make
my brush size little bit bigger, so I can erase that a
little more efficiently. There you go. And then we also want to get
rid of that right over there. Now let me get my brush size
back down to normal size. All right. So now let's just take
this cross product. So once again, set it
up as a determinant. And what I'm only
going to focus on-- because it'll take the video,
or it'll take me forever if I were to do the i,
j, and k components-- I'm just going to focus
on the i component, just on the x component
of this cross product. And then we can
see that we'll get the same result for
the j and the k. And then we can see
what, hopefully, this simplifies down to. So if we just focus on
the i component here, this is going to be
i times-- and we just look at this two-by-two
matrix right over here. We ignore i's column, i's row. And we have ay
times all of this. So let me just multiply it out. So it's ay times bxcy, minus
ay times by, times bycx. And then we're going
to want to subtract. We're going to have
minus az times this. So let's just do that. So it's minus, or
negative, azbzcx. And then we have a
negative az times this, so it's plus azbxcz. And now what I'm
going to do-- this is a little bit of a
trick for this proof right here, just so that we
get the results that I want. I'm just going to add and
subtract the exact same thing. So I'm going to add an axbxcx. And then I'm going to subtract
an axbxcx, minus axbxcx. So clearly, I have not
changed this expression. I've just added and
subtracted the same thing. And let's see what
we can simplify. Remember, this is
just the x component of our triple product. Just the x component. But to do this,
let me factor out. I'm going to factor out a bx. So let me do this,
let me get the bx. So if I were to
factor it out-- I'm going to factor it out of
this term that has a bx. I'm going to factor
it out of this term. And then I'm going to
factor it out of this term. So if I take the bx out,
I'm going to have an aycy. Actually, let me write it
a little bit differently. Let me factor it out
of this one first. So then it's going
to have an axcx. a sub x, c sub x. So I used this one up. And then I'll do this one now. Plus, if I factor the
bx out, I get ay cy. I've used that one now. And now I have this one. I'm going to factor the bx out. So I'm left with a plus az, cz. So that's all of those. So I've factored that out. And now, from these
right over here, let me factor out a negative cx. And so, if I do that-- let me go
to this term right over here-- I'm going to have an axbx
when I factor it out. So an axbx, cross that out. And then, over here, I'm
going to have an ayby. Remember, I'm factoring
out a negative cx, so I'm going to have
a plus ay, sub by. And then, finally, I'm going
to have a plus az, az bz. And what is this? Well, this right
here, in green, this is the exact same thing as
the dot products of a and c. This is the dot product
of the vectors a and c. It's the dot product of
this vector and that vector. So that's the dot
of a and c times the x component
of b minus-- I'll do this in the same--
minus-- once again, this is the dot product of
a and b now, minus a dot b times the x component of c. And we can't forget,
all of this was multiplied by the unit vector i. We're looking at the x
component, or the i component of that whole triple product. So that's going
to be all of this. All of this is times
the unit vector i. Now, if we do this exact
same thing-- and I'm not going to do it, because
it's computationally intensive. But I think it won't be a
huge leap of faith for you. This is for the x component. If I were to do the exact same
thing for the y component, for the j component--
so it'll be plus-- if I do the same thing
for the j component, we can really just
pattern match. We have bx, cx, that's
for the x component. We'll have by and c y
for the j component. And then this is not
component-specific, so it will be a dot c over here,
and minus a dot b over here. You can verify any of
these for yourself, if you don't believe me. But it's the exact same
process we just did. And then, finally, for the z
component, or the k component-- let me put parentheses
over here-- same idea. You're going to have bz, cz. And then you're going to
have a dot b over there. And then you're going to
have a dot c over here. Now what does this become? How can we simplify this? Well, this right over here,
we can expand this out. We can factor out
an a dot c from all of these terms over here. And remember, this is going
to be multiplied times i. Actually, let me not
skip too many steps, just because I want you
to believe what I'm doing. So if we expand the i here--
instead of rewriting it, let me just do it like this. It's a little bit
messier, but let me just-- so I could write this i
there and that i there. I'm kind of just distributing
that x unit vector, or the i unit vector. And let me do the
same thing for j. So I could put the j there. And I could put the
j right over there. And then I could do the
same thing for the k, put the k there, and
then put the k there. And now what are these? Well, this part right
over here is exactly the same thing as
a dot c times-- and I'll write it
out here-- bx times i plus by times j,
plus bz times k. And then, from that,
we're going to subtract all of this, a dot b. We're going to subtract a dot
b times the exact same thing. And you're going to
notice, this right here is the same
thing as vector b. That is vector b. When you do it over here,
you're going to get vector c. So I'll just write it over here. You're just going
to get vector c. So just like that, we
have a simplification for our triple product. I know it took us a
long time to get here, but this is a simplification. It might not look like one,
but computationally it is. It's easier to do. If I have-- I'll try to
color-code it-- a cross b cross-- let me do it in
all different colors-- c, we just saw that this is going
to be equivalent to-- and one way to think about it is,
it's going to be, you take the first vector times the dot
product of-- the first vector in this second dot
product, the one that we have our
parentheses around, the one we would have
to do first-- you take your first vector there. So it's vector b. And you multiply that times the
dot product of the other two vectors, so a dot c. And from that, you subtract
the second vector multiplied by the dot product of the
other two vectors, of a dot b. And we're done. This is our triple
product expansion. Now, once again,
this isn't something that you really have to know. You could always,
obviously, multiply it. You could actually
do it by hand. You don't have to know this. But if you have
really hairy vectors, or if this was some type
of math competition, and sometimes it simplifies
real fast when you reduce it to dot products, this is
a useful thing to know, Lagrange's formula, or the
triple product expansion.