Hi, everyone. Welcome back. This is our lecture on the dot-product and the cross-product, and what both of these attempts to do is try to define some multiplication on vectors. We'll see why both fail in their own regard and why you do need two of them to try to get at this idea of multiplication of vectors. First off, let's define the dot product. We're going to start with some vector a and we're going to just give it some generic a_1 components here, a_2, and a_3. Then let's also start with some other vector b, and let's give it some generic components, b_1, b_2, and b_3. Great. We then define the dot product between the two vectors, appropriately written with a dot, to be the sum of the product of the components. What does that mean? You take the first components, multiply them together, so a_1 times b_1, then you add it to the product of the next components, and you add that to the product of the third component, so a_3 and b_3. This is called the dot product. It is important to note that this is some number. When I multiply these two vectors, I'm not going to use the word multiply, but you can think of it this way with a little dot. It's important to read this. When you do read this, you say dot to stress that it is not multiplication. We reserve multiplication for numbers and we say dot product for vectors, but this is a number. That's part of the reason why it's not a great way to multiply. You have this wonderful vector with a force, magnitude, and direction. You have another vector with a magnitude and direction. You do this operation, you get back a little number, you lose the structure of vectors. Let's do a quick example just to see this with some real numbers here. Let's take 1, 2, 3. Again, bonus points for originality here, 4, 5, 6. Why not? I want a dot product. Some students do make mistake of handing back a vector. It's important to realize this is going to be a number. If you don't give me back a number here, something went amiss. Anyway, what do we do? We take 1 and multiply it by 4, we take 2 and multiply it by 5, and we take 3 and multiply it by 6. Clean it up. 4 plus 10 plus 18, 28 plus 4, 32. Just a couple of properties of dot products that I think it's easy to see. If you take the 0 vector, 0 vector is the vector with all zeros in its components, anything dot the 0 vector is always zero. Here's the relation to the last video. If I take a vector and dot it with itself, so I take the dot product of vector and itself, you get back the components of itself squared, so a_1 squared plus a_2 squared plus a_3 squared. That should look a little bit familiar. We saw this when we took the length. Only the length had a square root, so to get rid of it, we will square it. The vector dot itself is the length squared. There's relationship between dot products and lengths. One more property, that if I take a vector a and vector b, and I do a dot product, then the order does not matter. You can take the dot, you can see that from the formula, it doesn't matter which one comes first. This is commutative. We say dot product is commutative. Another special thing about the dot product is that it has an alternate formula. This is version number 2. Another way to look at the dot-product, if I have a.b, this is the magnitude of a times the magnitude of b times the cosine of Theta, where Theta is the angle between the two vectors. If I have a and b floating around where they live, they'll always be a little angle Theta between the two vectors. Notice how I read this. If I have a, I said magnitude of a times the magnitude of b. You need to realized that the magnitude is a number, which is the length of a times length of b. I really want to say that a.b is equal to the magnitude of a times the magnitude of b times cosine of the angle between them. Working this out is an unpleasant journey through trig, which, I guess, we'll skip some of that for now, but you can believe me that this is the formula. If you want to investigate a quick search on dot products, we'll show you how this formula is derived, but one thing to note is that it just gives an alternative form of it. I still, to this day, whenever I see D for dot-product, and I always say, well, I know it's the magnitudes because I need numbers and then is it sine or cosine? Well, so it's DC. I always say Washington DC is my little mnemonic to help remember that the alternate formula for the dot product involves a cosine. What's nice about this formula is that you can use it to rearrange. For example, find the angle between the vector x, which is 4, 0, and 2. The vector y, which is 2 minus 1, 0. You can rearrange things to find the angle between two vectors. This turns out to be a useful thing. How do we rearrange some things here? Well, I can solve for cosine of Theta, and get that that is a.b divided by the products of the magnitudes. I have to get all this information, which I'll do in a second. Then one last piece, you can solve for Theta by get all the cosine inverse to our cosine, so a.b divided by the magnitude of a times the magnitude of b. This is a nice little formula that comes from the alternate formula of the dot product. If I want to just do an example just so you can see some numbers behind this, let's go ahead and solve this thing. I guess I'll call them x and y, but it doesn't matter. We take the dot product, I think of this as a, I think of this as b. First let's take the dot product. Let's find a.b. If you want, pause the video, work it out, just practice, which you get 8 plus 0 plus 0. Of course, that's just eight. That was good on a.b. I want the magnitude of a, I'm going to need that number from my denominator. That's the square root of 4 squared plus 0 squared plus 2 squared. It's 16 plus 4, that's 20. Then I want the magnitude of the second vector, and that's the square root of 2 squared plus minus 1 squared plus 0 squared. That's 4 plus 1, good old root 5. Let's put it all together. I have Theta will equal arc cosine of a.b, we said that was 8, divided by the magnitudes put together, so that's root 20 times root 5 cosine of 8 over root 100, which, of course, is our cosine of 8 over 10 or 4/5, which running over to the calculator is about 6.64. Let's say four radians, we do most things on radians. Let's leave it in radians. But you can find the angle between two vectors. You can imagine that's pretty important. One last definition if I can squeeze it here in the bottom of this slide, is if the angle between two vectors is Pi over 2 or 90 degrees, of course, then we say that the vectors are orthogonal. Think about this for a second. You know this is another word. If I say to you, two things meet at a right angle, and Pi over 2 or 90 degrees, prior you would say that they're perpendicular. Perpendicular is usually reserved for lines. Also, it's specific to the plane. If I have vectors inside of our three we're going to say that they are orthogonal vectors. Any two vectors that meet at a right angle are orthogonal. For example, perhaps i and j is a nice little example, but there are lots of them. New words, new formulas for you. Let's give the second type of way to multiply vectors called the cross product. The definition, we're going to define the cross product, and again, we read this as a cross b. We don't say times, times is for numbers, a cross b. Here's what I'm going to write. I'm going to put, this will make sense in a second so bear with me, i, j, k, my vector a, a_1, a_2, and a_3, my vector b, b_1, b_2, and b_3, whatever the numbers are, whatever the components are, I'll put the formula down in general and then we'll do a product, then we'll do an example. It's going to be found by taking i times, we do a little x down here, a_2 times b_3 minus a_3 times b_2. We do a little x down here, and then we move over to j. Now this is important. It's minus j, so it goes plus for i, minus for j. I and j are your standard vectors. We do the same thing, so we make a little x, but you imagine that the row and column with j is removed. I'm only looking at a_1, b_3 minus a_3, b_1. Last but not least is k, same idea. We imagine that the column with k is removed, so we have this little box in the first two columns, and that's we do our little x, a_1, b_2 minus a_2, b_1. It's a nasty formula, but what ends up happening is you start following the pattern more so than memorizing the formula. Let's just jump to an example with some actual numbers. Let's say that the vector a is 1, 2, and a 0, and then we'll say the vector b will be 0, 3. Let's find their cross-product, so a cross b. As you work you do, i, j, and k, give yourself some room. We throw a, across the middle, so 1, 2, 0 and b goes last, but not least, along the bottom row, so 0, 3, 1. Here we go. I take the vector i, and now I imagine it's going to take my finger cover up the first column, and I do my x pattern, with the remaining two columns so its 2 times 1 minus 0 times 3. You should draw a little x with your finger as as you do this. 2 minus 0, which of course is just 2, be careful, minus j. I can imagine the middle row is completely gone, you don't even see it. You're looking at 1, 0 and 0, 1. Do your x pattern. It's 1 times 1 minus 0 times 0, it's a fancy way to say 1 of course, and then plus k. Same thing, so imagine that third column is gone, and we're just looking at the first four numbers. I have to my x pattern, 1 times 3 minus 2 times 0, 1 times 3 minus 2 times 0 is just 3. Put it all together and you have, i times 2 minus j times 1 plus k times 3. Remember i, j and k, they just replace holders for your components. You have 2 minus 1 and 3. It's important to notice that when you have a cross-product, the answer is a vector. This is one of the things that distinguishes it from the dot-product. If I take a dot product of two vectors, I get back a scalar. If I take the cross-product of two vectors, I get back a vector. They say, "Well, this is great, shouldn't this be the best thing? Shouldn't this be the multiplication?" Well, not so much and you'll see why in a second. Let's look at a vector dot itself. Let's set this up. Let's call the components a_1, a_2 and a_3. I do i, j, k, a_1, a_2, a_3, whatever the numbers are, and a_1, a_2, a_3, so I repeat the same rows. Let's go through the formula. I take i, a little fast this time, and I look at a_2 times a_3 minus a_2 times a_3. I'm doing my x pattern over here. You notice that a_2 a_3 minus a_2 a_3, they're exactly the same, so that's going to be 0. Then we'll do our minus j, and minus j is a_1 times a_2 minus a_2 times a_1. Well, wait a minute, that's the same as well. Then last but not least is k, and I'll leave this, you can see it immediately. What's going to happen, you get a_1 times a_3 minus a_1 times a_3, and that's another 0. All of a sudden you get back the vector 0, comma 0, comma 0, better known as the zero vector. If I take the cross-product for any vector of itself, you always get back to zero vector. This is not great in terms of if you're trying to cook up some multiplication property of vectors. Again, note the difference versus the dot-product. If I took a dot product of a vector with itself, I get this relation with the length, turns out to be the length squared. If I take the cross-product of a vector with itself, I get the zero vector back. When I take two vectors and I take their cross-product, I get some new vector back, we'll call it c. The question I might ask is, what's the relationship between the given two vectors, and the new vector that I find. Let's draw a little picture. If I have some a and some b as vectors. Well, it turns out that the cross-product, is going to be the one that forms the third axis. This is going to be a cross b. I drew it downwards for a reason. Because if you have a, I guess further north on the screen than b, it points downward. However, if I drew the same picture, if I rotate the picture and put a lower than b, then the picture actually goes up, the cross product, a cross b goes upward. They call this the right-hand rule. If you take your hand and make it exactly straight, like you're going to high-five someone, and you put your pinky along the direction of a, and your fingers curl towards b, then your thumb points in the direction of a cross b. It turns out that this vector, they form a right angle, not just with one of the vectors, but with both of them as well. Now, how can I confirm this? Well, I'd have to look at how do you know the two vectors meet at a right angle? I'd look at the dot-product. You can check this, you can look at the dot-product of c dot a. This would be ordered as a matter of set of dot products, so you can look at a dot, a cross b. It's a little bit of algebra, but take a little bit of your page, but you can check that this is zero. For all the same reasons, if you took the cross-product dot the vector itself, again, work this out and maybe pause the video and show, prove yourself this is true. You get back 0, non-zero, the vectors, the dot product, so 0 the number. When you think of a picture, if you ever need something that is orthogonal, or perpendicular to two vectors, this is going to be something we're going to want later, then we're going to start taking cross products. As the cross-product is another vector, so let's just draw the picture, one more time, so I have a and b, and it's cross-product. A cross b forms nice little right angles with everything. If I have this orthogonal vector, this cross-product, I might want to know, well, how is the length related to the original length. Let's look at the absolute value here. Again, through another exercise in trig, which I don't really want to go through, but if you're dying to do it, you can try it, it turns out to be similar to the formula for the dot-product, the alternative formula, but the length of the cross-product is the length of a times the length of b. Those are both numbers, so I'm going to say times, and then times sine of Theta. This is a nice little formula to keep in mind as you go through things. Let me do one more picture here for you. If I gave you two vectors, a and b, and I said what is the sine Theta part of it? It turns out it's the height of the parallelogram if you have Theta as the angle between them. You can think of it as a sine Theta. You're forming this base times height. The length of b is your base and then your height is length of a sine Theta. What this gives, this gives the area of the parallelogram with sides a and b. Here's a surprising little area formula that they don't teach you, of course, in good old geometry, but if you're ever looking for the side for the area of parallelogram, this is a nice little formula to know. It completely finds all the space that this shape takes up. In addition to just finding the area of a parallelogram, which might be nice to do, you can also use this to show when a is parallel to b. Why? If I have two vectors that are parallel to each other, let's just say they go in the same direction, then the parallelogram that they will form has area 0. I can't draw a parallelogram with some area in here. What you can do is you can show that they're parallel if and only if the area of the parallelogram they form, again, that's the magnitude of the cross-product, would be zero. You can compute the cross-product as another vector, compute as length. We know how to do that. Then if you show that that's zero, you are now proving, you're showing that these two vectors are parallel. Before I move on to an example and maybe I should do this, but at some point, there's just a lot of addition and multiplication. It's not super exciting, but one of the differences also about dot-product, I'll just put a star next to this little off topic here, but a.b is b.a. The dot product, the order does not matter. If you do a cross-product, because of the right-hand rule, you get that the orthogonal vector that results points in the different direction if you switch the order. It's very important to realize that the cross-product is not commutative. Order matters when you're doing cross-products. Just be mindful of the order. Just be careful if you're trying to do some algebra, don't switch things up a little bit here. With that being said, I just want to mention that, it's important property of the two, let's jump to our example. Let's find a non-zero unit vector, orthogonal to the plane through the points p which is 1,0,0, q, which is 0,2,0, and r, which is 0,0,3. One more time, find the non-zero unit vector, so we want to sum vector length one, orthogonal to some plane through these three points. What I'd like to do whenever I get a question with a lot of information, is try to draw it out. We're in space. I'm not going to draw anything to scale, but I have some point p, I have some point q, and I have some point r, and there's a plane that contains them. Fine. I want some vector that is perpendicular to this plane. I want a unit vector. I can always get a unit vector by normalizing at the end. I'm not really worried about finding a unit vector right now. The question is how do I get an orthogonal vector first? Let's break this up into a couple of parts. If you want to pause the video and try to work this out, this would be a really good one to do. Let's see if you can put all your formulas together. Ready? Step 1, let's create a couple of vectors on the plane. Obviously, we want something orthogonal that screams cross-product. We're going to use cross-product, but I don't have any vectors to begin with. I just have points. Well, how do you find a vector between two points? What is the vector from p to q? We said this before in the last video. We do head minus tail. This is 0,2,0 minus 1,0,0, 0 minus 1, minus 1, 2 minus 0 is 2, and 0 minus 0 is 0. Then let's form the vector p to r. Same thing. Head minus tail. Order matters here, be careful. 0,0,3 minus 1,0,0. That's the vector. I should draw angle brackets for all these vectors here, 0 minus 1 is minus 1, 0 minus 0 is 0, and 3 minus 0 is 3. Great. Now I can form the cross-product between these two vectors. Step 1 was get the vector. Step 2 is let's take a cross product. PQ, cross PR, it doesn't matter an Odyssey which point you pick as your vertex. We could have absolutely done Q and R to PQ. We'll get the same answer. There's more than one answer here. We'll get now one of the answers. As long as you're following these steps, you're doing great. Let's do our cross-product. Let's set it up. We do i, we do j, we do k across the top row. We then grab our vectors. We have minus 1, 2, 0, minus 1, 0, 3. We go a little quickly here since we've done this a few times. I see if you can follow with me, 6 minus 0. So that's just 6 minus j, careful with that minus sign, minus 3, minus 0, this minus 3. Those two negatives became positive in a second. Then plus k, 0 minus, minus 2. Ready? You subtract off the negative, so that's just positive 2. You get back the vector 6, positive 3. Now, this is a perfectly fine vector. Maybe I'll call it v, so I have to keep writing PQ cross PR, but it's a perfectly fine vector. I have found a non-zero vector that's orthogonal to the plane. I've done almost everything this question has asked. The problem is I haven't found a unit vector. Given a vector, how do we find a unit vector? We want to normalize. To normalize, we're going to use the formula that the unit vector is 1 over the length of v times v. We'll do some scalar multiplication. To do this formula, I need the length of v. That's the square root of each component squared. Then add it up. That's the square root of 6 squared plus 3 squared plus 2 squared, 36 plus 9 plus 4. Well that's the square root of 49, better known as seven. Therefore, my final answer, my final vector is therefore going to be 1/7 times the vector I started with 6, 3 and 2. You can leave your answer this way. Most of the time though they do distribute. You write it as fractions, 6/7, 3/7 and 2/7. That is a perfectly good answer. Remember there's more than one, but this one is perfectly fine. You got that and he paused the video. Great job there. One more thing to talk about, and it's called the triple scalar product, or sometimes called the scalar triple product. But it is a specific vector. It will define this thing. The specific vector is going to be a.b cross c. You're given three vectors, a, b, and c. You take the cross-product two of them, and you take that vector. Remember, cross-product gives that vector and you dot it with the other one. That's why it's triples, so you need three of them. Then this is key. This is why it's called the scalar product. This gives back a number, this is a real number y, because I take a vector and another vector, do a dot product, I get back a number. This expression is just called the scalar triple product or triple scalar product or heard it both ways. Why is it useful? Well, it gives us a number, so what's the meaning of this number? Let's see if I could do a nice picture here for you. If I were to draw, it's not a cube because you don't know that everything is the same. But it's a 3D parallelogram is called the parallel piped. It turns out, and you got to imagine that the sides are a and there's b. Then we'll put c on the back here. If I take these three vectors and imagine that they create are span a parallel piped, this 3D cube thing, then the volume of this, the volume turns out to be related to this triple scalar product. Now I'm going to write it down. There's one thing missing. Let's see if you can figure out what it is. The volume is this number with a slight catch. Remember dot-product can be negative. You can certainly take two vectors and cook them up, so the dot-product is negative. Volume is always positive. I want the absolute value to just make sure that they match. I don't want to get back a negative volume. This is the use of the triple scalar product. At least one of them is to get volume. Just like area formulas are important, so our volume formulas as well. Just as a side little note here, just like before, we're interested when at zero. If the volume is 0, if this triple scalar product, scalar triple product, whatever you want to call it, if this thing turns out to be zero, what does it tell you about a, b, and c? Well, it says, well they have no volume. That means that one of them has this can't be pointing up in the opposite direction. It just must mean to say it a little more nicer is that a, b, and c are in the same plane or co-planar. They asked you, here these three vectors in the same plane. There's a few ways to do it, but one way to do it is compute the scalar triple product, show that a zero, and that gets you that they are in fact co-planar. You will do examples of these with some real numbers and put all these things together. Practice your formulas for dot-products and cross-products in the notes and quiz that follows. Just keep these formulas down and now they're starting to add up to just make yourself formula sheet as you go through these sections and then reference it as needed to wrap up this chapter. Great job on this one. We'll see you next time.