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

Gradient vectors always point perpendicular to contour lines.  Created by Grant Sanderson.

## Want to join the conversation?

• So, when you show us the vector field of Nabla(f(x,y)) = <y;x>, you say that the more red the vector is, the greater is its length. However, I noticed that the most red vectors are those in the center (those that should be less red, because closer to the center, smaller the variables) • I'm pretty sure that vector field color is wrong. If we assume that solutions for f(x,y) used for drawing contour lines are evenly spaced numbers exp. f(x,y)=2,4,6,8,10,12,... then the more dense contours further away from the center should represent steeper descent ( and vectors should have warmer color to them). I mean its a small mistake, but for someone trying to wrap his head around concept of gradients this will cause some headache.
• Given a vector field, is it always the gradient field of a function? • Great question! Most vector fields are not gradient fields. I'll make videos on this soon, but some vector fields have the property of being "conservative vector fields". There are several equivalent ways to define a conservative vector field, which involve various topics you'll come across later on in multivariable calculus (line integrals, curl, etc.). A neat result is that only these conservative vector fields can be the gradient of some function.
• At , grant said red vectors are super long but they should be super small right ? • At and , the transcript reads "direction of steepest descent". Shouldn't the correct word be ascent? I'm not sure if this is just a typo or actually correct. • Does the orthogonality propierty of the gradient vector mantains as we go into higher dimensions? Is it orthogonal to level surfaces and so on? • where is the video on the contour map? • How can a 2D vector represent the direction of the steepest ascent in a 3D graph? • Gradient is always perpendicular to contour lines. Still not sitting with me 100%. May have to watch this a few times.

I understand that perpendicular distance will be the shortest and can involve the greatest gradient when moving from one contour line to the next. Why is that the focus? • 1)For consideration:Closer the contour lines,steeper is the curve.

2)To find the direction of steepest ascent we need to move in the direction in which we encounter the most number of contour lines per unit distance we travel in the X-Y plane

3)This direction has to be perpendicular to the current contour line on which we are standing(Since the shortest distance along two curves is along their common normals....)

4)Hence the gradient has to be perpendicular to the contour lines.
• At (and later again at ) its said that the gradient points towards the steepest descent while referencing the previous video, which says that the gradient points towards the steepest ASCENT.

Is it safe to assume that this is just a small fumble? If not, what makes this gradient different compared to the previous one?  