If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:8:50

Video transcript

hello everyone so what I want to talk about here is how to interpret the directional derivative in terms of graphs so I have here the graph of a function a multi variable function it's f of XY is equal to x squared times y in the last couple videos I talked about what the directional derivative is how you can formally define it how you compute it using the gradient and generally the way that you the set up that you might have is you'll have some kind of vector and this is a vector in the input space so in this case it's going to be in the XY plane I'm in this case I'll just take the vector I'll take the vector 1 1 ok and the directional derivative which we denote by kind of taking the gradient symbol except you stick that stick the name of that vector down in the lower part there the directional derivative of your function it'll still take the same inputs this is kind of a measure of how the function changes when the input moves in that direction so I'll show you what I mean I mean you can imagine slicing this graph by um by some kind of plane but that plane doesn't necessarily have to be parallel to the X or Y axes you know that's what we did for the partial derivative we take a plane that represented a constant x value or a constant Y value but this is going to be a plane that kind of tells you what movement in the direction of your vector looks like and like like I have a number of other times I'm going to go ahead and slice the graph along that plane and just to make just to make it clear I'm going to color in where the graph intersects that slice and this vector here this little V you'd be thinking of as living on the XY plane and it's it's determining the direction of this plane that we're slicing things with so on the XY plane you've got this vector it's 1 1 it kind of points in that diagonal direction and you take the whole plane and you slice your graph and if we want to interpret the the directional derivative here of I'm going to go ahead and fill in an actual value so let's say we wanted to do it at like negative 1 1 negative 1 negative 1 because I guess I chose a plane that passes through the origin so I've got to make sure that the point I'm evaluating it actually goes this plane but you could imagine one that points in the same direction but you kind of slide it back and forth so if we're doing this we can interpret this as a slope but you have to be very careful if you're going to interpret this as a slope it has to be the case that you're dealing with a unit vector that the magnitude of your vector is equal to one I mean it doesn't have to be you can kind of account for it later but it makes it more easy to think about if we're just thinking of a unit vector so when I go over here instead of saying that it's 1/1 I'm going to say it's whatever vector points in that same direction but it has a unit length and in this case that happens to be square root of two over two for each of the components and you can kind of think about why that would be true Pythagorean theorem and all but this is a vector with unit length it's it's it's magnitude is 1 and it points in that direction and if we're evaluating this at a point like negative 1 1 we can draw that on the graph see where it actually is and in this case it'll be what moving things about when I add a point it'll be this point here and you kind of look from above and say okay that is kind of negative 1 negative 1 and if we want the slope at that point you're kind of thinking of the tangent line here tangent line to that curve and we're wondering what its slope is so the reason that the directional derivative is going to give us this slope is because you think about this another notation that might be kind of helpful for what this directional derivative is some people will write partial F and then partial V and you know you can think about that as taking a slight nudge in the direction of V right so this would be a little nudge a little partial nudge in the direction of V and then you're saying what what change in the value of the function does that result in you know the height of the graph tells you the value of the function and as this initial change approaches 0 and the resulting change approaches 0 as well that ratio the ratio of the F to or partial F to partial V is going to give you the slope of this tangent line so conceptually that's kind of a nicer notation but but the reason we use this other notation this nablus up v1 is it's very indicative of how you compute things once you need to compute it you take the gradient of F just the vector valued function gradient of F and take the dot product with your vector with the vector so let's actually do that just to just to see what this would look like and I'll go ahead and write it over here I'll use a use a different color so the gradient of F first of all gradient of F is a vector full of partial derivatives so it'll be the partial derivative of F with respect to X and the partial derivative of F with respect to Y and when we actually evaluate this we take a look partial derivative of F with respect to X X looks like the variable Y is just a constant so it's partial derivative is 2 times X times y 2 times X times y but when we take the partial with respect to Y Y now looks like a variable X looks like a constant derivative of a constant times the variable is just that constant x squared and if we were to evaluate this at the point negative 1 negative 1 now you can plug that in I'm 2 times negative 1 times negative 1 would be 2 and the negative square negative 1 squared would be 1 so that would be our gradient at that point which means if we want to evaluate gradient of F times V we could go over here and say that that's 2 1 because we you know we evaluate the gradient at the point we care about and then the dot product with V itself in this case root 2 over 2 and root 2 over 2 the answer that we'd get we multiply the first two components together 2 times root 2 over 2 is square root of 2 and then here we multiply the second components together and that's going to be 1 times root 2 over 2 root 2 over 2 and that would be our answer that would be our slope but this only works if your vector is a is a unit vector because and I showed this in the last video where we talked about the formal definition of the partial of the directional derivative if you scale V by 2 and I can do it here if instead of V you're talking about 2 V so I'll go ahead and make myself some room here if you're taking the direct derivative along 2v of F the way that we're computing that you're taking still taking the gradient of F dot product with two times your vector and dot products you can you can pull out that two this is just going to double the value of the entire thing a V of this data with V it's going to be twice the value the derivative will become twice the value but you don't necessarily want that because you'd say this plane that you slice it with if instead of doing it in the direction of you know V the unit vector you did in the direction of two times V it's the same plane it's the same slice you're taking and you'd want that same slope so that's going to mess everything up so this is super important if you're thinking about things in the context of slope one thing that you could say is your you know formula for the slope of a slope of a graph in the direction of V is you take your directional derivative that dot product between F and V and you just always make sure to divide it by the magnitude of V no divided by that magnitude and that'll always take care of what you want that's basically a way of making sure that really you're taking the directional derivative in the direction of a certain unit vector some people even go so far as to define the directional derivative to be this to be something where you normalize out the length of that vector I don't I don't really like that but I think that's that's because they're thinking of the slope context they're thinking of you know rates of change as being the slope of a graph and one thing I'd like to emphasize as always graphical intuition is good and visual intuition is always great you should always be trying to find a way to think about things visually but with multivariable functions the graph isn't the only way you can kind of more more generally think about just a nudge in the in the V direction and in the context where V doesn't have a length one you know the nudge doesn't represent an actual size but it's a certain scaling constant times that vector you can look at the video on the formal definition for the directional derivative if you want more details on that but I do but I do think this is actually a good way to get a feel for what the directional derivative is all about