Hi, everyone. Welcome back. In this lecture we're going to talk about introduction to vectors, what a vector is. You may have seen these before, but basically the short idea is, a vector has both direction and magnitude. Where do you normally see vectors before? Usually they come up in physics, if you ever taken a physics class, if you think of a push or a pull, these are called forces in physics, then you're giving it a direction magnitude, so how strong am I pushing? Measured in newtons just for fun, and also what direction? So we're moving North, we're pushing down, upwards, gravity pushes down, whatever the thing is. So force is an example of something that is a vector, when you drive your car, velocity is in fact a vector, acceleration is also a vector, so lots of good physics terms. These are represented by arrows, so let's draw a little picture of these things to represent them. So inside of R2, remember, R2 is the x-y plane, before I just had a good old point, like, hey, look, here's the point, 1,1. Now when I want a vector, vector is going to be an arrow, so in the x-y plane, before we had a point, let's say at the point 1,1, and it was just a point. Point Is a massless, location in space, atomically small little piece. A vector, you can think of it like an arrow, starts at the origin and goes up to the point, we'll call it p, and sometimes we denote the vector with a little arrow over it. So if I wanted to think of this as a vector, we could use an arrow notation, we could do a single arrow, a double arrow, it doesn't quite matter, but you can think of there's a one [inaudible] correspondence with a point in space versus a force that got you there from the origin. So you can do it in R2, if you also want to think about it in 3D, so R3, we call it space, remember? You have your x, your y, and your z plane, and you pick your favorite point, why not? Let's pick 1,1,1, right on the first octant, and same thing. You start at the origin, you draw a little arrow that goes out, and you can label this as your vector, with a little arrow over it. When I draw vectors, I'm lazy, I don't draw the full arrow, I just draw half the head there, but this is the idea. So the difference between the point, is which is represented as a dot on the page, is that it is just a location in space, and a vector which is represented by an arrow, has both a direction and a magnitude. One thing you going to do pretty quickly, not surprisingly, is do some math on these vectors, so you can add vectors, and I'll do this with a picture. Let's say we have a little vector v, going in one direction, we'll start at the origin, and I have another vector, say u, going to the right. So here, the boat is traveling in the v direction, and the current is taking it to the right, or the airplane is traveling in the v direction, and the wind is pushing it to the right. Now I have two forces acting on a single object, so what is the result? Sometimes the result is called the resultant force. Well, we do something called the parallelogram law, where we can draw out the other missing sides of the parallelogram, and you draw the diagonal, that's not a great straight line, but imagine it was little more straighter, this would be, u plus v. So if you add two vectors, you get the resulting force, so think about two people pulling tug-of-war, what's the net force? What's the net result? So we call this the parallelogram law, and the idea is, you can also do these things another way, if I had v, and I had a u, we call this the head-to-tail method, you can draw u, at the head of v, so you redraw u, and then you connect the dots. Sometimes it's called the triangle law, for the same reasons. When you add vectors, it does not matter the order, so we add u plus a vector v, this is the same as adding v plus the vector u, for the reminder, when the order does not matter, it is called commutative, good word for you. So we can add vectors, that's great, and you can have more than two vectors just like numbers, you can have as many numbers as you want, you can have as many vectors as you want, add them altogether. Another thing that you can do in addition to, well, addition, is that you can scalar multiply. First off, here is a new word for you, what's a scalar? A scalar is a fancy way to say a real number, take your favorite number on the number line, because there are so many things flown around here, we have vectors, we have numbers, what we really want to talk about, are number, a good old-fashioned number, 7, 2, 4, pi, who cares? We say a scalar, and I'm going to start using that. So a scalar is some number, and so what does it mean to scalar multiply, or multiply by scalars? Well, I pick some vector and I multiply it by some number, so let's call that number r. This is absolutely well-defined, you get rv. What does this mean? Let's say I take a vector. Let's start out simple in the x, y plane. Let's take our friendly vector here 1, 1. So we take a little vector, we use angle brackets to represent it as a vector. That's not the parentheses, that's a point. Angle brackets are there, and let's take my favorite real number. I don't know. How about two? Two is a real number, very good. Let's scale the vector by two. So this is our new operation here. I take a number times a vector. How do we do this? Well, we distribute it to both pieces. Think about it as you have a force and you push twice as hard. So I hit the two to both, and that gives me back a new vector 2, 2. It's important to realize that if you add two vectors, you get back another vector. If you take a number times a vector, you also get back another vector. What this does, and you got to see why it's called scalar multiplication, it scales the vector to get you to 2, 2. So you get a larger arrow, you get a larger arrow at 2, 2, and we get a new vector back 2, 2. So think about as pushing twice as hard. With addition, you can define subtraction. Subtraction is just addition of negative numbers, and so you can really do arithmetic on these things. Things that were not really dig to find right now, just keep in mind we're only doing addition or scalar multiplication. We don't have a way to like multiply vectors yet, or other fancier operations. Keep it simple. Add, subtract, multiply by scalars or numbers. It's pretty common that you're going to be given two points. Let's just call them A and B, and they're going to ask for the vector between A and B. Now one thing about direction is that order matters. If you're driving North and if you are driving South, it matters. The distance doesn't matter between the two points, which one you pick first, but for the vector, it will. When you want that vector, so we want the vector from A to B, we are going to be very careful about picking the order. If we label the points, so let's say I had x_1, y_1, and z_1 for just some generic A and for B, I had x_2, y_2, z_2. Then the vector that connects A to B is going to be found by what's called head minus tail. You always do head minus tail. So it's the head, so we start, so here's that B. So x_2, y_2, z_2 minus the tail, minus the back end of the vector, so x_1, y_1, and z_1. You can combine this, of course, when you do vector arithmetic, you do it component-wise. So we just take the first components, you subtract x_2 minus x_1, the second opponents subtract y_2 minus y_1, third component subtract z_2 minus z_1. So whenever you want the vector between two points, it's going to be a thing we're going to want to in the future, you subtract head minus tail. One thing to keep in mind, of course, is that order matters. We care about the direction that we're moving in. In addition to the direction, we also care about the length. Sometimes we want the distance or length, so let's give a definition here. Maybe it's definition/formula. Keep this one handy if you're taking notes. The length of a vector, sometimes it's called the magnitude as well. So the length or magnitude of a vector v, and I'll give it x_1, x_2, or x_3 is denoted by, we're going to use absolute value bars in the same way that the absolute value of a number represents the distance from the origin. We're going to use the absolute value bars here to represent the length, and that's going to be the square root of each component squared, then we add those up. This is a little bit more involved as a formula. We'll see where this comes from a little later, but it's coming from the Pythagorean theorem honestly. So the length of this vector v would be the distance or the magnitude of that arrow. How long is the arrow? We'll do some examples with this in a little bit. There are three vectors that I want to introduce you to, that are going to play an important role in what's to follow. First off, we're going to hang on R_3, we're going to hang on 3D, why not? I'm going to introduce you to three vectors that live on the x, y, and z axis, and they are unit 1 vectors, so the length is one. So if you set, they are measured one unit out. The one on the x-axis is given the name i, hello i, the one on the y-axis is given j, and the one on the z-axis is given k, not surprisingly. This notation comes from physics. A little bit, a lot of physics happens in 3D, so if I wanted to actually give these numbers, i is the vector 1, 0, 0. J is the vector 0, 1, 0, so they have a one in their respective component, and k is the vector 0, 0, 1. These are important little vectors and the reason why they're important, if I take any vector v, let's take any vector v, let's just make up some number 7, 4, and 2. Well, 7, 4, and 2, you can always rewrite this vector, some random vector, as 7 times 1, 0, 0 plus 4 times 0, 1, 0, plus 2 times 0, 0, 1. These i, j, k vectors, they are the backbones that make any vector. You can always decompose vectors into these three. Just to convince yourself that and remember how it's true, you might want to work out this calculation. Bring the seven in. So this is the vector. Let's just do some arithmetic, 7, 0, 0 plus and bring the four in. So we have another vector, scale the multiplication, 0, 4, 0, and then we'll bring the two in. Remember when you bring a number in, you've got to hit all the components of course. So 0, 0, 2, let's scale the multiplication and then if we add up vectors, there's three of them here, but that's okay, just do it component wise. If we add up all the numbers in the first component, we get 7 plus 0 plus 0, add up all the numbers in the second component, 7, 4, and 2. A good little practice here. These vectors build all other vectors. They go by a nice little name, they're called the standard vectors or standard basis vectors. When someone says i, j, or k, you should know what vector they're talking about. They have length of one. If you took out a ruler and measured them, you'd get one unit, whatever you're measuring it in and so we give them a special name. If some vector v has length one, so where absolute value of v is equal to one, then we say that v is a unit vector. Think about it for second. Are these the only vectors inside a space that are unit vectors? Are there any others? If you said yes, you're correct. There's infinitely many. You can imagine a couple of vectors coming out diagonally or maybe you rotate it up, and what you actually get is a full sphere, like the unit sphere, that sits on right at the origin. Any vector from the origin to that surface is a unit vector and there are infinitely many points on the surface of a sphere and so there are infinitely many unit vectors. Oftentimes, when you work with vectors, they're not unit vectors. We're going to want to normalize a vector. What does that mean? Let's define that term. To normalize a vector is to create a new vector of length one, so we're going to create a unit vector in the same direction. In terms of the picture, what's going to happen is that I'm going to start with some vector v that is of length whatever, 7, 5, Pi, who cares? It's just some arbitrary length, and I really want to get it to length one, but I don't want to rotate the vector at all. What I want to do is I usually want to scale it back a little bit, just a little bit, so I bring it back. I got to scale this thing to get a new unit vector. Remember length one means unit vector so I want to find something. This will turn out to be a very handy tool to be able to control and understand the situations when we have a unit vector. So the formula to do this, to find the unit vector, to normalize a given vector is to take the vector v and divide it by its length. We will divide it by it's length. This formula, this little technique has the property of doing just what this picture shows. I have any vector, I scale it back, and I get a unit vector. Let's do an example just to see that. Let's do one inside of our three. Let's take my vector v to be, let's not be creative here, 1, 2, and 3. This vector, if I want to know what the length of this vector is, let's do the calculation. It's the square root of each of the components squared and then added together. So square root of 1 squared plus 2 squared plus 3 squared. Clean that up, 1 plus 4 plus 9, that's of course the square root of 14. Hopefully you agree that the square root of 14 is not 1. This vector, we would say is not a unit vector. It is just some vector length root 14. Let's find a unit vector in the same direction. Let's scale this thing down. How do you scale it? You take the vector you had and you divide by the length. Let's remember, division by the length, that's some number. If I would write this out, we'll just do division. Don't multiply 1, divide by 1, divided by root 14. We multiply that scalar by the vector we started with 1, 2, 3. Now remember when you have a scalar in front, you bring it in, you hit all the pieces, and we get a new vector back. We have 1 over root 14, 2 over root 14, and then 3 over root 14. This is my new unit vector and I leave it as a check. I want you to check this, show that the length is actually 1. Convince yourself that's true. Pause the video, work that out. Take the square root of the components squared. Let's do one example. Find the vector with the same direction as minus 2, 4, 2, but has length 6. One more time, find the vector with the same direction as the vector negative 2, 4, 2, but has length 6. If you want, pause the video, try to work this out. We have our little vector V, give it a name, minus 2, 4, and 2. Let's find its length. Let's play around this thing, let's get to know our vector. Its length has an arrow, how long is it? It's the square root of each component squared, minus 2 squared, plus 4 squared, plus 2 squared. Work that out, we get 4 plus 16 plus 4, and that's the square root of 24. Square root 24, not a unit vector, it definitely doesn't have length 6. I can't just say, oh, here it is. I have to manipulate this somehow. Well, this may surprise you. In order to actually grow this thing to 6, I'm going to shrink it to 1. I'm going to normalize the vector, I'm going to make a unit vector in the same direction. Let's just think of what I'm trying to do here for the picture. I'm inside of our 3, but I won't draw the picture to scale. I have some vector V, and I know its length is root 24. What I want to do is, I want to normalize the vector now. I want to bring it back to have a nice pretty unit vector in the same direction. Then what I'll do is, once I have this unit vector of length 1, how am I going to make it have length 6? Well, guess what? I'll multiply that by 6, and now I have a nice vector of length 6. This is what I mean why you will always usually normalize a vector to get more control over it. Let's normalize this thing. We'll do 1 over root 24, and that's going to be times the original vector, so negative 2, 4, positive 2. That will bring it into both piece, is going to be minus 2 over root 24, 4 over root 24, and 2 over root 24. I guess we could cancel a little bit with a root 24. Remember, 24 is of course 4 times 6, so this is just 2 root 6. We can cancel some of the 2's here. You just have negative 1 over root 6, 2 over root 6, and then positive 1 over root 6. It's okay to have square roots from the denominator. Some folks out there might yelling, you have to rationalize the denominator. No, you don't. You can totally leave it. If you want to, feel free, but you don't have to. Again, we should do probably a quick check just to make sure we're on the right path here. You can check that the length is actually 1. It was a good check, so I'll leave that to you. But remember, we're not after a unit vector, we're after some vector that has length 6. I'm almost there. Notice the steps so far, find the length of the given vector to normalize it. Then last but not least, let's just get a new vector back. Let's call it w for no good reason. This will be 6u, and I literally just multiply 6 by the vector that I just wrote down, so minus 1 over root 6, 2 over root 6, 1 over root 6, Bring in the 6, and we are done. Negative 6 root 6, 2 root 6, and then 1 root 6. This is our beautiful vector. You can check, it is in fact has length 6, and it is parallel to the same direction as this thing, if you were to draw this out. This is a nice little problem. Really shows you that normalizing is a perhaps surprising but an important first step, good skill to have, keep the formula handy as you go through the rest of this section. All right. Great job on this video, we will see you next time.