Main content

# Proving vector dot product properties

## Video transcript

In this video, I want to prove some of the basic properties of the dot product, and you might find what I'm doing in this video somewhat mundane. You know, to be frank, it is somewhat mundane. But I'm doing it for two reasons. One is, this is the type of thing that's often asked of you when you take a linear algebra class. But more importantly, it gives you the appreciation that we really are kind of building up a mathematics of vectors from the ground up, and you really can't assume anything. You ready to prove everything for yourself. So the first thing I want to prove is that the dot product, when you take the vector dot product, so if I take v dot w that it's commutative. That the order that I take the dot product doesn't matter. I want to prove to myself that that is equal to w dot v. And so, how do we do that? Well, and this is the general pattern for a lot of these vector proofs. Let's just write out the vectors. So v will look like v1, v2, all the way down to vn. Let's say that this is equal to v. And let's say that w is equal to w1, w2, all the way down to wn. So what does v dot w equal? v dot to w is equal to-- I'll switch colors here-- v1 times w1. Plus v2 w2 plus all the way to vn wn. Fair enough. Now what does w dot v equal? Well w dot v-- you know, when I had made the definition, you just multiply the products. But I'll just do it in the order that they gave it to us. So it equals w1 v1 plus w2 v2. Plus all the way to wn vn. Now, these are clearly equal to each other because if you just match up the first term with the first term, those are clearly equal to each other. v1 w1 is equal to w1 v1. And I can say this now because now we're just dealing with regular numbers. Here we were dealing with vectors and we were taking this weird type of multiplication called the dot product. But now I can definitely say that these are equal because this is just regular multiplication. And this is just a commutative property. Let me see if I'm spelling commutative. We learned this in-- I don't know when you learned this, in second or third grade. So you know that those are equal and by the same argument you know that these two are equal. You could just rewrite each of these terms just by switching that around. That's just from basic multiplication of scalar numbers, of just regular real numbers. So that's what tells us that these two things are equal or these two things are equal. So we've proven to ourselves that order doesn't matter when you take the dot product. Now the next thing we could take a look at is whether the dot product exhibits the distributive property. So let me just define another vector x here. Another vector x and you can imagine how I'm going to define it. x1, x2, all the way down to xn. Now, what I want to see if the dot product deals with the distributive property the way I would expect it to, then if I were to add v plus w and then multiply that by x. And first of all, it shouldn't matter what order I do that with. I just showed it here. I could do x dot this thing. It shouldn't matter because I just showed you it's commutative. But if the distribution works, then this should be the same thing as v dot x plus w dot x. If these were just numbers and this was just regular multiplication, you would multiply by it by each of the terms, and that's what I'm showing here. So let's see if this is true for the dot product. So what is v plus w? v plus w is equal to-- we just add up each of their corresponding terms. v1 plus w1, v2 plus w2, all the way down to vn plus wn. That's that right there. And then when we dot that with x1, x2, all the way down to xn, what do we get? Well we get v1 plus w1 times x1 plus v2 plus w2 times x2 plus all the way to vn plus wn times xn. I just took the dot product of these two. I just multiplied corresponding components and then added them all up. That was the dot product. This is v plus w dot x. Let me write that down. This is v plus w dot x. Now, let's work on these things up here. Let me write it over here. What is v dot x? v dot x, we've seen this before. This is just v1 x1. No vectors now. These are just actual components. Plus v2 x2, all the way to vn xn. What is w dot x? w dot x is equal to w1 x1 plus w2 x2, all the way to wn xn. Now what do you get when you add these two things? And notice, here I'm adding two scalar quantities. That's a scalar. That's a scalar. We're not doing vector addition anymore. So this is a scalar quantity and this is a scalar quantity. So what do I get when I add them? So v dot x plus w dot x is equal to v1 x1 plus w1 x1 plus v2 x2 plus w2 x2, all the way to vn xn plus wn xn. I know, it's very monotonous. But you could immediately see we're just dealing with regular numbers here. So we can take the x's out and what do you get? Let me write it here. This is equal to-- we could just take the x out, factor the x out. v1 plus w1, x1 plus v2 plus w2 x2, all the way to vn plus wn xn. Which we see this is the same thing as this thing right here. So we just showed that this expression right here, is the same thing as that expression or the distribution-- the distributive property seems to or does apply the way we would expect to the dot product. I know this is so mundane. Why are we doing this? But I'm doing this to show you that we're building things up. We couldn't just assume this. But the proof is pretty straightforward. And in general, I didn't do these proofs when I did it for vector addition and scalar multiplication, and I really should have. But you can prove the commutativity of it. Or for the scalar multiplication you could prove that distribution works for it doing a proof exactly the same way as this. A lot of math books or linear algebra books just leave these as exercises to the student because it's mundane, so they didn't think it was worth their paper. But let me just show you, I guess, the last property, associativity, the associative property. So let me show you. If I take some scalar and I multiply it times v, some vector v. And then I take the dot product of that with w, if this is associative the way multiplication in our everyday world normally works, this should be equal to-- and it's still a question mark because I haven't proven it to you. It should be equal to c times v dot w. So let's figure it out. What's c times the vector v? c times the vector v is c times v1, c times v2, all the way down to c times vn. And then the vector w, we already know what that is. So dot w is equal to what? It's equal to this times the first term of w. So c v1 w1 plus this times the second term of w, c v2 w2, all the way to c vn wn. Fair enough. That's what this side is equal to. Now let's do this side. What is v dot w? I'll write it here. We've done this multiple times. This is just v1 w1 plus v2 w2, all the way to vn wn. I'm getting tired of doing this and you're probably tired of watching it, but it's good to go through the exercises. You know, if someone asked you to do this now, you'll be able to do this. Now what is c times this? So if I multiply some scalar times this, that's the same thing as multiplying some scalar times that. So I'm just multiplying a scalar times a big-- this is just the regular distributive property of just numbers, of just regular real numbers. So this is going to be equal to c v1 w1 plus c v2 w2 plus all the way to c vn wn. And we see that this is equal to this because this is equal to this. Now the hardest part of this-- I remember when I first took linear algebra, I found when the professor would assign, you know, prove this. I would have trouble doing it because it almost seems so ridiculously obvious. That hey, well, obviously if you just look at the components of them, it just turns into multiplying of each individual component and adding them up and those are associative, so that's obviously-- what's there to prove? And it only took me a little while that they just wanted me to write that down. They didn't want something earth shattering. They just wanted me to show when you go component by component and all you have to do is assume kind of the distributive or the associative or the commutative property of regular numbers, that you could prove the same properties also apply in a very similar way, to vectors and the dot product. So hopefully you found this reasonably useful and I'll see you in the next video where we could use some of these tools to actually prove some more interesting properties of vectors.