Gradient Visualizer

Explore gradient vector fields, contour plots, and optimization paths

Function Selection

Visualization Options

Contour Plot and Gradient Field

Heat Map (blue=low, red=high)
Contour Lines
Gradient Vectors

Click anywhere on the plot to compute the gradient at that point or start a descent path

Gradient Analysis at Selected Point

Point: (0.00, 0.00)

Function Value f(x,y)
0.000
∂f/∂x
0.000
∂f/∂y
0.000
Gradient Magnitude |∇f|
0.000
Direction (degrees)
0.0°
Critical Point?
No

Gradient Descent

Descent Path

Click "Start Gradient Descent" to begin optimization from the selected point.

About the Gradient

Current Function: f(x,y) = x² + y²

Gradient Vector: ∇f = ⟨∂f/∂x, ∂f/∂y⟩

The gradient vector points in the direction of steepest ascent and is perpendicular to contour lines.

Gradient Descent: xn+1 = xn - α∇f(xn)

This iterative algorithm moves downhill to find local minima.