 So, let me just remind you, right, so last time we talked about the function R in R is differentiable at some point, rather than jump today. If two things happen, P is in the interior, so it's not an isolated point, it's not on the edge, and also if you take the limit as divided by that distance minus, oh, sorry, there is a vector of that, the same a dotted with the unit vector x minus t, it's linked. And so here, that's the definition and in fact, a is the gradient of f, the vector, which is the vector of partial derivatives. This we did last time, so what this is really saying, oh, sorry, equals zero. So those two things tend to be the same. Somebody would say we don't have to divide by the links, but we do, because if you don't divide by the links, then you just have the limit of one thing going to zero minus another thing. Yeah, it's just you have zero minus zero. Of course it's always zero as long as that limit exists. Right, because we don't divide by these links, and this goes to zero, this goes to zero, there's nothing interesting going on, we can put any vector. But if you divide by the links, this is saying just like in the single variable case, if you look on, so this says on a really small scale, looks like in the very middle of the term, a constant that's this part, plus the projection onto some vector a, onto some vector a, that's what that's saying. So this business, so this gives you a unit vector, or this business and this business is really saying on a really small scale, because we blow it up to a normal size. So this is sort of the same as in the single variable case, if we, here's my analog of p, and I blow up this picture, so this distance is my x minus p twice with, and I blow up this picture, and then I blow up this picture again, and I keep blowing this picture up, and more and more it looks like a straight line, with slope, well in this case the slope is, well whatever, with this negative slope, it looks more and more like a straight line, where this slope here is the derivative. Now here we don't really have a slope, because my function is well in two variables, I have some surface, this is my surface here, my point p, and I zoom in, I blow this up so that it looks more and more flat, and this vector a is giving me this tangent point, well it's not really the tangent point, is giving me something about this slope, in fact I'm drawing the wrong vector, it's this way. It's actually where it tilts the most, and this is a projection, the change here is pretty much the direction, if I go in some direction like this, and I look at how much I blow in this direction, it gives me kind of the same thing. So this is, this is, this vector is playing the role of this slope. Yeah, that's just to rule out, so. Yeah, so p is a point where the function is defined, if it's not in the domain of the function, this doesn't make any sense, and not only does it have to be in the domain of the function, it can't be in the edge, so I can't, just like in this case, if this function ends here, I can't take the derivative at the edge, and similarly, if this thing has a hard edge, it can't take the derivative here, or if I have an isolated point here where it's defined, I can't take the derivative at that isolated point. So we have the same condition in one variable, we have to have a neighborhood or an interval around, around the point where we're taking the derivative, you can't take the derivative just at the edge of where it's defined. And the same thing here, we have to be able to take this limit in all directions, where we can't have a cut, because then weird stuff could happen. So we really need, in the domain of this p, we really need all around, so that we can come in from all the directions and look at that limit. Yeah? There's no idea of coming in from all sides, it's like analogous to, like, left sided and right sided limits. Yes, it's like we have left sided and right sided limits, so in one variable, there's only two ways you can come, you come from above or below. Here, I want to be able to come from above, below, right, left, up, down, part way through all the variations. I need space around it. On the line, right? On the line, I just need space around it, but there's only two ways to go. So this is the, this statement is the analog of saying I have both left and right limits. This is just saying I have left, right, and all combinations of up and down and all around. Yeah? What is the gradient of the unit? It's the vector that, it's the vector where the function increases the most. It's the direction in which the function is steepest, but we'll see that in a little while, but this, so it gives us a direction, right? The gradient that doesn't live, so I first drew this, and that's wrong, because the gradient doesn't live in that space, right? The gradient, I'll draw a picture of it. So again, I have to think of, I mean, I can draw my surface, so I'm going to draw a picture as a function from R2 to R. I want to think of, so I take this plane and I lift it up there to get my surface. So this height, so this is, this is the land where x and y live, and this height is the f of x, y direction. And if I have some point, p, p lives here. p is a combination of x's and y's, right? And the gradient vector, so the gradient vector here lives here. The gradient vector is some relationship between x's and y's that tells me about the tangent plane. Well, it's a, it's a number, it's a vector. It's not a number, but it's a vector. It's constant. Just like the derivative at, so just like if f, if g of x is x squared plus 5x, g prime of 1 is 2. g prime of 2 is 2 times 2 plus 5 is 9. It's a number. And that is the slope that tells me how much g is changing at this point. Similarly, if f of x, y is x squared y plus 5x, there we go, then the gradient of f at some point 1, 2 is, so now I have to compute the partial with respect to x, so that gives me 2xy plus 5, and the partial with respect to y gives me x squared evaluated at 1, 2, which is 4 plus 5 is 9 and 1. So this guy, this vector of 9, 1 is telling me that if I go, if I increase 9 in the x and 1 in the y, that's like the slope. That's the place where the function increases the most. Yeah. Is something gradient technically defined for three variables? Any number you want. Any number? Yeah, this is a gradient too. It's a gradient of a function from R to R, so it's kind of, it's the vector 9, which is, right, and I can define the gradient for 23 variables, number 1. It doesn't matter. It's easiest to visualize in the case of either 2 or 3 variables because it's all the same. So one thing that you should keep in mind is that everything we do in this class should apply, if you interpret it correctly, two single variable calculus. So here when we have a gradient, we have a one vector, which is also a scalar. So the derivative is a gradient, which is not a very interesting vector. So you should always, when we talk about something, you should say, how does that compare to the thing I already know? How is it extending that other notion? Because that's really what the whole point of this is, is take the stuff that you worked out in one variable and extend it to more than one variable. See that it's the same thing if you think about it the right way. All right, so we did that, and I remember we did that. So this is, you know, this is a very important idea. Yeah. Is there a concept of gradient like for a vector value function where you have like R2 to R3? Yeah, that's what I want to get to today. Okay. It's called the derivative. Wow. So the gradient is like a special derivative, but we want to generalize that to functions from R2 to R3 or R1 to R3, all of those things, right? We're not quite there yet. We're kind of, I mean, if you think about it a little bit, you could probably figure out what it's going to be because it's kind of like the gradient. So we've already covered the case. So let me not tell you yet, but I hope we'll get there. We already talked about a function from R to Rn, and we, so we know what f prime of t means as a vector, and we've also talked about, I'll use g now, some function g from Rn to R, and we have this gradient object which is also a vector. And you want to sort of, maybe one of these should be m. You want to sort of put these two ideas together. If sort of one goes one way and one goes the other way, so it shouldn't be surprising if we have some h from Rn to Rm, it's going to be. These are both vectors, but they're sort of vectors measuring two opposite things. So this would be a matrix to count of h prime. Derivatives of h is a matrix. So this is a linear approximation of this function, and it has to be a vector. This is a linear approximation. This tells us something about the linear approximation to this, and it's a vector, but it's sort of a vector on the input side. This is an output vector for an input vector, and this we need to consider both how the inputs vary and how the outputs vary in the matrix. So I'll come back to that, I hope, in about half an hour, 20 minutes, something like that. I'm not quite ready to go along. Other questions or? No, you have a question. Yeah, but I forgot you long ago. Sorry, it's okay. So a, gradient vector, that assures us that we do that with a circle in this quickly arrow symbol of direction. It doesn't matter what direction x approaches from. A would be able to scope it out, whether it's limiting the problem. So, I mean, in this picture, there's going to be some vector a here. And we can approximate, so f is going to take this picture, and it's going to send it, well, to some height, or some width, whatever. Right? So think of it as just squishing. And we want to say, well, gee, how does f affect? I have the other color. How does f affect stuff along this line? So the gradient, figure out how much is going to change along that line, we can just sort of look at how it changes along a. And that gives us some idea of how f moves everywhere. So we can take any direction here and somehow see how f transforms these green things by just looking at the projection of that on how f will hit a. And the projection, all the lines should somehow match up. Yeah. I mean, again, it's only on a very small scale. On a very small scale, this function f, maybe it stretches a lot here. Right? So, I mean, this picture isn't very good. But on a very small scale, maybe f grows a whole lot, grows a lot here, and only a little bit here. But on a very small scale, there's some constant rate of change. What it derivative does is it replaces something wrongly here with something linear. And our linear map is just a dot product in some vector. And so this a is the vector that we're taking the dot product with. This a is also called the gradient of f. The gradient of f is the vector on which the function acts like a dot product with. Remember a dot product, I have one vector and I have another vector. And if I take the dot product of these two, it's giving me something about the projection onto that. Well, in some sense, all linear maps from rn to r are just like a dot product. I'm just taking combinations of the x's and the y's. I mean, it's okay. This is a really important point. If you come in on a line orthogonal to the a gradient should a zero. So then the function should be in that small neighborhood constant. That's right. So, I mean, if you think about some tangent plane, because the thing is essentially a tangent plane. And I know that it's steepest this way. This is the direction. This is the direction. This is now thinking of it lifting this up. This is the place where it grows the most. That's the way to walk uphill with fastest. Well, if I go orthogonal to that, I'm not going uphill at all. These are the contour lines. This is I don't go up. I don't go down. I just go opposite from up. I don't, you know, up that way and down this way and I just walk along to the top. And if I go a little bit above, well then, my gain is just how much of that I actually used. So this, this thing is like having a little arrow that says this way up, you know, to the top. That's what that gives us. It tells us the direction in which the thing grows the most. Yeah. If you remember your exact statement was about dotting a vector with a gradient kind of difference. It gives you the amount that that vector sees of the gradient. If I have two vectors and I take their dot product, I'm essentially taking the projection of the one vector. It's the angle between them. So I'm taking the component of that vector in that direction, the reason for this is that the product was like projection times the absolute values. It is. So we're going to do the absolute values of the other two. Oh. Yeah. So I'm, I'm, I'm being a little fuzzy when I'm saying projection. Okay. It's just like a derivative is the projection onto the line that it started with, but then scaled by how much it stretches. So, so when you are looking at something or like something very small you're doing is taking a vector and like mostly we have a particular vector as a group base. I think a vector on the xy plane is not that would be brilliant and that would give me how much. Well, the gradient has to have something to do with the function. Right. I can't just take an arbitrary gradient. So, so, so let me, let me talk a little, let me say another thing and then we'll come back to our score. Okay. We're alright with this? I hope maybe. Alright. Somewhat kind of sort. Okay. So let me, I'll leave that. That picture has nothing to do with anything, but I'll just come. I'll leave this. Although I don't know why. Okay. So, this, this gradient function is a kind of a derivative, but it's not a derivative, but it says something about the derivative. And now let's, let's try, so we already had this idea of the partial of f with respect to some variable x. Right. So if I have f of x, y, I don't care, z, whatever. But this is the limit, let's say at some point b. As x goes to p, t goes to 0. Just to 0. Um, f of, f of x plus t, y, whatever, all of the variables. Let's just do x, y. Minus f of, oh, this is, yeah. Okay. Let's just do it that way. x, y over t. Right. This is our derivative in the x direction. This is a number. It's a scalar. It is not a vector. But we have several of these. We can fix any, any particular coordinate vector we like. We look at a limit like this. It gives us the slope, the amount of change in that direction. Well, we don't have to be limited to the coordinate directions to do this. We could, by analogy, say, suppose we take any vector v, which is not 0. We want the 0 vector. But we take some vector v. We could make a similar limit. So this is the derivative with respect to some vector, which we could take as the limit as t goes to 0 of f of x plus that vector minus f of x over, so we can certainly define this thing. Remember, x is a vector. t times v is a vector. So we can certainly do this. Whether it means anything or not is a different question. We can certainly do this. Right. So we can just take some vector and look at the derivative. Let's just define the derivative with respect to that vector, which is some combination of x and y as this. So as an example, I'm not saying what it means. It's just a thing. So we could take v to be the vector of 1, 2 and f of, let's just do two variables to be, I don't know, x y squared. Maybe x squared. Let's do x squared. Okay. And so now I can define the partial with respect to the vector of 1, 2. Derivative with respect to the vector of 1, 2. So this is sort of a direction, a direction, but it also has a length. It's defined to be the limit as t goes to 0 of, right now, x plus t plus 2t squared minus x cubed y squared. Right. So this is something. But in fact, so, but I don't want to do that. What would this thing mean? I mean, so you can do it out. You can take the limit, blah, blah, blah. Yeah, okay. I have a guess. The derivative in the x direction plus the derivative in the y direction. Okay. So the claim, the guess, let's call it a guess. Yes. This is, you're saying this is x 3x squared y squared times 2 plus x cubed 2y, oops, times 1 times 2. Is that what you're saying? Yeah. Okay. People think that's maybe true. I don't care to forget about what it means. It's just a limit. I think it's true. Why not? Sure. Let's just say it's 7. No, x is in y's here. So what is this? This is the gradient of f dotted with where you came up with 1, 2, blah, blah. Right. So this is the gradient of f dotted with p. Now, really, I've been just thinking about everything at a point, but fine. Think of x and y as constant here. So that's fine. So that's actually true. So this is just a definition that we can just define for the heck of it. But, so this is actually, I don't know, we call it a theorem. The fpv, this funny vector derivative, is in fact always gradient of f dotted with v. So if f is differentiable at the point where it matters in the neighborhood of that point, then that's true. Well, so if, yes, it's differentiable x. So in other words, just when we sit there, so if v is v1, v2, v3 up to the edge, then this is v1 partial f partial x1 plus v2 partial f partial x2, blah, blah, blah, blah, plus vn partial f partial xn. So through that, although, I don't know, does this seem reasonable for people or does it just seem like I'm just writing garbage? Or maybe both. The combination of the both. Okay. So here, I'm differentiable in some vector x. I think you have x as fixed. Then the partial here fx is the gradient fx. So let's see why this is true. And then I actually only want to see what it means in a special case. So f is differentiable. So it's differentiable in some vector x. And so now I'm going to think of x as playing the role of p here in this definition. And I need some other letter to put for the x here. So let's call that s. So by the definition of what that means, that means if I write here, should I write here instead? It's too hard to see here. Okay. So since f is differentiable in s, I'll just copy that down. That's the limit. As my variable s tends to my fixed state x of f of s of the vector minus f of x of the vector over the distance between s and x minus the gradient of f evaluated at x dotted with s minus x over its length. So that's just rewriting the definition of, you know, I know a is a gradient. So let's just rewriting that here. So I'm going to use the substitution using s for the thing that moves and x for the thing it moves to. Right? Okay. So now in the special case, not s, if, so if we take s to be x moved a little bit in the v direction. Right? That's all that says. So just think of t as some small number and it just says, start at x and move away from x by t times my vector v. Then we can just rewrite this. Oh, this equals zero. I always predict it equals zero. So that equals zero. Let's write it here. Zero equals that. So that equals this. So I can rewrite this. This is the limit. Well, since s equals x plus tv, that's the same thing as saying tv goes to zero or t goes to zero. So I can just put a t goes to zero here. And then here I get f of x plus tv minus f of x. That's just this part. And let's put them all over one direction. Minus gradient of f at x. And then s minus x is tv. And this is just left over nonsense. And then we divide everything by the length of s minus x. So that's the length of the vector t. So these are equal. This is zero. Yeah? Okay. So now what? I can cancel this t out. So t is going, since this is zero, I don't care about the sign of t. So if I change the sign, it's still going to zero. So that means that I can divide t by absolute t. And it's still going to zero. Right? So I can cancel out this t. I don't know why I put it together. I want to split it up. So this t and this t can cancel out. You want to do much to it. Except maybe let's put the v out in front. So let's actually write this. I'll do the same thing. So I have a fact, this is a number. Remember this whole thing equals zero. This is a number. So I can just multiply through by this number. This number isn't zero. So I just forget about the v on the bottom. And since this whole thing equals zero, I can just move it over there. So that's what I want. So I'm done. Yeah? Okay. So do you put that using the one definition of a gradient? I use the definition not really of the gradient, but of the derivative. But yeah. So, right? The function has a derivative or it's differentiable. If there is some vector, what do we have to call the gradient? For here we can call a whatever. There's some vector that we call grad a. So that this is true. The definition is a divided by b. I would call it a. Sure. I mean, this notation, we adopted as this vector. And then we showed that that would be the vector of partial. So if you remember last time, we just said there's some vector. Just it's a vector. Whatever. And I'm going to call that vector a with that higher gradient a. So I'm going to start writing this. And that vector, by the way, happens to be the vector consisting of the partial. So this is not a definition. Yes. It's in the reading of it. But this is not a definition. This is a fact. This falls out of this definition. So given that, so I didn't really use this part in there. Just did the thing using that definition, changing the letters around calling xs and then you'd be able to get that. Is there another question? Okay. So that means that whatever the heck this thing represents, it's easy to calculate. And it represents something which is something not actually very useful, but it's a thing. But in the special case it is useful. And that special case is the useful case. And then we can forget about the other part. If b is a unit vector, so let's call it u, then taking the derivative with respect to the unit vector, well the theorem tells us that this is the gradient of f dotted with that unit vector. This is called the directional derivative. Or if you prefer it's the derivative, the direction. So let's just do this same example again where we take u to be, well I don't want 1, 2 because the length of that vector is not 1. I want it to be a unit vector so I have to divide by root 3. Sorry, root 5. That's a unit vector. It goes in the direction parallel to 1, 2. And if I take, let me also write it, sometimes this notation is a big D with a real u. So it's d sub u of f. So the directional derivative of f in this u direction is whatever that number was, oh I didn't do it at a point. So let's do it at a point. At 1, 1 is, I've lost, what is f? Let's write what f is. f is x cubed, x cubed y squared. So f of x, y is x cubed y squared. So let's calculate the directional derivative of f at the point 1, 1. Well it's just take the partials, 3 x squared, 3 x squared, y squared, 2 x cubed y dotted with 1 over root 5, 2 over root 5 and evaluate this at 1, 1. So that's 3, 2 dotted with 1 over root 5, 2 over root 5 which is 3 over root 5 plus 2 over root 5 which is 7 over root 5. It doesn't matter if you evaluate it before. No, no because this is a vector. So then the first partials are just special cases of directionals. Exactly. So the first partial is just the directional derivative in the x direction and in the y direction. And this is, this is the rate of change in the u direction. This one is kind of stupid. It's the rate of change in the v direction times the length of v, which is kind of, I don't know, not so useful. It would be like taking the derivative with respect to 3 x. Usually you don't take the derivative with respect to 3 x. So here, once we divide it and make it a normal length, then it's something kind of useful. And this is, this is exactly, I guess I'll come back over here. So what this is, again let's just say I have my surface here and I choose some direction u like that, which is say here on this surface, those things are just lifting up. My function looks something like that. This is in the u direction. And I'm just looking at, if I cut this thing open, I take out a saw and I cut it like this. I cut it along the u line. Then I have a graph here which corresponds to this slice. And then at this point, where my point is, here, this is the slope of that cut. That cut is not parallel to x. It's not parallel to y necessarily. It's just at some angle, some combination of x's and y's. And that just tells me the slope if I cut that thing open and look there. So I'm going to cut it going more y than x, twice as much y as x in this case. Increase y twice as much as x. And I get some slice like that. So this directional derivative gives me that kind of a measurement. So it's the slope of the tangent in the u direction. Any questions about that? So I'm sorry I don't do a whole lot of examples, but we only have a little bit of a problem. So we're all right. What are the axes on that thing that you just drew? Is one the vector? I'm sorry? What are the axes on the plane that you just drew? So the axes on this plane, so this picture is not the 1, 2 vector that I talked about because the axes in this picture typically would be like that. And so this is something like the vector minus 1, minus 1 plus 2. Something like that. Right? x is negative in this vector. I mean, you know where you have the vector on the up here? No, right next to it. Yeah, that one. Okay, what are the two axes? So what I did here to make this picture, I cut this thing open in this direction, and so cut it open in this direction. This surface cuts that plane in some direction, and my axes in that direction. So here this picture is I draw now this picture, the green, and I lay it down flat and I see that. So it's not the standard axes. It's I've rotated my axes so that my horizontal axis aligns with you. And that's the picture I'll see. Does that make sense? Yeah, I got it. So this, I mean this would enable us to, for example, take a derivative of a function with respect to negative x, because we look in the negative one direction, which will just flip it around and give us the negative slope below x. Okay, other questions on directional derivative? They're very easy to calculate. You just take the gradient and you dotted with the vector that you want, and that's what it means. It means the derivative in the slope in that particular direction. Okay, yeah, sure. Maybe you want to know, so maybe, so say you have a, you have a, suppose you have a function that describes, I don't know, the rate of increase of something. So I have a, I have a, suppose I, suppose it's an economics problem. So I have some, you know, I know that the revenue or the cost of producing something is, take the amount of, I don't know, free inputs, A, B, and C. So let me not, you know, you have sand, you have water, and you have gold. You're going to do something with sand, water, and gold. And the cost of it is the square of the amount of gold and the quarter of the amount of sand and the cosine of the amount of water. That makes no sense at all, but that's what it is. Okay? And so now I have, now I know that I'm always going to make something in the ratio of 312. So if I increase my amount by a little bit, how much will my cost increase? By doing it in the ratio of 312. And so I really want a directional derivative in the direction of 312. But of course, I don't want the 312 to count, so I want to divide by the length of, so what's that, 9, 10, 14. So I'll take the directional derivative of that cost function in the 312 direction. So if that will tell me how much if I increase a little bit, how much does my cost increase? Because both easier and essentially clearer. Yeah. It's just a way of saying I'm specializing to a specific line. Also, I mean, if you imagine that you have some hillside where you know if I have some surface like that and I have some curve that goes along that surface, how much is it increasing right now? Will that be the directional derivative in the direction of the tangent of that curve? That'll correspond exactly to the tangent vector of that curve. So maybe in the base I'm tracing out some spiral path and so on this hillside, how much do I go up or down in this case if I trace out that spiral path? I don't know what that path is. That's complicated. But it's easy to calculate because I can just say well at that point I just want to look at the directional derivative in that direction tangent to that curve and tell me how much I'm dropping along that path. Okay. Okay. I don't know that we're going to get there. I will try. Yeah, I guess I really kind of want to say this. So one other thing that I want to mention and I'm worried too much about it but I think it's worth mentioning, maybe you remember from single variable calculus there is this theorem of the mean value theorem that says that if I take, I have a nice function and I take two points A and B that there's a point somewhere in between where the tangent line is parallel to or has the same slope as the difference in the values. So the mean value theorem says if F is differentiable on some interval AB, then there exists some C in that interval so that F prime of C is the same as F is coming in minus F of A over B. So that's the one variable mean value theorem. And this has this, you know, when you do this in calculus one, people go yeah, why do I care? What the heck is this? But you need this to be able to prove a lot of things and in particular one consequence of this, of this theorem which seems kind of stupid but it's true is that if the derivative of a function is zero then that function is constant. So this implies if F prime of X is zero on some interval then FX is constant. So that's one use that follows from the mean value theorem is to be able to prove that fact. You prove early on that the derivative of a constant is zero but that's the only way you can get a zero derivative on an interval. Right? It's a singularity fact. So there is a mean value theorem for more than one variable. So but the mean value theorem is really like a line kind of thing. So the mean value theorem for say some function of R end of R. So suppose I have a line, I'm going to use gamma. Maybe I should use s. And it's all inside the domain of F. So F is defined in some open blob and there's a straight line connecting two points P and Q. Oh shoot, I changed my notation. Oh well. Then and F is differentiable around that line. Then there's some point C, there's some vector C on that line so that, and I guess I need to look there, the difference in the values, I guess the Q is the end, is the same as the gradient of F evaluated at C dotted with the vector Q minus P. So this is sort of a directional derivative version of the mean value theorem. But this is the mean value theorem interpreted in the context of a directional theorem. But that means, so let me not prove the mean value theorem, there's a proof of it in the book. It works exactly as the proof of the mean value theorem in one variable except you have to make sure everything's a vector where it needs to be a vector. So this means that if the gradient of F, a constant sum open is zero, the zero vector on some open set called a blob, so I'm connected in the domain of F, then F is a constant. So again, exactly by analogy with the one variable proof, it generalizes the two variable. Now it needs to be connected, right? If I have a function where the gradient is zero here, and even if it sort of sneaks inside, and then the gradient is zero here, that doesn't mean that the function is constant because these could be different constants. In the same way with the single variable, if I know the derivative is zero here and the derivative is zero here, it doesn't mean the function is constant. Okay, so I just want to mention that. It makes me feel bad if I don't at least mention this. Any questions at all, man? So I mean this is really just the mean value theorem in one variable, but you don't want to align that maybe it's just a ratio of x to y. It's really just the mean value theorem. So I guess I did say I would get to something, so let's get there. So now let's move up some dimensions. Let's consider general functions. So now I'm going to consider f taking rn to rn. So this function takes in an n vector and gives out an m vector. And so associated to this, we don't have a derivative vector. So what we want, we want df or f prime derivative. Well, the derivative is always the best linear approximation. Well, linear maps are matrices. A linear map from rn to rm is an n, an n by n matrix. It's just a combination of all of the variables in each of the variables. So if I take an n by n matrix and I multiply it by, so if I take 1, 2, 3, 4, so they're from 2 to 2 times x, y, this gives me x plus 2y is the new x variable and 3y plus, sorry, 3x plus 4y, the new y variable. So the linear map in each of the components. And I have some mapping f. Let's just do r, I don't know, rg, r2. Let's just have an example. So this would be something like f of x, y, z is, well, I get 3 coordinate functions. I get say x squared plus 2z, xyz, z plus x plus y. And then to stop at 2, okay. So I put in 3, I'll come here, right? Yeah, otherwise it would be r3, r3. So I want to approximate this by linear, some matrix thing. Well, but if you think about it, this is just, I have some function f1 of x, y, z here and f2 of x, y, z here. And I already know how to calculate derivatives with respect to a function from r3, r1. Gradient tells me I know how to calculate from r3 to r1. So each of these coordinates I can view as separate functions from rn into r. Or I could cut it the other way and I could look at the column vectors, except I have far too many. I could also look at the other way. Okay, so that means what I want to do is some combination of gradients. So that means that what I can do to find derivative matrix, well, I just take a partial of f1 with respect to x and the partial, what do we call it, x1? Partial of f1 with respect to x2. And let's see, how far across do I go, m or n? Partial of f1 with respect to xn. And then down this way I take partial of each component function until I get to the last one. That's an n. That's an n. Right? So I just take all of the, so these are the, these are the gradients of each of the component functions, but I'm not adding them. I'm just listing them. These are gradient vectors. So I'm not dotting them. And these, these guys are actually the tangent vectors with respect to a given code. So, right, the columns are tangent vectors and the rows are gradient vectors. Do an example or two? I guess I'm moving this way. I should probably be speaking in Hebrew or Arabic. I don't know this way. So maybe an example, let's say f of x, well I wrote one over there. Let's see if that is it. f of x, y, z is, I can write it this way, x squared plus 2z x, y, z. So then the derivative matrix is going to be, well it's going to be 3 by 2. So I'm going to have the partial of this guy with respect to x, the partial of this guy, wait, the partial of this guy with respect to y, the partial of this guy with respect to z, the partial of this guy with respect to x, the partial of this guy with respect to y, the partial of this guy with respect to z. And at a given point, so let's say you just plug in 2, 0, 2, 6 and this tells us that it tells us something how this function of three variables changes when I vary those three variables. So this tells us that near the point, near 1, 2, 3, the function of x squared plus 2z x, y, z, 1, 2, 3. What is it? So 1, 2, 3 is 1 plus 6 is 7 and 6. It's a lot like 7, 6 plus 2, 0, 2, 6, 3, 2 times, let's call it u, x, y, z. Let's call it x, y, z. So this is saying, so that is 7 plus 2 delta x plus 2 delta z, 6 plus 6 delta x plus 3 delta y plus 2 delta z. Again, thinking delta x delta z, these are small quantities. So we could also write 7 plus 2 times x minus 1, 2 times z minus 3, 6 plus 6 times x minus 1, so 3 times y minus 2 plus 2 times z minus. This is just sort of putting together all of the stuff that we've already done where we're just looking at how it varies in each of the output components gives us a derivative matrix. So maybe another way to say the same statement that's left is so we have some function f from Rn to Rm. Then I have a tangent approximation, so I have some point near some point b in Rn. Then the tangent approximation to my vector x is going to be my function evaluated at the point plus my derivative matrix evaluated at the point dotted with the distance between the x vector and the point where I think of this as a column because this is a matrix and the dimensions will be wrong but I don't write that as a column. My tangent approximation is the value plus how far away I moved in the various input directions times the derivative matrix. That sort of puts everything together for a general function from Rn to Rm. I'll do a couple more examples next time and then we'll move on to the vector field because you're still the same kind of thing for any program. Okay? I will update the homework.