About this experiment
Walk on a quadratic surface and compare its contour map, domain gradient and directional tangent. Change the coefficients to make a bowl, saddle, ridge or flat field and inspect where the gradient vanishes.
Learning goals
- Calculate gradient components from a scalar field.
- Compare a directional derivative with the projection of the gradient.
- Relate contour orientation to local steepest ascent.
How to use it
- 1Click the surface and record the gradient at the new probe.
- 2Step uphill and downhill using the starting-point gradient direction.
- 3Turn the chosen domain direction and compare its directional derivative with gradient magnitude.
- 4Create a saddle and inspect the zero gradient at its centre.
The model
Assumptions
- The function, gradient and directional derivative are analytic. Contours use deterministic marching squares on a sampled grid.
- Surface height is compressed by the reported display scale. The blue tangent follows the displayed height scale, while numerical derivatives use the original function.
- Walking takes a finite step in the initial unit-gradient direction and clips at the displayed domain boundary. A large step is not guaranteed to decrease every possible quadratic.
- Arrow lengths are capped for readability; use the numerical components for magnitudes.
Try this in class
- Q1Why can the gradient be zero at a saddle rather than a minimum?
- Q2Why does a direction tangent to a smooth contour give zero directional derivative?
Frequently asked questions
Is the gradient itself a three-dimensional tangent arrow?
No. It is a vector in the x-y domain. The blue arrow separately lifts the chosen domain direction to a tangent of the displayed graph.
Does a zero gradient make every nearby function value equal?
No. It means first-order change vanishes at that point. Curvature can still create a minimum, maximum or saddle.
