# The Chain Rule and Directional Derivatives

Physics I · Multivariable Calculus · https://tryals.app/learn/physics-i/the-chain-rule-and-directional-derivatives

## Multivariable Chain Rule

When a function depends on variables that themselves depend on time or parameters, we use the **multivariable chain rule**. If $z = f(x,y)$ where $x = x(t)$ and $y = y(t)$:

$$\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}$$

For functions of multiple intermediate variables like $x(s,t)$ and $y(s,t)$:

$$\frac{\partial z}{\partial s} = f_x\frac{\partial x}{\partial s} + f_y\frac{\partial y}{\partial s}$$

**The gradient** collects all partial derivatives into a single vector: $\nabla f = (\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y})$.

## Directional Derivatives & Gradient

The **directional derivative** measures the rate of change of $f$ in the direction of a unit vector $\hat{u}$:

$$D_{\hat{u}}f = \nabla f \cdot \hat{u} = |\nabla f|\cos\theta$$

| Property | Statement |
| --- | --- |
| Steepest ascent | $\nabla f$ points here |
| Max rate of change | $|\nabla f|$ |
| Level curves | $\nabla f \perp \{f = c\}$ |
| Zero change | When $\hat{u} \perp \nabla f$ |

> **Common pitfall:** The directional derivative requires a **unit** vector ($\hat{u}$). Feeding it an unnormalized vector silently scales your answer.

## Practice questions

3 of this lesson's 13 practice questions, with answers. The full set is in the app.

### 1. A bug walks across a heated metal plate. Its GPS reports position $(x(t), y(t))$; the plate’s temperature map is $T(x,y)$. What computes the warming rate the bug **feels**, $dT/dt$?

A. $T_x\,x' + T_y\,y'$, each partial times its speed
B. $x'(t) + y'(t)$, the bug’s total speed
C. $T_x + T_y$, the sum of the partials
D. $T_{xx} + T_{yy}$, the Laplacian of the temperature

**Answer:** A. $T_x\,x' + T_y\,y'$, each partial times its speed

**Why:** The chain rule composes the map’s sensitivities ($T_x, T_y$) with the bug’s velocity: $dT/dt = \nabla T\cdot\vec{v}$. Walk along an isotherm and it is zero; walk up the gradient and it is maximal, the dot product does the accounting.

Page: https://tryals.app/practice/physics-i/the-chain-rule-and-directional-derivatives/a-bug-walks-across-a-heated-metal-plate-its-gps-reports-position

### 2. The directional derivative is largest in the direction perpendicular to the gradient.

**Answer:** False

**Why:** False. $D_u f = \nabla f \cdot u = |\nabla f|\cos\theta$, which is maximal at $\theta = 0$, **along** the gradient, not across it. Perpendicular to the gradient the derivative is *zero*, which is exactly why that direction traces the level curve. It is also why gradient descent steps across contours rather than along them.

Page: https://tryals.app/practice/physics-i/the-chain-rule-and-directional-derivatives/the-directional-derivative-is-largest-in-the-direction-perpendicular

### 3. The directional derivative is largest along the gradient and zero perpendicular to it. Why does the rate of change depend on direction at all?

A. Because only the gradient direction has a well-defined derivative
B. Because the function has different values in different directions
C. Because a surface can be steep one way and flat another
D. Because the gradient changes as you move, even at a single point

**Answer:** C. Because a surface can be steep one way and flat another

**Why:** A point on a surface has a whole range of slopes depending on the direction taken. The gradient packages them all: every directional derivative is its projection.

Page: https://tryals.app/practice/physics-i/the-chain-rule-and-directional-derivatives/the-directional-derivative-is-largest-along-the-gradient-and-zero
