12.3 The Gradient

The gradient of a function \( z \depends (x, y) \) is the magnitude of the differential.
\[ \begin{align} \gradient z &: \Number \\ \gradient z &= \magnitude \bar{\diff} z \end{align} \]
The following theorem tells us that we can think of the gradient as a slope.
Theorem.
Suppose \( z \depends (x, y) \) is a function. The gradient can be written as the directional slope
\[ \begin{align} \gradient z &= \operatorname{\overset{\mathit{v}}{\directional}} z \end{align} \]
where the vector
\[ \begin{align} v &: \Vector_{(x, y)} \\ v &= \transpose \bar{\diff} z \end{align} \]
is the transpose of the differential.
Why?
To simplify notation, let's use the variable \( r : \Ruler_{(x, y)} \) to refer to the differential, \( r = \bar{\diff} z \). Calculating the directional slope, we find
\[ \begin{align} \operatorname{\overset{\mathit{v}}{\directional}} z &= \frac{\bigl\langle{\bar{\diff} z}\mathbin{\big|}{v}\bigr\rangle}{\magnitude v} = \frac{\langle{r}\mathbin{|}{\transpose r}\rangle}{\magnitude r} = \frac{(\magnitude r)^2}{\magnitude r} = \magnitude r = \magnitude \bar{\diff} z = \gradient z. \end{align} \]
The gradient isn't just any slope: the gradient automatically chooses the direction that gives the largest possible slope! Put simply, the gradient is the slope found when traveling directly uphill.
Example.
Let's compute the gradient for the bowl
\[ \begin{align} z &\depends (x, y) \\ z &= x^2 + y^2. \end{align} \]
The differential is
\[ \begin{align} \bar{\diff} z &= 2 x \mult \bar{\standard}_{x} + 2 y \mult \bar{\standard}_{y} \end{align} \]
and so the gradient is
\[ \begin{align} \gradient z &= \magnitude \bar{\diff} z \\ &= \magnitude \bigl(2 x \mult \bar{\standard}_{x} + 2 y \mult \bar{\standard}_{y}\bigr) \\ &= \sqrt[2]{(2 x)^2 + (2 y)^2} \\ &= 2 \mult \sqrt[2]{x^2 + y^2}. \end{align} \]
The gradient tells us how steep the graph is at any point. At the origin, \( (0, 0) \), the gradient is zero.
\[ \begin{align} \gradient z &= 0 \end{align} \]
At each of the points
\[ \begin{align} (1, 0) &: \Point_{(x, y)}, & (-1, 0) &: \Point_{(x, y)}, \\ (0, 1) &: \Point_{(x, y)}, & (0, -1) &: \Point_{(x, y)} \end{align} \]
the gradient is two.
\[ \begin{align} \gradient z &= 2 \end{align} \]
Let's take a look at the bowl and each of the points discussed in the previous example.
At the origin, the tangent plane is horizontal, and this gives a gradient of zero. At each of the four other points in question, the tangent planes will be equally steep, even if each is angled in a different direction.