If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# The dot product

## Video transcript

let's learn a little bit about the dot product the dot product frankly out of the two ways of multiplying vectors I think it's the easier one so what is the dot product do if one I'll give you the definition and then I'll give you the intuition so if I have two vectors to vectors let's say vector a vector a dot vector B that's how I draw my arrows like a drop my arms like that that is equal to the magnitude of vector a times the magnitude of vector B times cosine of the angle between them now where does this come from this might seem a little arbitrary but I think with a visual explanation we'll make a little bit more sense so let me draw arbitrarily these two vectors so that is my vector a nice big and fat vector it's good for showing the point and let me draw a vector B like that vector B and then let me draw the cosine or let me at least draw the angle between them this is Theta so there's two ways of viewing this you could view let me let me label them this is vector a I'm trying to be color consistent this is vector B so there's two ways of viewing this this product you could view it as vector a because you can you know multiplication is associative you could switch the order so this could also be written as the magnitude of vector a times cosine of theta times cosine of theta times and I'll do it in color appropriate times vector B and this times isn't the dot product I almost don't have to write it there's just regular multiplication because these are all scalar quantities when you see the dot between vectors you're talking about the vector dot product so if we just rearrange this expression this way what does it mean what is a cosine of theta let me ask you a question if I were to drop a right angle right here perpendicular to B so let's just drop right angle there cosine of theta sohcahtoa sohcahtoa so cosine is equal to adjacent over hypotenuse right well what's the adjacent it's equal to this and the hypotenuse is equal to the magnitude of a right so let me rewrite that so cosine of theta and all this applies to the a vector cosine of theta of this angle is equal to adjacent which is I don't know what you could call this let's call this the projection of a onto B right it's like if you were to shine a light perpendicular to B if you there was like a light source here and adjust the light show what was straight down it would be the shadow of a on to B or you could almost think of it is the part of a that goes in the same direction of B so this this projection they call it and at least the way I get the intuition of what a projection is I kind of view it as a shadow if you had a if you had a light source it came up perpendicular what would be the shadow of that vector onto this one so if you think about it this shadow right here we could call that the projection of a onto B or I don't know let's just call it a sub B and it's the magnitude of it right it's how much of vector a goes on vector B over a Jace that's the adjacent side over the hypotenuse the hypotenuse is just the magnitude of vector a right there's just our basic calculus or another way you could view it just multiply both sides by the magnitude of vector a you get the projection of a onto B which is just a fancy way of saying this side the part of a that goes in the same direction as B is another way to say is equal to just multiplying both sides times the magnitude of a is equal to the magnitude of a cosine of theta which is exactly what we have up here and the definition of the dot product so another way of visualizing the dot product is you can replace this term with the magnitude of the projection of a onto B which is just this times the magnitude of B that's interesting so what it all the dot product of two vectors is it says well let's just take one vector let's figure out how much of that vector what component of its magnitude goes in the same direction as the other vector and let's just multiply them and where is that useful well think about it what about work when we learn work in physics work is Force Times distance but it's not just the total force times the total distance it's the force going in the same direction as the distance so if I have a you should review the physics playlist if you're watching this within the calculus playlist but let's say I have a I don't know it's a 10 10 to Newton 10 Newton object it's sitting on ice so there's no friction we don't want to worry about friction right now and let's say I pull on it let's see my force vector this is my force vector let's say my force vector is my force vector is I don't know 100 Newtons I'm making numbers up 100 Newtons and let's say the and that's a I pull it I slide it to the right so my distance vector is I don't know 10 meters my distance vector is 10 meters parallel to the ground and the angle between them is equal to I don't know 60 degrees which is the same thing as PI over 3 let's stick in well say to do degrees it's a little more intuitive it's 60 degrees so my question this this distance right here is 10 meters so my question is by pulling on this you know rope or whatever at this angle at the 60 degree angle with a force of 100 Newtons and pulling this block to the right for 10 meters how much work am i doing well work is force times the distance but not not just the total force the magnitude of the force in the direction of the distance so it actually turns so what's the magnitude of the force in the direction of the distance it would be the component it would be the horizontal component of this forest vector right so it would be 100 Newton's times the cosine of 60 degrees and would tell you how much of that hundred Newton's goes to the right or another way you could view it if this is the force vector and that this down here is the distance vector you could say that the total work you performed is equal to the force vector dot the distance vector so time using the dot product the dot product of the force in the distance vector and we know that the definition is the magnitude of the force vector which is 100 Newton's times the magnitude of the distance vector which is 10 meters times the cosine of the angle between them cosine of the angle is 60 degrees so that's equal to 1000 Newton meters Newton meters times cosine of 60 cosine of 60 is what its square root of 3 over 2 right cosine of yep square root of 3 over 2 if I remember correctly so times the square root of 3 over 2 so the 2 this becomes 500 so it becomes 500 square roots of 3 joules whatever that is I know 700 something I'm guessing maybe it's 800 something I'm not quite sure but the important thing to realize is that the the dot product is useful it applies to work it actually calculates what component of what vector goes in the other direction now you can interpret it the other way you could say this is the magnitude of a times B cosine of theta and that's completely valid and what's B cosine of theta well if you took B cosine of theta and you could work this out as an exercise for yourself that's the amount of the magnitude of the B vector that's going in the a direction so it doesn't matter what order you go so contrary you know and when you take the cross-product it matters whether you do a cross B or B cross a when you're doing the dot product it doesn't matter one order so B cosine theta would be the magnitude of vector B that goes in the direction of a so if you were to draw a perpendicular line here drop a perpendicular B cosine theta would be this vector that would be B cosine theta the magnitude of B cosine theta so you could say how much of BEC vector B goes in the same direction as a and then multiply the two magnitudes or you could say how much of vector a goes in the same direction as vector B and then multiply the two magnitudes and now this is I think a good time to just make sure you understand the difference between the dot product and the cross product the dot product ends up with just a number you multiply two vectors and all you have is a number you don't have it you end up with just a scalar quantity and why is that interesting well it tells you it just it tells you how much do these do these you can almost say these vectors reinforce each other because it's you're taking their magnitudes the parts of their magnitudes that go in the same direction and multiplying them the cross product is actually almost the opposite you're taking the orthogonal components right the difference was this was a sine of theta and I don't want to mess you up this picture too much but you should review the cross product videos and I'll do another video where I actually compare and contrast them but the cross product is you're saying let's multiply the magnitudes of the vectors that are perpendicular to each other that aren't going in the same direction that are actually orthogonal to each other and then you have to pick a direction since you're not saying well the same direction that you know they're both going in here actually so you're picking the direction that's orthogonal to both vectors and then that's why the or the the orientation matters you have to take the right-hand rule because there's actually two vectors that go that are perpendicular to any other two vectors in three dimensions anyway I'm all out of time I'll continue this hopefully not too confusing discussion in the next video I'll compare and contrast the cross product and the dot product see in the next video