Difference between revisions of "Gradients and Directional Derivatives"

From Math Images
Jump to: navigation, search
Line 4: Line 4:
 
|ImageIntro=This image shows gradient [[Vector|vectors]] at different points on a contour map.  These vectors show the paths of steepest descent at different points on the landscape.
 
|ImageIntro=This image shows gradient [[Vector|vectors]] at different points on a contour map.  These vectors show the paths of steepest descent at different points on the landscape.
 
|ImageDescElem=[[Image:Contour3.JPG|left|thumb|Graph and contour map of a function: Click to enlarge]]
 
|ImageDescElem=[[Image:Contour3.JPG|left|thumb|Graph and contour map of a function: Click to enlarge]]
A '''contour map''' utilizes the concept of '''level sets'''.  A level set is the set of all points generated when a function is made equal to a constant.  For example, one level set of the function <math> z = x^2 -y^2 </math> is <math> 3=x^2-y^2 </math>.  Setting a 3D function equal to a constant in this way yields a '''contour curve'''.  These curves are curves with constant z-component, and when representing a landscape, they show constant height.  
+
A '''contour map''' utilizes the concept of '''level sets'''.  A level set is the set of all points generated when a function is made equal to a constant.  For example, one level set of the function <math> z = x^2 -y^2 </math> is <math> 3=x^2-y^2 </math>.  Setting a 3D function equal to a constant in this way yields a '''contour curve'''.  These curves are curves with constant z-component.  If we use a 3D function to represent a landscape with the z-axis for altitude, then a contour curve shows constant height.  
  
 
A contour map is simply a collection of contour curves, each with the given function set equal to a different constant, meaning each curve represents a different constant height.
 
A contour map is simply a collection of contour curves, each with the given function set equal to a different constant, meaning each curve represents a different constant height.
Line 19: Line 19:
 
===Directional Derivatives===
 
===Directional Derivatives===
  
The concept of directional derivative is useful for finding the rate of height change along any path.  To do so, we simply take the unit vector in the direction of the path, and dot with the gradient vector.
+
The concept of directional derivative is useful for finding the rate of height change along any path.  To do so, we simply take the dot product of the unit vector in the direction of the path with the gradient vector.
  
 
Rate of height change along a path <math> \vec{v} </math> is <math> \nabla f \cdot \frac{\vec{v}}{\mid\vec{v}\mid}</math>
 
Rate of height change along a path <math> \vec{v} </math> is <math> \nabla f \cdot \frac{\vec{v}}{\mid\vec{v}\mid}</math>

Revision as of 09:11, 18 June 2009


Gradients on a Contour Map
Steepestdescent.gif
Field: Calculus
Image Created By: Golden Software
Website: [1]

Gradients on a Contour Map

This image shows gradient vectors at different points on a contour map. These vectors show the paths of steepest descent at different points on the landscape.


Basic Description

Graph and contour map of a function: Click to enlarge

A contour map utilizes the concept of level sets. A level set is the set of all points generated when a function is made equal to a constant. For example, one level set of the function  z = x^2 -y^2 is  3=x^2-y^2 . Setting a 3D function equal to a constant in this way yields a contour curve. These curves are curves with constant z-component. If we use a 3D function to represent a landscape with the z-axis for altitude, then a contour curve shows constant height.

A contour map is simply a collection of contour curves, each with the given function set equal to a different constant, meaning each curve represents a different constant height.

Now suppose instead of seeking points of constant height, we wish to find points along which height changes most rapidly. Intuitively, we travel perpendicular to contour curves, since even partially traveling along contour curves would involve traveling along a level set. This page's main image shows a number of vectors perpendicular to contours, meaning they represent the most rapid change of height (in this case, in the descending direction) from a point.

A More Mathematical Explanation

The gradient is a useful idea for finding the path of steepest descent or ascent. For a scalar [...]

The gradient is a useful idea for finding the path of steepest descent or ascent. For a scalar function f in three variables, the gradient vector is defined as  \nabla f = (\partial{f}/\partial{x} , \partial{f}/\partial{y} ,\partial{f}/\partial{z}) . Intuitively, this definition means that if our function has a high rate of change in a certain direction, the gradient vector will have a large component in that direction.

The gradient thus has a domain of scalars, such as height, and has a codomain of vectors. Each vector points in the direction of steepest ascent from the point the vector originates, with the vector's magnitude corresponding to the rate of ascent one would experience if one followed the vector. Traveling along gradient vectors in the opposite direction gives a path of steepest descent.

So to change height most rapidly, we travel along gradient vectors, and to remain at the same height, we follow a level set. We can also analyze intermediate cases: given a direction of travel, how will our height change?

Directional Derivatives

The concept of directional derivative is useful for finding the rate of height change along any path. To do so, we simply take the dot product of the unit vector in the direction of the path with the gradient vector.

Rate of height change along a path  \vec{v} is  \nabla f \cdot \frac{\vec{v}}{\mid\vec{v}\mid}

By nature of the dot project, this rate is maximized when we travel along the gradient, and is minimized to zero when we travel perpendicular to the gradient, along a level set.

For a level set (blue), the magnitude of the directional derivative (black) is shown. It is the component of the gradient (purple) in the direction of the path (red).
Directional derivative of a surface, which is the level set of a four-dimensional function. Gradient vector is blue, direction of path is purple, and directional derivative is green.




Teaching Materials

There are currently no teaching materials for this page. Add teaching materials.









If you are able, please consider adding to or editing this page!


Have questions about the image or the explanations on this page?
Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.


  [[Description::This image shows gradient vectors at different points on a contour map.  These vectors show the paths of steepest descent at different points on the landscape.|]]