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.

## Multivariable calculus

### Course: Multivariable calculus>Unit 2

Lesson 2: Gradient and directional derivatives

# Directional derivative

Directional derivatives tell you how a multivariable function changes as you move along some vector in its input space.  Created by Grant Sanderson.

## Want to join the conversation?

• Shouldn't the vector v be change to its unit vector first? • Why are a(df/dx) and b(df/dy) ADDED together? He didn't really explain this in the video, he just said it would be a "good idea." It just seems to me like they should be kept separate, perhaps as two different entries in a vector.

Oh wait now I get it. I'm gonna leave this explanation I thought of here for people who might have been just as confused as I was. Here's why they get added together...

Think of f(x, y) as a graph: z = f(x, y). Think of some surface it creates. Now imagine you're trying to take the directional derivative along the vector v = [-1, 2]. If the nudge you made in the x direction (-1) changed the function by, say, -2 nudges, then the surface moves down by 2 nudges along the z-axis. Now imagine nudges in the y direction (+2) pushed the surface of the function up more that it was dragged down, by, let's say, +1.5 nudges each for a total of +3 nudges. The surface of the function has moved back up along the z-axis to +1 nudge above where it started. That's why you add the series of nudges together; it's a net change based on how a combination of nudges, in the component directions of the vector, affects the function overall. • The above explanation is amazing, but I would like to add something. Remember that in this video we are talking multivariable function, meaning ℝ^2 --> ℝ, which is the symbol representation of saying that the function takes in 2 independent variables, x and y, as input and outputs 1 variable z. Small changes in x or y can cause changes in z. We add in the video because small changes in x and y cause changes in z only. Therefore, to find the net change to z, we would add the changes caused by x and y. Hope this helps!
• what is the actual meaning of taking directional derivative
i.e; derivative along some other vector • One way to think of it intuitively is to think the direction derivative as What the slope is going to be AS we're moving through a multivariable function in a certain direction.

Imagine that you're hiking on a mountain and you want to know the slope in the direction you're looking. If you think of the mountain as a function, taking the derivative of that function on the direction you're looking will give you the slope of the mountain as you go on in that same direction.
Mathematically you'd just think of the direction you're looking as a vector and then multiply that by the gradient

(I know it's been a while since this was asked but I hope it helps someone)
• In the process of computing directional derivatives the vector itself seems to be more important rather than the direction of it. I mean, differentiation includes just a tiny nudge. Then why should vectors with same direction but different magnitudes(scaled versions) give a different value for it. After all partial differentiation involves nudging input in either direction keeping the other constant . There the length of the x or y axis does not matter. Then why should the directional derivative depend on the the magnitude
of the vector at all? • If I get this correctly.. this is the way I think of it.
Lets say x and y are coordinates on a map, and f(x,y) is the elevation in some hilly region.

Taking the directional derivative with a unit vector is akin to getting the slope of f() in the direction of that unit vector. So if you were standing on a hill at (x,y), this derivative would define how steep the f() is at that point, in that direction.
However if you are moving on the hill, and you want to know how fast you are changing elevation, then your rate of change depends on three things: your speed, your direction and your location. Your direction and location determine the slope of the hill (as mentioned in the above paragraph) but then your speed determines how fast you are going, so if you double your speed (i.e. double the magnitude of your vector) then your rate of change doubles as well.
• the formula for the directional derivative used in this clip is good only provided the direction vector is a unit vector. • i am wondering about how adding the rate of change of x component and y component leads to the rate of change of vector V .please save me • I don't understand the use of gradient at isn't the gradient of a function a vector! This is driving me nuts :( • I don't think I'm quite following the idea of visualizing the output of the function on a real number line. Are the "nudges" on the number line representative of changes in the f(x,y) produced when the original value is "nudged"? How come when y is nudged up the value of f goes down? Or is it more of a conceptual idea and not taken quite so literally?   