The Master Formula

The infinitesimal vector displacement, $d\rr$, is shown above from several points of view. On the left, $d\rr$ represents a small step along a curve; on the right, $d\rr$ is expanded in terms of both rectangular and polar coordinates, leading to the expressions \begin{equation} d\rr = dx\,\xhat + dy\,\yhat = dr\,\rhat + r\,d\phi\,\phat \label{drdef} \end{equation} The geometric notion of $d\rr$ as an infinitesimal vector displacement is a unifying theme that helps in visualizing the geometry of all of vector calculus.

In two dimensions, the chain rule for a function of several variables, written in terms of differentials, takes the form: \begin{equation} df = \Partial{f}{x}\,dx + \Partial{f}{y}\,dy \end{equation} which looks very much like a dot product. Separating out the pieces, we have \begin{equation} df = \left( \Partial{f}{x}\,\xhat + \Partial{f}{y}\,\yhat \right) \cdot (dx\,\xhat + dy\,\yhat) \end{equation} The last factor is just $d\rr$, and you may recognize the first factor as the gradient of $f$ written in rectangular coordinates, that is (switching to three dimensions) \begin{equation} \grad{f} = \Partial{f}{x}\,\xhat + \Partial{f}{y}\,\yhat + \Partial{f}{z}\,\zhat \end{equation} Putting this all together, we have \begin{equation} df = \grad{f} \cdot d\rr \label{Master} \end{equation} which can in fact be taken as the geometric definition of the gradient. We refer to ($\ref{Master}$) as the Master Formula, because it contains all of the information needed to determine the gradient, and does so without relying on a particular coordinate system.

Recall that $df$ represents the infinitesimal change in $f$ when moving to a “nearby” point. What information do you need in order to know how $f$ changes? You must know something about how $f$ behaves, where you started, and which way you went. The Master Formula organizes this information into two geometrically different pieces, namely the gradient, containing generic information about how $f$ changes, and the vector differential $d\rr$, containing information about the particular change in position being made.

How much does the temperature $T$ change in an arbitrary direction? Suppose we have a curve through the given point that goes in this new direction. Since derivatives are linear, the rate of change along this new curve is just the projection of $\grad T$ along the curve, namely \begin{equation} \frac{dT}{ds} = \grad T \cdot \frac{d\rr}{|d\rr|} . \end{equation} Remembering that $|d\rr|=ds$, we can rewrite this expression as \begin{equation} dT = \grad T \cdot d\rr \end{equation} which is again the Master Formula. Thus, the Master Formula can be used to determine directional derivatives.

We could also run the above argument using the dot product backward, thus deriving the formula for the components of the gradient in rectangular coordinates from the Master Formula. A similar argument yields the components of the gradient in polar coordinates!!

What does the gradient mean geometrically? Along a particular path, $df$ tells us something about how $f$ is changing. But the Master Formula tells us that $df=\grad f\cdot d\rr$, which means that the dot product of $\grad f$ with a vector tells us something about how $f$ changes along that vector. So let $\Hat w$ be a unit vector, and consider \begin{equation} \grad{f} \cdot \Hat w = |\grad{f}| \> |\Hat w| \cos\theta = |\grad{f}| \cos\theta \end{equation} which is clearly maximized by $\theta=0$. Thus, the direction of $\grad{f}$ is just the direction in which $f$ increases the fastest, and the magnitude of $\grad{f}$ is the rate of increase of $f$ in that direction (per unit distance, since $\Hat w$ is a unit vector). If you visualize the value of the scalar field $f$ as represented by color, then the gradient points in the direction in which the rate of change of the color is greatest.

You can also visualize the gradient using the level surfaces on which $f(x,y,z)={\rm const}$. (In two dimensions there is the analogous concept of level curves, on which $f(x,y)={\rm const}$.) Consider a small displacement $d\rr$ that lies on the level surface, that is, start at a point on the level surface, and move along the surface. Then $f$ doesn't change in that direction, so $df=0$. But then \begin{equation} 0 = df = \grad{f} \cdot d\rr = 0 \label{fconst} \end{equation} so that $\grad{f}$ is perpendicular to $d\rr$. Since this argument works for any vector displacement $d\rr$ in the surface, $\grad{f}$ must be perpendicular to the level surface.

Differentials such as $df$ are rarely themselves the answer to any physical question. So what good is the Master Formula? The short answer is that you can use it to answer any question about how $f$ changes. Here are some examples.

  1. Suppose you are an ant walking in a puddle on a flat table. The depth of the puddle is given by $h(x,y)$. You are given $x$ and $y$ as functions of time $t$. How fast is the depth of water through which you are walking changing per unit time?

This problem is asking for the derivative of $h$ with respect to $t$. So divide the Master Formula by $dt$ to get $$ {dh\over dt} = \grad{h} \cdot {d\rr\over dt} $$ where $\rr$ describes the particular path you are taking. The factor $d\rr\over dt$ is simply your velocity. This dot product is easy to evaluate, and yields the answer to the question.

(There are of course many ways to solve this problem; which method you choose may depend on how your path is described. It is often easiest to simply insert the given expressions for $x$ and $y$ in terms of $t$ directly into $h$, then differentiate the resulting function of a single variable, thus calculating the left-hand side directly.)

  1. Suppose you are the same ant, but now the question is, how fast is the depth changing per unit distance along the path?

This problem is asking for the derivative of $h$ with respect to arclength $ds$. We can divide the Master Formula by $ds$, which leads to $$ {dh\over ds} = \grad{h} \cdot {d\rr\over ds} $$ Unfortunately, it is often difficult to determine $s$; it is not always possible to express $h$ as a function of $s$. On the other hand, all we need to know is that $$ ds = |d\rr| $$ so that dividing $d\rr$ by $ds$ is just dividing by its length; the result must be a unit vector! Which unit vector? The one tangent to your path, namely the unit tangent vector $\TT$, so $$ {dh\over ds} = \grad{h} \cdot \TT %\label{Directional} $$ Evaluating the dot product answers the question, without ever worrying about arclength.

We have just seen that the derivative of $f$ along a curve splits into two parts: a derivative of $f$ (namely $\grad{f}$), and a derivative of the curve ($d\rr/du$). But the latter depends only on the tangent direction of the curve at the given point, not on the detailed shape of the curve.

(A PDF version of this page is available here.)


Personal Tools