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.

## Physics library

### Course: Physics library>Unit 13

Lesson 3: Electric motors

# Calculating dot and cross products with unit vector notation

Calculating the dot and cross products when vectors are presented in their x, y, and z (or i, j, and k) components. Created by Sal Khan.

## Video transcript

So far, when I've told you about the dot and the cross products, I've given you the definition as the magnitude times either the cosine or the sine of the angle between them. But what if you're not given the vectors visually? And what if you're not given the angle between them? How do you calculate the dot and the cross products? Well, let me give you the definition that I giving you already. So let's say I have a dot b dot product. That's the magnitude of a times the magnitude of b times cosine of the angle between them. a cross b is equal to the magnitude of a times the magnitude of b times sine of the angle between them-- so the perpendicular projections of them-- times the normal vector that's perpendicular to both of them. The normal unit vector, and you figure out which of the two perpendicular vectors it is by using the right hand rule. But what if we don't have the thetas; the angles between them? What if, for example, I were to tell you that the vector a,-- if I were to give it to you in engineering notation. In engineering notation, you're essentially just breaking down the vector into its x, y and z components. So let's say vector a is 5i-- i is just the unit vector in the x direction, minus 6j, plus 3k. i,j and k are just the unit vectors of the x, y and z directions. And the 5 is how much it goes in the x direction. The minus 6 is how much it goes in the y direction. And the 3 is how much it goes in the z direction. You could try to graph it. And actually, I'm trying to look for a graphing calculator that'll do this, so I can show you it all in videos to give you more intuition. But lets say this is all you're given. And let's say that b-- I'm just making these numbers up-- let's say it's minus 2i-- and, of course, we're working in three dimensions right now-- plus 7j, plus 4k. You could graph it. But obviously, if you were given a problem, and if you were actually trying to model vectors on a computer simulation, this is the way you would do it. You'd break it up into the x, y, and z components because of the add vectors. You just have to add the respective components. But how do you multiply them either taking the cross or the dot product? Well it actually turns out I'm not going to prove it here but I'll just show you how to do it. The dot product is very easy when you have it given in this notation. And actually another way of writing this notation, sometimes it's in bracket notation. Sometimes they would rewrite this as 5 minus 6, 3. Or it's just the magnitudes of the x,y and z direction. I just want to make sure you're comfortable with all of these various notations. You could have written b as minus is 2, 7, 4. These are all the same things. You shouldn't get daunted if you see one or the other. But anyway, so how do I take a dot b? This, I think you'll find fairly pleasant. All you do is you multiply the i components, add that to the j components multiplied, and then add that to the k components multiplied together. So it would be 5 times minus 2 plus minus 6 times 7 plus 3 times 4, so it equals minus 10 minus 42 plus 12. So this is minus 52 plus 12, so it equals minus 40. That's it. It's just a number. And I'd actually be curious to graph this on a three dimensional grapher to see why it's minus 40. They must be going in opposite directions. And their projections onto each other go into opposite directions. And that's why we get a minus number. The purpose of this-- I don't want to get too much into the intuition-- this is just how to calculate, but it's fairly straightforward. You just multiply the x components. Add that to the y components multiplied and add that to the z components multiplied. So whenever I am given something in engineering or bracket notation and I have to find the dot product, it's very, almost soothing, and not so error prone. But, as you will see, taking the cross product of these two vectors when given in this notation isn't so straightforward. And I want you to keep in mind, another way you could have done it, you could have figured out the magnitude of each of these vectors and then you could have used some fancy trigonometry to figure out the thetas and then used this definition. But I think you appreciate the fact that this is a much simpler way of doing it. So the dot product is a lot of fun. Now let's see if we could take the cross product. And once again, I'm not going to prove it. I'm just going to show you how to do it. In a future video, I'm sure I'll get a request to do it eventually, and I'll prove it. But the cross product, this is more involved. And I never look forward to taking the cross product of two vectors in engineering notation. a cross b. It equals. So this is an application of matrices. So what you do is you take the determinant-- I'll draw a big determinant line-- on the top line of the determinant. This is really just a way to make you memorize how to do it. It doesn't give you much intuition, but the intuition is given by the actual definition. How much of the vectors are perpendicular to each other. Multiply those magnitudes. Right hand rule figures out what direction you're pointing in. But the way to do it if you're given engineering notation, you write the i, j, k unit vectors the top row. i, j, k. Then you write the first vector in the cross product, because order matters. So it's 5 minus 6, 3. Then you take the second vector which is b, which is minus 2, 7, 4. So you take the determinant of the 3 by 3 matrix, and how do I do that? Well that's equal to the subdeterminant for i. So the subdeterminant for i, if you get rid of this column and this row, the determinant that's left over, so that's minus 6, 3, 7, 4 times i-- you might want to review determinants if you don't remember how to do this, but maybe me working through it will just jog your memory. And then remember, it's plus, minus, plus. So then minus the subdeterminant for j. What's the subdeterminant for j? You cross out j's row and columns. You have 5, 3, minus 2, 4. We just crossed j's row and column. And whatever's left over, those are the numbers in its subdeterminant. That's what I call it. j plus-- I want to do them all on one line because it would have been a little bit neater-- plus the subdeterminant for k. Cross out the row and the column for k. We're left with 5 minus 6, minus 2 and 7 times k. And now let's calculate them. And let me make some space, because I've written this too big. I don't think we need this anymore. So what do we get? Let's take this up here. So these 2 by 2 determinants are pretty easy. This is minus 6 times 4 minus 7 times 3. I always make careless mistakes here. Minus 24 minus 21 times i minus 5 times 4 is 20, minus minus 2 times 3, so minus minus 6 j, plus 5 times 7, 35 minus minus 2 times minus 6. So it's minus positive 12k. We could simplify this, which equals minus 24 minus 21. It is minus 35-- I didn't have to put a parentheses-- i, and then what's 20 minus minus 6? Well that's 20 plus plus 6, so 26. And then we have a minus out here. So minus 26j. And that was 35 minus 12, that's 23. Plus 23k. So that's the cross product. And if you were to graph this in three dimensions, you will see-- and this is what's interesting-- you will see that vector, if my math is correct, minus 35i, minus 26j, plus 23k, is perpendicular to both of these vectors. I think I'll leave you there for now, and I will see you in the next video. And hopefully, I can track down a vector graphic program. Because I think it'll be fun to both calculate the dot and the cross products using the methods I just showed you and then to graph them. And to show that it really does work. That this vector really is perpendicular to both of these and pointing in the direction as you would predict using the right hand rule. I'll see you in the next video.