I’ve been reading the whole day and now I’m more confused then when I started. Some say that gradient is always perpendicular, and others say it always shows the direction of steepest slope, which should mean tangent?

Lets take simple functions like:

f1(x)=x2f_1(x)=x^2

f2(x,y)=x2+0.5y2f_2(x, y)=x^2+0.5y^2

The gradients should be?

gradf1(x)=dfdxˆi=2xˆigrad f_1(x) = \frac{df}{dx}\hat i=2x\hat i

gradf2(x,y)=δfδxˆi+δfδyˆj=2xˆi+yˆjgrad f_2(x,y) = \frac{\delta f}{\delta x}\hat i + \frac{\delta f}{\delta y}\hat j

=2x\hat i+y\hat j

As I get it, these vectors really point in the direction on the steepest slope, and their magnitudes are proportional to the slope steepness. But they are neither tangent or orthogonal to the curve f(x) and surface f(x,y). For the first function it is a vector on an x axis, and for the second function it a vector on an x-y plane.

But if I write the functions differently:

x2−y=0x^2-y=0

x2+0.5y2−z=0x^2+0.5y^2-z=0

And then do partial derivatives of the left sides, I get some components:

2xˆi−ˆj 2x\hat i -\hat j

2xˆi+yˆj−ˆk2x\hat i+y\hat j-\hat k

These vectors seems to be orthogonal to the curve and the surface, but what are they?

Also, what would be the gradient of a plane that is angled 45آ° to the x-y plane cutting it along x axis? Where would it point to, and what would be it’s vector components.

=================

1

∇f(x)\nabla f(x) is always perpendicular to the level curve of ff through the point xx. Also, ∇f(x)\nabla f(x) points in the direction of steepest ascent for ff at xx. These two statements are consistent. If you’re standing at xx, and you want to increase the value of ff, should you start walking along a level curve? No, because then the value of ff will not change at all.

– littleO

Oct 20 at 23:29

OK, it is perpendicular to the level curve, but it can point various directions from that single point on a level curve, and still be perpendicular to it. Where exactly does it point? Straight up into the sky, into the hill, up the hill (tangentially)?

– Cornelius

Oct 21 at 1:30

Keep in mind that if f:R2→Rf:\mathbb R^2 \to \mathbb R, and x∈R2x \in \mathbb R^2, then ∇f(x)\nabla f(x) is an element of R2\mathbb R^2, not R3\mathbb R^3. There are only two directions in which ∇f(x)\nabla f(x) could point in order to be orthogonal to the level curve of ff through xx. There are not various directions from that single point, only two.

– littleO

Oct 21 at 2:10

So, for a function of two independent variables, which is in fact a 3D surface, gradient lies on a plane parallel to x-y plane? So, it is neither tangent, nor orthogonal to the surface itself. It is just orthogonal to the level curve of the surface at that particular point?

– Cornelius

Oct 21 at 2:13

And then about the last paragraph of my question, for a plane f(x,y)=xf(x, y)=x , it’s gradient lies down in an x-y plane, it is always equal to one, and is pointed same as x axis for all the points?

– Cornelius

Oct 21 at 2:18

=================

=================