Use the slider to explore the level curves of the function f(x,y). The red curve in the 3D view shows the output of f(x,y) along the constraint curve. Notice that the level curve is tangent to the constraint curve (in the 2D view) at the same points where the red curve has a local max/min (in the 3D view).