 This is a course I've been wanting to make for a long time. We're going to talk about linear algebra. I'll put these courses out one at a time. It's something that I'm making at home while away from work. Mathematics is a beautiful subject. Linear algebra is at the heart of so many things that we do with mathematics. And I'm specifically thinking about something like deep learning where we can use tenses, matrices, vectors, to build models to predict some outcome. So linear algebra really at the heart. And I think if you understand linear algebra, you understand a lot about mathematics. And it's really a beautiful part of mathematics. And I really would like you to be as enthused as I am about it. I'm going to use a computer language together with the explanation. And I really think that's a modern way that we should approach teaching mathematics. We are going to use code. Most of us are going to use code when it comes to the mathematics that we are using. And just to be exposed to that as soon as possible is great. So this is not about teaching you a computer language. I do have courses for that, both on Udemy and on Coursera. So you can get a university certificate even from one of the courses that I do teach. And what we're going to use is the Wolfram language. The Wolfram language is really built around symbolic mathematics. And that's what we're going to do. We use symbols. And it really is the language that works best that you can write your own code. You can do that in a browser, just open a free account with Wolfram on the Wolfram cloud. Or you can buy a small subscription. And with that, for instance, you could get a desktop version of the Wolfram language that you can use on your own system. But otherwise, you can just use it free of charge. This is not about the code. You'll see the code, but the code is there to draw something to the screen or to check on some result of a calculation, just to show you how easy it is to do with a code versus what we do by hand. And we're going to do it by hand. By that, I mean, it is written on the screen. So not to worry about that. It is about the linear algebra. But I'm just going to bring the code in it as a modern form of teaching the subject. So in this very first video, we're just going to talk about points and vectors. Either one understands what a point is on a 2D plane, or perhaps even a point somewhere here in space. It has three components to it. X, Y and Z component. But from there, we can very naturally move on to what a vector is without wasting any further time. Let's go have a look at points and vectors. So from points to vectors, I think most of us are familiar with points. And if we look at this flat surface that we have in front of here we can just put a point anyway. And if we have this Cartesian coordinate system where the bottom of your screen is the x-axis and the left side up of your screen is the y-axis, we can denote a point. There's a pixel and that pixel will have a position. And we usually, it's important in mathematics, of course, how we write things down. And there's certain rules that we stick to. So I think in most textbooks you are going to see something like this where we have a point, like you see there, 3, 2. So the 3, 2, that's a two-pole, two-tuple. And as much as the two values there, they're separated by a comma, the inside of parentheses, and they go directly after the name of the point. And we can also use the subscript notation. So yeah, we have 0.0 being at x sub 0, y sub 0, or 0.1 at 3, 2 and 0.2 at 0, 1, etc. That's just a point. And that is how I'm going to write a point. The subscripts, of course, are elements of the natural numbers. So if I have points I just have, let's include 0 with those numbers as well in that set. So 0, 1, 2, 3 as the subscripts. So here we have our first function in the Warframe language. I'm going to reiterate this. It's not about learning the the Warframe language, but it certainly helps. Remember, you can run this in the cloud, free of charge. It's going in your web browser, to the Warframe cloud, sign up for a free account. You can do all of this yourself. I've got courses available to you. All the links are down below for you to learn the Warframe language should you want to. I'm going to use it as something to illustrate the mathematics. I do think it is important to do that in a modern world. So it's a functional language. So we're going to have functions. And there you see the function there. Function is a keyword. And Mathematica, or the Warframe language at least, has more than, I think, 5 or 6,000 of these. After those, you'll always see a set of square brackets. There's my opening square bracket, my closing square bracket. And inside of those go parameters or arguments. And all arguments are separated by commas. So you see these commas there. And that gives information to the function so that the function actually do something. And when you bake a cake, you put it in the oven, but there's lots of ingredients that go inside of that and out pops a cake. Your oven uses all those ingredients and out pops a cake. There's your function. So all I'm specifying here is something about a point. And because I want to specify more than one thing about a point, I put those things inside of a set of curly braces, which you're going to see there and there. And they've also got commas between them. And between curly braces is something that we call a list. So I'm saying point size. And again, point size is just going to be another function. So I can pass functions as arguments to other functions. And because it's a function, we see the open and closed square brackets and 0.05. That's going to be the size of the point that I have. You can see the point down there. You can see what it's going to be. I want it to be red. And then the position of it. And there we go. There's my 0.3 comma 2. So if we go down the x-axis on this side, we get 2, 3. And if we go up 2, we get to that over there. And that's how we get the point 3 comma 2. And then comma outside of that list, I just put, have some attributes, axis, I set to 2 so that we can see the x and y-axis. And I have axis labels. And again, there's a pair of them. I pass them as a list so that you can see the word x-axis there and y-axis there. And that comes from there. So it really is as simple as that. The point is, I'm not going to teach you the Wolfram language here. I think it's very easy to pick up when you look at it like this instead of trying to learn how to use the language after a while. It'll just come to you in a quite a natural way. The point being here is linear algebra. And we've got a point. And we can denote a point by its address on the surface or within the volume that we are talking with here. We have a surface so we can give it an address. 3 on the x-axis, up 2 on the y-axis, 3 comma 2, there's our point. And to illustrate the point, I've got quite a few points here. And here I've just given them computer-variable names, p underscore 1, p underscore 2, up to p underscore 4. And I've given them their coordinates instead of a set of curly braces denoting a Wolfram language list. But that would be the same as us writing in a mathematics textbook, point 1, 3 comma 2. That's exactly what we're doing. So we're doing them all in red again. And in the point, instead of a single point, I'm passing a whole list of points. So the list goes inside of curly braces. And it is pretty much the same, although I haven't said x-axis and y-axis as the axis labels there. But once again, the point being, I can clearly see this is point number 1, and it's at 3 comma 2 because that 3 goes down to the x-axis and the 2 goes to the y-axis. And it's quite simple to see here. We see point p4 because it is at 2 comma minus 1. And you can work out what these other points are going to be. So that's really simple enough. And as I've written here, let's change our point of view now. We all know about points. So let's just change them to vectors. And here we can see that we are trying to get to this same point. If you think about that, if I put a dot there, that's the same point, p3 comma 2. So I'm still going 3 on the x-axis up 2. But now I can just imagine walking there from the origin. And we call this the origin. The origin will be a point 0 comma 0. This is two-dimensional space or two-space. And I just walk 3 along the x-axis. And I denote that by a long arrow of which the tail, I have a tail of my green arrow here. And I have a head on this side. So there's the head. And here by the origin is the tail. And then this green one will also have its own tail at the bottom here and its own head there. So if I do this little walk indicated by these arrows or vectors, I get to the same point. And that obviously becomes quite important to us when we talk about that. So instead of these two walks along the x-axis up the y-axis, I can just walk straight to the point. And this green thing is indeed a vector. We will call this a vector. And we've just seen though that a vector does have components. We sort go along the x-axis and we sort go up the y-axis. So immediately you should have this intuitive understanding that I can add these two things somehow, these two walks. And that will just give me this resultant walk, this resultant vector. And you can see the code here. Again, it's just a graphics function there. I'm making a slightly smaller point size. It's still in red. It's still a 3, 2. And then though I want a green thick arrow. And the arrow goes from the origin. There's my 0, 0 at the origin. And there's the final point that it goes to. That was my point. And it goes to that point. And everything else is quite self-explanatory. So a point and a vector is just two ways to represent basically the same spot on the plane. But I can do so much more with a vector than I can do just with the points. So that brings me just to how we write these things down. Here you see one notation. This is the angled bracket notation, as you can see here. And you can also see that I broke this down into two separate ones. V, first of all, you see the underscore there. Let's say V with an underscore. So many textbooks will have that. And that denotes that this is a vector instead of a point or anything else. So we put that little underline on it. V with an underline. And then also we use these little angled brackets here. And it says 3 comma 2. But what it is really there, it is the x value and the y value. And I've done just that. Remember the two green vectors initially. That would be the first one that went along the x direction. And this one that went along the y direction. And I can write the two of them separately as well. Because the V sub x vector went along until point 3 comma 0, 3 on the x axis, 0 on the y axis. And y went from 0 to 2. But that might look a bit strange to you because it didn't start at 0. It started at 3. So what's going on here? For now, just these little angled brackets, you'll see them all over the show. But you can start to see that there's something going on here. Because if I add 3 and 0, I get 3. And if I add 0 and 2, I get 2. So there's this intuitive idea of adding vectors. And it also brings us to this y is at 0 comma 2. Because you see these two green vectors here. First of all, you'll see the tail of this one here. And the tail of this one is at the origin. And the head is up there. And the head is up there. And these two vectors are exactly the same vector. There's no difference between the two. Just because we've displaced it laterally here, it is still the same vector. So that's something that you should really get used to. This vector on the left-hand side is just called the positional vector. Sometimes called the positional vector. That just means take any vector and just sort of transport it so that its tail is at the origin. We just want to place this at the origin. But no matter where we move this tail, these two are still the same vector. I could have moved this one up on the right-hand side. Further up, further left, further right, further down. But as long as it's the same length, and you can clearly see that this is the same length. So length is going to be very important to us with vectors. And it also has the same direction because from physics, it's really intuitive. It's an intuitive way to understand vectors that it has this idea of there's a physicality to it. It is something that has a length and a direction. And anyway, where you go, when you walk now, you're going to walk for a certain distance and in a certain direction. And of course, you can change directions many times. And that is just the addition of a bunch of little vectors. And I can bring all of them where they tails back to the origin. And that'll be exactly the same thing. And you'll soon see that. So remember this idea of the positional vector, which means we can also write it in this as far as linear algebra is concerned in a much better way. These we call column vectors. This is a column vector. Where's my n column vector? And we're going to have a lot to say about column vectors. You can clearly see it's written as a column. And they're two rows to my column, two rows to my single column. So there's row number one, row number one, and there's row number two. So there's two rows in a single column. This vector v sub x is then what we would call a two by one vector. It's always a row. And then column always in that order. So it has two rows in one column. And because it has one column, we call this a column vector. And that means v sub y is also a column vector. And it is written like that zero and two. The x component is zero. So it's not moving along the x component at all. But it's moving plus positive two on the y component. And that's exactly the two vectors that you see here. Both of them are v y. And both of them are zero two. It's the same column vector that we see then, both representations. And now it makes it very easy for us to see this idea of the addition of vectors. Because if I add these two column vectors on the left hand side, the v sub x and the v sub y, I get exactly that. Because what we see here is actually called a linear system. And we're going to talk all about linear systems. But let me write down the word a linear system. This is a different way of writing a linear system. And as much as what it says there is that I've got two equations. It says three plus zero equals three. And zero plus two equals two. It's just a succinct way of writing a linear system, a system of linear equations. And we're going to talk all about that. And sometimes people just start off with those things. And it's not always that intuitive to understand where it comes from. But if you see it this way, I think it actually makes a lot of sense. There's nothing difficult here. It's very intuitive. So of course we need to stick to the plain surface here. We can go up in another dimension. And here we have vector w. And it's in three dimensional space. So it has an x value. It has a y value and a z value. So we're going up. So not only do you have to walk on the floor, but you can get in the lift and go further up. And these vectors live in a certain space. And before when we only had two elements in our column vector, we were in R2. And we write R there. It's the set of real numbers because we are denoting here that the elements are real numbers. We can also have something like C2. And that will be a vector where the elements can be complex numbers. But we're not going to get into that anytime soon. So let's take that away. The R there just refers to the fact that we're talking about real number entries in three and two and one. Okay, they are integers, but they're also, that's a subset of the reals. So if we go to three dimensional space, of course this will be a vector in R3. So you can see there. And we can go up. We can only imagine three dimensions in our heads. But of course, there's no limitation on that. We can let n be much larger than three. And we get into what we call hyperspace. So different ways to look at vectors, the physicality of it is something that has a length and a direction. But we can also view it in slightly different way. Instead of having these three components, we can look at it in this way. So here trying to represent doesn't really fit on the screen. Three dimensions. So you see the x-axis moves down here to the side. The y-axis is there. And then the z-axis goes all the way up. And then we have still this origin at the bottom. Right here's our origin. And this vector comes out in three dimensional space. This is a right hand coordinate system. Because imagine that you can contort yourself putting your right hand's palm at the origin pointing towards the x-axis. And then swinging, just swinging your fingers over to the y-axis, your thumb, if you extend your thumb, it points straight up. So this is a right hand. And it's a bit difficult the first time to go from x down the bottom of your screen and y straight up to this contorted view. But it actually, it's the best way. Just trust me on that one. It's the best way to do. So we can deconstruct this vector a little bit. Because imagine we look straight down, we can look straight down onto the floor. So imagine the x and y-axis are down on the floor. And I'm looking straight down at the origin, straight down the barrel of the y-axis, the z-axis. I should say that vector that comes out has this projection down onto the floor. And this is this, let's call it projection from now, although we'll get to projections. And that is this representation right down here, this little one down here. It is the projection of this one down onto the x-y plane. And it has a length of r, as you can see there, we can do that. It will have this vx component here for sure. It will have a vy component, which we see back there. A vy component back there. And it also has a height. And the height will be down from the floor up. So we have our vz component there. And you can see where we've indicated them here. It also has a length, like any other vector. And you can quickly see how we're going to write the length. It's quite a cumbersome way. That is the length of a vector. We're going to call it a norm. It has a length. But there's some other things here too, the two angles that we're talking about. So here's our positive x-axis, our positive x-axis on this side. And we can see this angle theta, it swings out from the positive x-axis to this projection. To the projection on the x-y plane. And then we also see this angle phi up here. And that is just an angle from the z-axis. And how much does it lean across? From straight up, how much does it lean over? So you can see that the interval on which we can find that angle is from 0 less than or equal to phi is less than equal to pi radians. Because you can only go straight down to the bottom here. And then the theta is going to go all the way to 2pi. It can go all the way around the circle. An actual factor can go many times around. And there's some lovely peculiarities about that as well. And we'll certainly get to those too. So you can see the intuition here of how we describe this vector. It's head here of the vector. How can we describe it as a positional vector? In other words, the tail is at the origin. Yes, it has an x, y and z component. And I can write it like that. But I can also write it in terms of this radius r. And I can write it in terms of this angle theta. And I can also write it in terms of this height. Or alternatively, as this angle. So we have this idea that we have a multivariable calculus where we can use cylindrical coordinates or spherical coordinates. None of that matters now. I'm just hoping that this makes intuitive, really intuitive sense. So let's get to this idea of the norm of a vector. And you see we've got vector v here. Well, there's again the notation. And I try to put things that I just want to, if I view my documents quickly, I want to see all the important terms. I put those in green. Which means in that area of that green, I'm defining that term. So that when you see green like this, that's the way my head works. And when I do use highlighters, very sparingly. But every color means a different thing. I don't just go for any color all over the show. Anyway, so we see vector v here. It's represented in two different ways with the angle brackets or as a column vector. And we're going to stick to this column vector notation, not in the physics notation, but in linear algebra notation. And we're going to get the norm of that vector with this ugly notation with the with those double lines on both sides. And it actually makes intuitive sense. So let me try and get a ruler here. There we go. I'm going to have my ruler again. And there was just the axis that we were dealing with. Remember, there's my x axis and y axis. So we're only dealing with R2 here. That's a vector in R2. And there's our little vector going out there. Remember, it has an x and a y component. So there's going to be my x component. There's going to be my y component. And there's a little angle there theta. And this is a right angle triangle. So Pythagoras to the rescue, what is the length of that vector was the right angle triangle. So if this vector is V, it is just going to have a length or a norm just of the square root of x squared. It's x component and it's y component. It's as simple as that. So if we have three and two there, it's three square plus two squares. That's 13 square root of 13. It's the length of my vector. So it really is as simple as that. And if it was out in three dimensions, I'm just going to add plus z squared to that. So I'm just adding the squares of its components. And that's just Pythagoras. So nothing there. Not difficult to imagine that a vector really has a length. Now I can specify a vector in the Wolfram language. We've seen that. So I'm giving it a name. That's how computer languages work. So it can't be one of the 5,000, 6,000 odd keywords or functions. So it's usually this lowercase letter that we give it. And the equal sign in a computer language is not an equal sign. It's an assignment operator. It assigns whatever's on the right hand side of it to whatever's on the left hand side of it. So on the right hand side, I have a list object. And it is a list because they're the set of curly braces. And I've got two elements in there, three comma two. And I'm assigning that to a computer variable. So V is called a computer variable. And what a computer variable is, is what the language does is it reserves a little space in your computer's memory. It gives it a name. And that's the name V. And it assigns an object to that little piece of memory. And at the moment I'm adding, I'm putting a list object inside of that piece of memory. I call it V. But that's how we represent a column vector as a list object in the word from language. And now I can just use the norm function. And I pass it that little piece of memory, which contains my list object and out pop square root of 13. So norm. And then just the name of that. So I could also have this written if I didn't want to save it as a name, I could have written norm, and just pass the three comma two there. Exactly the same thing. By the way, this semi the semi code on you see there, that just means don't print the result back to the screen. Just keep it to yourself, please. And that's all it does. So there I just show you, if I have another dimension, I just keep on adding the squares of the components. And again, then the norm of a vector in three space, three comma two comma one is going to be 14, which brings us to the point of the unit vectors. And we write a unit vector with that little hat on top of it. So instead of the underline, the unit vector of V would be V with a little hat on it. And what does a unit vector mean? It means I'm taking my original vector and it's still pointing in the same direction. So if I look at it in three space, the theta and the phi is still going to be the same. But I wanted to have unit length, unit length, meaning a length of one. And how do I do that? Well, it's actually very simple. I just take a vector and I get its length. And in the end, this is what I do. I divide the vector by its norm, which means each component is going to be divided by the length of the whole vector. So there's some fancy notation for the norm of a vector, get used to that one, because that's much neat a way of writing it. It says the square of the sum of all the components squared. And the components is one to n, n being the number of components. It's exactly what we did if we have a long vector, we had to write all those squares out, but that's just a succinct way of writing it. So if I take every component of a vector and I divide it by the norm of the vector. So look at that. If I have a vector that is one, three, and four, and we had the vector one, three, and four up here, the vector, oh, we didn't. We'll have to do, we'll have to do that one by hand. But anyway, it's square root of 26. So the norm of this vector is going to be the square root of one squared plus three squared plus four squared. And if we do that, that's the square root of one plus nine plus 16. And that's the square root of 26. So that's the norm. And what we're doing here on the inside here, we're just taking the vector and we're dividing it by the norm of the vector. So each component gets divided by that norm. So it's going to be one divided by square root 26. That's going to be my unit vector v hat. And then we have three divided by square root 26. And then four divided by square root 26. And that's exactly what we see here. We just see a cleanup there of the square root 26 there. And you might be told never to express something like that. Just multiply it by that. So that would be the square root of 26 divided by 26. And of course, you can try and clean that up a bit as well. And as I mean in the case of this one. And the thing about a unit vector, if you think of its norm, it's going to have a length of one. It's really just going to have a length of one. So if I were to take the norm of this unit vector, it's going to be the square root of one over square root 26 squared plus three over square root 26 squared and then four over square root 26 and those squared. And if you work that out, this is going to be one by the nature of the beast because we've divided it by that. So if we square all of those, we're just going to get to one. That means the length of one. So all we're doing in this instance, that was ugly, is if I have my vector out here, it's going to be exactly the same vector, but it's just going to have a unit length. So it's going to be one long, but the direction is still exactly the same, which brings us to the standard unit vectors. And that is where we just go one in the direction of my, if we look, if we had this idea of our three dimensional vectors, so there's my X, there's my Y, there's my Z. So I'm going to go along each of these, I'm going to go along each of these, and they each going to have a length of one. And we usually call these I hat and J hat and K hat going along those components. And that makes it very easy for me to express, you can see them express this column vectors one zero zero one in the X direction, nothing in the Y, nothing in the Z. And here with I, with J, nothing in the X direction, one unit along the J and zero and then zero zero one. As simple as that, which also means I can express any vector as this linear combination of the standard unit vectors. So if I had a vector three comma two comma one, that I wanted to express, that will be three times the I hat one plus twice the J hat plus the K hat. That'll be exactly the same, because this is going to be three zero zero. This is going to be zero two zero. And this is going to be zero zero one. And if I add them up, remember my linear system, that's going to be three to one. Exactly what we want. So we can use these constant multiples of a unit vector. And now we already see scalar vector multiplication in the go. This and I multiplied by three, it means each component is multiplied by three. And in this instance, it's going to make this I hat just three times longer, because that's going to be three zero zero. And if you take the norm of that, it's going to be three times longer than the unit vector or very simple and intuitive. Let's just then also talk about the direction of a vector. And once again, if I look just in two dimensional space, let's have that. Let's have our vector up here. And down here, again, that's our x component, our y component, this is a square. That's our angle. And because that's a square right side of triangle, you just use trigonometry, the tangent of theta. Well, that's this opposite divided by adjacent opposite is y adjacent is x. And which means that theta is the arc tangent, the arc tangent of y of x. And that's as simple as that. And the only problem with trigonometry, you really have to be careful in what quadrant you are in. So what I've done has just looked at these quadrants. Here is my first vector. It is at this is a vector one, square root of three, you can write it like that. That's that vector. And which means my x component is one, my y component is square root of three. It's in the first quadrant. And if I take the arc tangent of that, I'm going to get pi over three, which means this angle right here with a positive x axis is pi over three, theta equals pi over three. So it's easy then to do the arc tangent. And the arc tangent has a function, as you can see there in the Wolfram language, arc in uppercase tan. And that is my y and that is my x. And the result comes back pi over three. So let's shift this along to the second quadrant. In other words, my x axis is now negative square root of three. So what I'm doing here is the arc tangent of one over negative the square root of three. And the arc tangent of that is minus pi over six. So that looks a bit difficult because what we're interested in really is this angle. That's what we're interested in. So really, when you get that, remember that that must be subtracted from pi. This whole straight line is pi and I'm just subtracting this a little bit from the whole, from the whole thing. And that gives me this angle that I'm interested in. So that's five, six pi. So look out when you do the arc tangent, you're gonna, you just have to visualize in your head. And what quadrant is this? What am I looking for from the positive x axis to the vector? If we move on another pi over two radians, I'm now negative one comma negative square root of three. And if I take the arc tangent of that, I get pi over three. But this time I've got a subtracted from pi. Because what we usually do here is that let me just fill this in for you. So those two axes, we go from the positive x axis, but we usually, we just stop there at pi radians. Once it goes over pi radians, we actually can express it as a negative. So on this side, we'll express it as a negative and on this side, we as a positive. But that's this convention and this is something you've got to get, you just got to get used to. So in this instance, it's pi over three. I add it to negative pi because this whole thing would be negative pi, negative pi radians, and I subtract that. So I get my negative two thirds pi. So this angle here, the one that I'm really interested in is that one. And that's what I'm going to get. And then in the fourth quadrant, again, now we're still interested in this as a negative angle. And in the fourth quadrant, you can just use arc tan. You don't have to involve pi with that. So I hope that made intuitive sense what vectors are and how I think everything that you're going to learn about vectors has come from this very basic thing. They're very simple to understand as some simple concepts just to get used to. And there's nothing, there's nothing much to it. We can do some very exciting stuff with them. In Sydney, that's what we're aiming for.