Let \(f\) be a differebtiable function of \(x, y\) and \(z\). As the directional derivative \(D_{\mathbf{v}}f(x_0,y_0,z_0)\) gives the rate of change of \(f\) at \((x_0,y_0,z_0)\) (of course when \(\mathbf{v}\) is a unit vector), to find the direction in which \(f\) increases most rapidly, we have to maximize \(D_{\mathbf{v}}f(x_0,y_0,z_0)\). Because \(f\) is differentiable, we have:
\begin{align}
D_{\mathbf{v}}f(x_0,y_0,z_0)&=\overrightarrow{\nabla} f(x_0,y_0,z_0)\boldsymbol{\cdot} \mathbf{v}\\
&=|\overrightarrow{\nabla} f(x_0,y_0,z_0)| \underbrace{|\mathbf{v}|}_{=1} \cos\alpha \tag{$\mathbf{v}$ is a unit vector}\\
&=|\overrightarrow{\nabla} f(x_0,y_0,z_0)|\ \cos\alpha
\end{align}
where \(\alpha\) is the angle between the gradient \(\overrightarrow{\nabla} f(x_0,y_0,z_0)\) and the direction vector \(\mathbf{v}\). Therefore:
- The maximum value of \(D_{\mathbf{v}}f(x_0,y_0,z_0)\) occurs when \(\cos\alpha=1\) or \(\alpha=0\). This means \(D_{\mathbf{v}}f(x_0,y_0,z_0)\) reaches its maximum value when \(\mathbf{v}\) has the same direction as \(\overrightarrow{\nabla} f(x_0,y_0,z_0)\) (that is when \(\mathbf{v}=\frac{\overrightarrow{\nabla} f(x_0,y_0,z_0)}{|\overrightarrow{\nabla} f(x_0,y_0,z_0)|}\)), and the largest value of \(D_{\mathbf{v}}f(x_0,y_0,z_0)\) is \(\left|\overrightarrow{\nabla} f(x_0,y_0,z_0)\right|\).
- When \(\mathbf{v}\) has the opposite direction as \(\overrightarrow{\nabla} f(x_0,y_0,z_0)\); that is when \(\mathbf{v}=-\frac{\overrightarrow{\nabla} f(x_0,y_0,z_0,z_0)}{|\overrightarrow{\nabla} f(x_0,y_0,z_0)|}\), we have \(\alpha=\pi\) or \(\cos\alpha = -1\). This means moving in the opposite direction of \(\overrightarrow{\nabla} f(x_0,y_0,z_0)\), the function decreases most rapidly.
- If we move in a direction that is normal to \(\overrightarrow{\nabla} f(x_0,y_0,z_0)\) (\(\mathbf{v}\bot\overrightarrow{\nabla} f(x_0,y_0,z_0)\)), there is zero change in \(f\).
- When \(\overrightarrow{\nabla} f(x_0,y_0,z_0)=(0,0,0)\), the rate of change of \(f\) is zero in all directions (because \(D_{\mathbf{v}}f(x_0,y_0,z_0)=0\) for every \(\mathbf{v}\)).
This way we could prove the following theorem.
Theorem 1. Suppose a function \(f:U\subseteq\mathbb{R}^n\to\mathbb{R}\) is differentiable at \(\mathbf{x_0}\). Then
- If \(\overrightarrow{\nabla} f(\mathbf{x}_0)\neq\mathbf{0}\), \(f\) increases most rapidly if we move in the direction of \(\overrightarrow{\nabla} f(\mathbf{x}_0)\). The maximum value of \(D_{\mathbf{v}}f(\mathbf{x}_0)\) is \(|\overrightarrow{\nabla} f(\mathbf{x}_0)|\).
- If \(\overrightarrow{\nabla} f(\mathbf{x}_0)\neq\mathbf{0}\), \(f\) decreases most rapidly if we move in the opposite direction of \(\overrightarrow{\nabla} f(\mathbf{x}_0)\). The minimum value of \(D_{\mathbf{v}}f(\mathbf{x}_0)\) is \(-|\overrightarrow{\nabla} f(\mathbf{x}_0)|\).
- Suppose \(\overrightarrow{\nabla} f(\mathbf{x}_0)\neq\mathbf{0}\). If we move in a direction that is normal to \(\overrightarrow{\nabla} f(\mathbf{x}_0)\), there will be no change in \(f\).
- If \(\overrightarrow{\nabla} f(\mathbf{x}_0)=\mathbf{0}\), the rate of change of \(f\) is zero in all directions. For every \(\mathbf{v}\), we have \(D_{\mathbf{v}}f(\mathbf{x}_0)=0\).