 Welcome to the second of these videos. We're going to look here at the vector dot product, also called the scalar product. We'll look at also the magnitude of a vector and the meaning of unit vectors, the geometric meaning of the dot product, and finding the angle between vectors using the dot product. Okay, so the dot product is a way of combining two vectors in order to produce a number, a simple number, a scalar, hence the alternate name, scalar product. Let's give ourselves a couple of vectors. Let's have a, well, a vector a can be 4 minus 4, let's have 2, 1. And we'll have a vector b, which can be 3, 1, 3. And we're going to do the dot product of these two guys. So we write that as vector a, a nice, nice, clear central dot vector b. And then we write that out as the two column vectors. And we need to understand how we compute the dot product. And the answer is, we're simply going to multiply each component by its opposite number, and then add them up. So we're going to multiply the first component minus 4 by 3. And then add that to the second component 2 multiplied by its opposite number 1, and finally the third components 1 and 3. So that's minus 4 times by 3. Added on to 2 times by 1, added on to 1 times by 3. So minus 12, plus 2, plus 3, that's going to be minus, minus 7. All right, there's the dot product worked out, pretty straightforward. And of course, as you can see, it can be a minus number. It can be 0, it can be a positive number. But it's a simple, pure number. Okay, so now let's see what happens if we do the dot product of a vector with itself. Let's do a dotted with itself. So there's going to be minus 4 to 1 dotted with minus 4 to 1. Now of course, because we're multiplying each component by itself, that will always be a positive number, 16, minus 4 by minus 4, and 2, 2 to 4, and 1, 1 is 1. And so that's going to add up to 21. It must add up to a positive number. It's made of three positive numbers summed. Now I want to introduce a second vector called a hat. It's related to a just by scaling it, and we're going to scale it by 1 over the square root of the earlier dot product with itself. So 1 over square root 21, and then just minus 4, 2, 1 as before. So that's just a scaled version of a. What's interesting about it? Well now let's see what happens if we take the dot product of a hat with a hat with itself. So we're going to get 1 over square root of 21 times 1 over square root of 21, which is 1 over 21. And then of course we're going to get a dotted with a, the original dot product we did, which is just 21 as we know. So of course the dot product of a hat with itself is just 1. That means that a hat has a special property. It's what's called a unit vector. Unity being of course a fancy word for the number 1. So when we scale a vector, so that when dotted with itself it comes out as 1, then it is a unit vector. Meanwhile, in general for a vector the square root of the dot product with itself has the name magnitude. This is the magnitude of a vector, and it is also magnitude. It is also the length of the arrow if we think in terms of a vector as a physical displacement and arrow that lives in three dimensional space. Then it would be the length of that arrow, as you can see from Pythagoras. Okay, now then, a different thing. The dot product between two vectors has an alternative definition, which we can show is the same as the definition we've been using so far. a dot b is also the magnitude of a times the magnitude of b times cos of some angle, and what is that angle? It's actually just the angle between the two vectors, between their directions. So here I'm drawing a vector a going in one direction and almost in the opposite direction vector b. And then the angle in question would be this angle that we see between the two vectors when we draw them coming from a common point of origin. Okay, so it's important to understand then that this angle can be more than 90 degrees. Here's what it isn't. Here's a mistake that's sometimes made by people as they start to play with the vectors. They want the angle for some reason they want it to be less than 90 degrees. So they try and contrive this by putting the vectors together in a way that will give them less than 90 degrees like this, for example. And then we could try and draw an angle between these two lines. Let's see, like, let's use a red to show that it's not correct. What we should have is the two vectors coming from a common origin. Then we see that the angle between them can be more or less than 90 degrees. If it was exactly 90 degrees, then of course the dot product would be zero because cos of 90 is zero. That has interesting consequences. But right now let's work out the angle between a couple of vectors. Let's give ourselves A, we'll make it 1, 0, minus 1, and B. We're going to make it 4, 1, minus 1. And we'll do the dot product between those guys. So first we'll work out the dot product. Actually, let's make it minus 1. So A can be minus 1, 0, minus 1. I think that will come out better. So we have minus 4 from minus 1 times 4. We have 0 times 1 is 0, and we have minus 1 times minus 1 is 1. So it's going to be minus 3 for the total dot product between these two guys. But we also need to find out the magnitude. Fair enough, magnitude of A is going to be the square root of minus 1 times minus 1, and again, 1. So that will be the square root of 2. Nice and straightforward. Meanwhile, the magnitude of B is going to be 4, 4 is a 16, plus 1, plus 1. It's going to be 18, the square root of 18. But I think we can do better than that. Square root of 18 is actually square root of 9 times the square root of 2. And that means it's 3 times the square root of 2. Okay, now we've got everything we need. Let's pull down a copy of that definition there relating A dot B to its magnitudes in the angle and fill in what we know for this particular choice of A and B. We've got minus 3 is therefore equal to root 2 times 3 root 2 times cos of the angle that we're after. So now we just need to rearrange. That means that cos of the angle is going to be equal to minus 3 divided by, well, we've got two lots of root 2, so that's just me 3 times 2. And if we simplify that down to just be minus 1 half. Now we may just remember or use a calculator to find out. This means that the angle in question is in fact going to be simply 120 degrees. Or you can use radians if you prefer radians. So there we are. That's the answer. The angle between these two vectors, 120 degrees. And that's it for the second video.