Understanding Gradient Vectors: Partial Derivatives & Gradients in Height Fields

In summary, the meaning of the sentences is that the gradient vector is perpendicular to the plane near the point (a,b), and that the direction of the gradient is the direction of the slope.
  • #1
chrisyuen
56
0
gradient.jpg


In the context of height fields, the geometric meaning of partial derivatives and gradients is more visible than usual. Suppose that near the point (a, b), f(x, y) is a plane (the above figure). There is a specific uphill and downhill direction. At right angles to this direction is a direction that is level with respect to the plane. Any intersection between the plane and the f(x, y) = 0 plane will be in the direction that is level. Thus the uphill/downhill directions will be perpendicular to the line of intersection f(x, y) = 0.

I read a book about gradient vector but I don't understand what the above underlined sentences meant.

Can you tell me what they mean?

Thanks.
 
Last edited:
Physics news on Phys.org
  • #2
If you look at the graphic where f(x, y) is zero, if you draw a perpendicular line from that point, you will see that the gradient is pointing from that direction.
 
  • #3
chrisyuen said:
View attachment 14310

In the context of height fields, the geometric meaning of partial derivatives and gradients is more visible than usual. Suppose that near the point (a, b), f(x, y) is a plane (the above figure). There is a specific uphill and downhill direction. At right angles to this direction is a direction that is level with respect to the plane. Any intersection between the plane and the f(x, y) = 0 plane will be in the direction that is level. Thus the uphill/downhill directions will be perpendicular to the line of intersection f(x, y) = 0.

I read a book about gradient vector but I don't understand what the above underlined sentences meant.

Can you tell me what they mean?

Thanks.
First of all, those sentences don't say anything about "partial derivatives" or "gradient". What it does say is that if you have a surface (or plane) z= f(x,y) and intersect it with the xy-plane, z= 0, then z does not change and so it's "height" (z-value) is constant: 0. That is what it means by "level". Of course, the same would be true in the case of any plane of the form z= a where a is a constant.

While the sentences don't say anything about the "gradient" it does appear in the picture. One of the things you can show about the gradient is that the rate of change in any particular direction, say at angle [itex]\theta[/itex] to the x-axis, is [itex]cos(\theta)\partial f/\partial x+ sin(\theta)\partial f/\partial y= (cos(\theta)\vec{i}+ sin(\theta)\vec{j})\cdot \nabla f[/itex]. Since a vector of unit length in that direction would be [itex] cos(\theta)\vec{i}+ sin(\theta)\vec{j}[/itex], that says that the rate of change of a function, in the direction of a unit vector [itex]\vec{v}[/itex] is [itex]\vec{v}\cdot\nabla f[itex]. If, in particular, [itex]\vec{v}[/itex] points in the direction in which f is "level"- i.e. doesn't change- then the "rate of change" in that direction is 0: [itex]\vec{v}\cdot\nabla f= 0[/itex] which says that [itex]\vec{i}[/itex] and [itex]\nabla f[/itex] are perpendicular to each other as BryanP says.
 
  • #4
But the picture showed only the projection of inclined plane on the horizontal plane.

That gradient is not the normal vector to that inclined plane.

I got confused with the general concept of gradient.

The gradient should be the normal vector of the tangent of the plane.

gradient.jpg
 
  • #5
chrisyuen said:
But the picture showed only the projection of inclined plane on the horizontal plane.

That gradient is not the normal vector to that inclined plane.


I got confused with the general concept of gradient.

The gradient should be the normal vector of the tangent of the plane.

View attachment 14318

what do you mean by that?
 
  • #6
Welcome to PF!

chrisyuen said:
But the picture showed only the projection of inclined plane on the horizontal plane.

That gradient is not the normal vector to that inclined plane.

I got confused with the general concept of gradient.

The gradient should be the normal vector of the tangent of the plane.

View attachment 14318

Hi chrisyuen! Welcome to PF! :smile:

The f in your second picture is not the same animal as the f of your first picture.

The second-picture-f (I'll call it "F" from now on) is a three-dimensional function, of x y and z, and it defines a surface by F(x,y,x) = constant.

So the F for your plane would be F(x,y,x) = f(x,y) - z;

so your plane is the surface F(x,y,z) = 0.

The gradient of that F is ∇F(x,y,z) = (∂F/∂x, ∂F/∂y,∂F/∂z), = (∂f/∂x, ∂f/∂y,-1), which is the normal to the plane! :smile:
 
  • #7
What I meant was that the gradient vector is not perpendicular to the plane in the first picture, it was only perpendicular to the "intersection of that plane to f=0" but not that plane. And why can you set F(x,y,x) = f(x,y) - z and F(x,y,z) = 0 for the second picture? I understood the calculation but how can you know (∂f/∂x,∂f/∂y,-1) is perpendicular to that surface?
 
  • #8
chrisyuen said:
I understood the calculation but how can you know (∂f/∂x,∂f/∂y,-1) is perpendicular to that surface?

Hi chrisyuen! :smile:

Consider any curve, C, along the surface.

Define a parameter t along C.

So a typical point P(t) on C is at (x(t),y(t),z(t)), and the tangent to C at P(t) is in the direction T = (dx/dt,dy/dt,dz/dt).

Since the surface is defined by F(x,y,z) = 0,

that means that F(x(t),y(t),z(t)) = 0, for all t.

So differentiate w.r.t. t: (∂F/∂x)dx/dt + (∂F/∂y)dy/dt + (∂F/∂z)dz/dt = 0,

which is the same as the dot-product:
(∂F/∂x,∂F/∂y,∂F/∂z).(dx/dt,dy/dt,dz/dt) = 0.

In other words: (∂F/∂x,∂F/∂y,∂F/∂z).T = 0,

and so (∂F/∂x,∂F/∂y,∂F/∂z) is perpendicular to the tangents to all curves in the surface through P(t).

So (∂F/∂x,∂F/∂y,∂F/∂z) is the normal at P(t). :smile:

[And in this case, that's (∂f/∂x, ∂f/∂y,-1)]
 

1. What is a gradient vector?

A gradient vector is a mathematical concept used to describe the slope or rate of change of a function at a specific point. It is a vector that points in the direction of steepest ascent of the function and its magnitude represents the slope of the function at that point.

2. How is a gradient vector calculated?

A gradient vector is calculated by taking the partial derivatives of a function with respect to each of its variables and then arranging them in a vector. For example, if a function has two variables x and y, its gradient vector would be [∂f/∂x, ∂f/∂y].

3. What is the relationship between a gradient vector and a height field?

A height field is a type of function that maps points in a 2D or 3D space to a specific height value. The gradient vector of a height field describes the slope or rate of change of the height at a specific point in the space.

4. How can gradient vectors be used in real-world applications?

Gradient vectors have many practical applications, such as in computer graphics for creating realistic terrain and landscapes, in physics for describing the flow of fluids and heat, and in machine learning for optimizing functions and finding the minimum or maximum values.

5. Can gradient vectors be calculated for any type of function?

Yes, gradient vectors can be calculated for any differentiable function, meaning a function that has a defined slope or rate of change at every point in its domain. However, the calculation may become more complex for higher-dimensional functions or functions with more variables.

Similar threads

Replies
4
Views
2K
Replies
1
Views
190
Replies
6
Views
1K
  • Calculus
Replies
9
Views
1K
Replies
18
Views
2K
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
466
Replies
6
Views
922
Replies
4
Views
2K
Replies
3
Views
1K
Back
Top