Take a curve $\vec{r} = \vec{r}(t)$ that stays on the level $w=c$ where $c$ is a constant. Velocity is $\vec{v} = \frac{d\vec{r}}{dt}$ and is tangent to the level $w=c$ because it's tangent to the level, because it's tangent to the curve and the curve is inside in the level.
By the chain rule
$\frac{dw}{dt} = \nabla w \cdot \frac{d\vec{r}}{dt}$
which also is
$ \frac{dw}{dt} = \nabla w \cdot \vec{v}$
Then the teacher says
$\nabla w \cdot \vec{v} = 0 $
because $w=c$ hence there is no change in $w$ (we are on a contour). So I guess that's why $\nabla w \cdot \vec{v} = 0$? Because $\nabla w = 0$, and $0 \cdot \vec{v} = 0$?
Then he gives another conclusion that since $\nabla w \cdot \vec{v} = 0$, hence we should have $\nabla w \perp \vec{v}$ -- the two vectors are perpendicular. But if we are taking the gradient of a function that is a constant, hence the result is the zero vector, arent we saying that any vector is always perpendicular to a zero vector? That seems kind of backwards to me, even though I intuitively understand what he is trying to do, algebraically it doesnt really make sense.
Any ideas?