Skip to content

Hessian and Curvature Visualizer

Run the Hessian Visualizer Fullscreen

Edit the MicroSim with the p5.js editor

About This MicroSim

This 3D visualization demonstrates the connection between the Hessian matrix eigenvalues and the geometric curvature of a function surface. The Hessian is a matrix of second partial derivatives that captures how a function curves in different directions.

How to Use

  1. Select a Function: Choose from bowl-shaped (minimum), saddle, or elongated surfaces
  2. Rotate View: Click and drag to rotate the 3D view
  3. Zoom: Use mouse scroll wheel to zoom in/out
  4. Move Point: Use arrow keys to move the analysis point
  5. Toggle Options: Show/hide principal curvature directions and quadratic approximation

Understanding the Display

  • Surface: The colored 3D surface of f(x,y)
  • Contour Lines: Level curves on the base plane
  • Red Sphere: Current point on the surface
  • Green Arrows: Principal directions with positive eigenvalues (curving up)
  • Red Arrows: Principal directions with negative eigenvalues (curving down)
  • Info Panel: Shows eigenvalues and point classification

Eigenvalue Interpretation

Eigenvalue Pattern Curvature Type Optimization
Both positive (λ₁, λ₂ > 0) Bowl (minimum) Local minimum
Both negative (λ₁, λ₂ < 0) Dome (maximum) Local maximum
Mixed signs Saddle point Neither

Lesson Plan

Learning Objectives

  • Connect Hessian eigenvalues to geometric curvature
  • Identify minima, maxima, and saddle points from eigenvalue signs
  • Visualize how curvature varies with direction

Suggested Activities

  1. Bowl Functions: Start with x²+y² and observe both positive eigenvalues
  2. Saddle Point: Switch to x²-y² and see how mixed eigenvalues create a saddle
  3. Elongation: Compare x²+0.1y² to see how different eigenvalue magnitudes affect shape
  4. Approximation: Enable "Show Quadratic Approx" to see how the Hessian provides a local approximation

References