The function w(t) which represents the path is shown in the "Domain" window in red. In the control panel there is a tapedeck that allows you to change the variable t0 and travel along the path. Two vectors are drawn at the point w(t0): the pink vector is the tangent vector to the red curve at w(t0) while the yellow vector is the gradient vector of z(u,v) at w(t0).

Under z(u,v), the red curve in the domain is mapped into a red curve on the surface. This path has z(u,v) = z(w(t)) as its height function. With this in mind, we ask the following question. As we travel along the highway, at what point do we attain our maximum heights? The question is simpler in the case of a 2D graph. To find the maximum height of the graph of a function f(t), we would set f'(t) = 0, solve for t, and then check if the solutions were maxima or minima. This method naturally generalizes to 3D graphs as well. To find the maximum point along the highway, we set z'(t) = 0. Then, by the chain rule,

z'(t) = zu(w(t))*w'(t)_1+zv(w(t))*w'(t)_2,

or

0 = ∇z(w(t))⋅w'(t)

This tells us that at the highest point w(t0) on the highway, the gradient vector at w(t0) must be perpendicular to the tangent vector at w(t0). Note that if the highway passes through a local maximum of the graph, then the gradient vector will be 0 and will automatically be perpendicular to the tangent vector.