 So today we're going to start discussing vectors and if there is a beautiful such an interesting and rich Subject or topic in mathematics to study. It is vectors vectors vector fields vector calculus. It is absolutely Fantastic now we're going to start looking at this from the point of view of of linear algebra and with vectors most of you would have seen vectors before if we just look at a vector in a two Dimensional Cartesian coordinate system. We have our x-axis and our y-axis and we just have a point here So this point is oh, let's make it not to scale but 2 comma 1 we've all we have that notion of a point and If I draw this down this will be 2 on the x-axis there be one and this will be One there on the y-axis we have this notion of this point But we can turn this point into a vector and the vector goes from our origin here And that is where it has its tail and that's where it has its head And we put a little arrow to indicate because a vector contains two bits of information The first bit of information is just how long it is and the second one is its direction So how long it is how long it is that is its magnitude magnitude Magnitude and then it has a direction and we can just use some reference point usually in this Coordinate system it will be the x-axis and it is this angle theta or whatever Greek someone you want to put in there the angle that this makes with the x-axis and that is a vector and we will use this notation of this vector as 2 comma 1 so there's this point notation But this vector let's call this this vector vector V and this vector V We can write as 2 and 1 so that is actually a little matrix with a single column So this is a 2 by 1 matrix 2 by 1 2 rows 1 column that is the vector representation column vector form of This vector and that just ties these two things together so beautifully this abstract idea of This column vector well It's actually a small matrix if you want to think about it and in small and as much as it only has has one column and this represent, you know this this arrow with its With its origin there The tail and the head there and this pointy thing it has a direction and it has a magnitude Know that together with just this point in a Cartesian system now Also, if we have a third dimension if we were to have a third dimension here This can point in any direction now It will have a couple of angles because it's not only this angle that it points up But also the angle that it points out in this Xz plane if you want to think about this and We'll draw it properly. This is not drawn properly But you can imagine a pointing there towards you instead of in the board It still has a magnitude the magnitude is quite simple though if we just start with this This will be the y and this will be x and we remember our friend Pythagoras and usually we write this call it the norm of a vector and we write it like this And that's just going to be the Pythagorean theorem So this is going to be the square root of x squared plus y squared and we notice no matter what direction it points in It's always going to be have a positive magnitude. We just can take the positive of the square root. That is a positive That's a positive So even if it points down in a negative negative direction, we're still going to get this magnitude You can also think that at least here it becomes very easy because The tangent of theta is this y over x So it's very easy to to look at theta there as just being this arc tangent This arc tangent of y over x so that's very simple and it just scales up from there if our vector was in three In three dimensions, it would just be there And you can you can just think that if we were to name this x of one and this is x of two And this is x of three instead of x y and z, you know We could have this vector of x of one squared x of two squared x of three squared Except four squared it just carries on in multi-dimension no matter how many dimensions we have and we'll have more numbers down here Say that's one four. So that is going to be a four-dimensional vector. That's a beautiful thing I mean in so many dimensions the norm of this vector is still very easy Or so easy concept to understand just one thing. I want to show you as well if I have a vector that's up there and It is has the same direction and it has the same magnitude We consider these two vectors as exactly the same thing So don't have it stuck in your head that there's somehow something different because of this vector because it's orange It's it's tail at least is not at the origin because I can take it lift it off bring it down and put it exactly on top of that So those two things is exactly it's exactly the same thing We don't don't consider it moving around some way wherever it is. Just bring its tail back To the origin those are exactly the same thing and that allows us something very easy and that is the addition of vectors And the subtraction of vectors from each other and that is something that will get into so it's a very natural thing This thinking of vectors is actually quite an easy thing to think about it's such a you can visualize it We're gonna do this this abstract mathematics on on these vectors And then we're gonna multiply vectors different types of things that we can do with these vectors binary operations on these vectors And it becomes such a beautiful rich Playground and I want you to really be excited about vectors and this this idea of these column vectors We're gonna look at the row vectors as well certainly many interesting topics to come I absolutely love vectors and I want you to love vectors as well And they because they just such something that you can just conjure up in your mind It's such a visual thing and it's such a beautiful thing and powerful thing I mean think about where vectors are used vector fields It's just it's just everywhere. It's such a rich Topic at least the mathematics in linear algebra. So I really want us to to to enjoy Vectors, so here we are in Mathematica. Let's have a look. Let's start having a look at a vector now We've seen on the board that we can draw a column vector. It is just a sort of a single column So let's see how we would go about that and there we have it. I've created a list inside of that is a sublist and So two I'm making two rows the first row will have one in it the second row two and I printed out the matrix form It's a column vector So that would be one way to look at a column vector Before we get to vectors vector addition vector subtraction vector multiplication This is go back and look at it graphically So there's a very nice function inside of Mathematica the Wolfram language Called graphics. So let's have the graphics and what I'm going to do with these graphics is I'm going to do two arrows and So with it being to they go inside of curly braces remember so my arrow number one It's just arrow and I tell it what the coordinates are that is the coordinates of The tail and then the coordinates of the head So that has to go inside of curly braces. So first all the list is zero comma zero So that's my tail. That's the points on a Cartesian plane For the tail, let's go for the head and let's make that at one comma one So there we go And I'm going to close my curly braces again because that's a list of two elements and each of these sub elements Has two elements inside of them. So that's the first arrow that I want to draw comma, let's do a second one just to get used to this so an arrow open my square brackets open and Two curly braces zero comma zero for the origin once again, and let's go to Let's go to three comma zero. So that's the X and the Y coordinate Close so it's a double closure there of my curly braces close my Arrow the the arguments so the square bracket that I have there But then I just must remember that this was inside of the graphics function This was a list of two arrows So I've got to close those curly braces as well and close the square bracket So look at that curly brace curly brace square brace Go to brace square brace it can become a bit technical here But you've got to just remember where they all fit together so the outside I have this graphics function. It takes an argument which is a list So that has to go inside of its own set of curly braces to arguments that are passing in both of them are arrow functions and you see how I construct those There we have it. I have my two vectors. You can clearly see the vector going from 00 up to 11 and the other one going along the x-axis to x equals 3 and y equals 0 so Very nice just to draw your vectors easy easy enough at least here in two dimensions Remember I set the angle between vectors now. That's very nice to do in Mathematica. I'm going to say vector angle It's a simple vector angle and It's always going to do this with regard to the to with regard to the To the origin so that's zero zero and then all I have to do is put in the two Heads or the coordinate point of the two heads So I don't have to worry about the zero zero which is the origin which is where the tail of these vectors are So let's make the one at Let's make the one at 1.1 So it goes from zero zero to one comma one I only have to put the one comma one and the other one. Let's make it go then also to 3.0 3.0 close that close So it's exactly this vector that I drew up here And you know what this angle between them is going to be because this goes from zero zero to one one And there we go. We see it's pi over four So 45 degrees so pi over four radians So you can very easily work out the angle between Between two vectors now what if we move this over and we move it to the one Vector being in the second quadrant if we think about the coordinate system the the Cartesian coordinate system. So what I'm going to do from my second monitor is just copy and paste Let's have a look at what we have here. We have graphics again list of Two arguments both of them are the arrow function exactly as we did before But we have this one vector going to negative one on the x-axis Let's have a let's have a look at that and there we go now. We see the second vector pointing in the second quadrant so Very easy to do let's see what? Mathematica thinks the angle between these when between these two are so once again We just have to do vector angle Vector angle there we go And I just have to do as I said before just where the heads of these are so it's negative one comma one and the instance in the other one is three comma zero and This is bit of comma there comma and let's have a look and we see it's three quarters pi It's three quarters pi What about it? What would happen if one of the vectors ends up being in the Third quadrant. I'm going to just copy and paste it there. You see what the code is like we do that and let's do the vector angle the angle between these two vector angle and This is put in the two coordinates It's negative one comma negative one for the head of the one and the second one We still remain three comma zero so that it still goes along the x-axis for us And let's have a look at that it is three quarters pi again because once we get over Pi radians so 180 degrees the angle will be measured in this direction so Instead of going beyond pi radians. It will do the angle that is smaller here So we again get three quarters pi as far as that's concerned And if we if we bring it into the fourth quadrant, it's going to be pi over four I just want to show you that we can do this in three dimensions as well Of course, we can't go to the fourth dimension, but have a look at this. I'm going to do a graphics 3d I'm going to then draw a thick so my first argument is going to be thick and then arrow at zero zero zero as far as my Origins concerned one comma zero comma zero as far as the Head is concerned and for the second one zero zero zero to one one one Let's have a look at this and you see we've got a little cube here, which is fantastic That's the graphics 3d creating that 3d a representation for us and Because I've said past thick as one of my arguments So I have three arguments inside of this list, which I passed to graphics 3d It'll draw these two as thick as these thicker lines So you can clearly see the angle that this one goes at an angle away from this plane This Cartesian plane if we can think about the front of the cube is a Cartesian plane And I can really roll it around very nicely So depending on what angle we viewed at we can clearly see What's happening in the three-dimensional space? And what will happen as well is that we can get an angle between these so if I were to say vector angle and I'm just going to pass in as far as my arguments are concerned these two lists I remember one had a headed one comma zero comma zero and the other one was at one comma one comma one And I'm going to close that and all I want is for just to be Expressed in numerical as far as the in the format at least of a numerical Approximation and we see there's 0.955317 so that'd be the angle between those between those two vectors So very impressive they indeed play around and create some of your own vectors to start off with