# Multivariable Chain Rule Formula doesn't make sense to me

Consider $$z=f(x(t),y(t))$$, then its chain rule formula is:

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

What I cannot make sense of, are the terms $$\frac{\partial f}{\partial x}$$ and $$\frac{\partial f}{\partial y}$$

$$\frac{\partial f}{\partial x}$$ is defined as the rate of change of $$f$$ with respect to $$x$$, when $$y$$ is held constant.

Now, in our original definition, both $$x$$ and $$y$$ depend on $$t$$. So if we hold $$y$$ constant, we'll have to hold $$t$$ constant, and thus $$x$$ will automatically be held constant. How, then, can we compute $$\frac{\partial f}{\partial x}$$ if we cannot hold only $$y$$ as constant?

• Is $f$ a function from $\mathbb R^2$ to $\mathbb R$? Dec 31, 2020 at 11:19
• @Vajra Yeah, that's right. Dec 31, 2020 at 11:22
– user868586
Jan 16, 2021 at 17:58

What is confusing you is that the letters $$x$$ and $$y$$ are used for two purposes: (a) As names of the functions $$x(t), y(t)$$; (b) As names of the "first argument" and "second argument" of $$f$$. Sadly, this notation is very usual in mathematics, and there is no suitable alternative.

If I could convince to write partial derivatives differently, e.g. instead of $$\frac{\partial f}{\partial x}$$ you write $$f_1'$$ ("derivative on the first parameter"), and instead of $$\frac{\partial f}{\partial y}$$ you write $$f_2'$$ ("derivative on the second parameter"), then the formula becomes a lot more palatable:

$$z'(t)=\frac{d}{dt}f(x(t),y(t))=f_1'(x(t),y(t))x'(t)+f_2'(x(t),y(t))y'(t)$$

(I also write $$x'(t)=\frac{dx}{dt}, y'(t)=\frac{dy}{dt}, z'(t)=\frac{dz}{dt}$$, if that helps.)

Now it is obvious we are in no way modifying $$x(t)$$ or $$y(t)$$ when calculating $$f_1'$$ and $$f_2'$$. Instead, we are keeping constant the second argument of $$f$$/the first argument of $$f$$, respectively. After having calculated $$f_1'$$ and $$f_2'$$ - both end up as functions of two arguments - you will substitute those arguments with $$x(t), y(t)$$.

Sadly, this notation I used above is completely non-standard, and for historical reasons we are stuck with the notation that is confusing for you.

• Okay, so in this context, can we think of $\frac {\partial f}{\partial x}$ to mean rate of change of $f$ with respect to $x$ keeping $y$ constant, treating $x$ and $y$ as if both are independent of $t$? Dec 31, 2020 at 11:30
• @AvneeshKhanna Indeed, it boils down to that. In fact, while calculating $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$: just temporarily forget that $x$ and $y$ are also used as names for the functions - just think of $x$ and $y$ as names of the arguments of $f$. Once you calculate the partial derivatives, you substitute the argument $x$ with value $x(t)$, and similarly for $y$.
– user700480
Dec 31, 2020 at 11:32
• This is a good answer, but I want to point out that there is a useful alternative: a more general version of the chain rule says that the Jacobian of $f\circ g$ at $x$ is the Jacobian of $f$ at $g(x)$ times the Jacobian of $g$ at $x$, in short $\mathrm D_x( f\circ g)=\mathrm D_{g(x)}f\cdot \mathrm D_x g$. This way there can't really be any confusion about what is or isn't functionally dependent on something else because the calculation of the two Jacobians can be done conpletely separated from each other. Just need to correctly identify $f$ and $g$, as in the 1d case. Dec 31, 2020 at 12:28
• @Vercassivelaunos Agreed. However, I've always looked at things like this: let people first get familiar with derivatives (ordinary and partial), with the rules etc. - then you can have a step which teaches them that all they've been doing is composing linear maps (which we then can call differentials), and then the full machinery of linear algebra (matrices $\to$ Jacobian matrices, determinants $\to$ Jacobians) comes into play. To start with this immediately look to me like running before you can walk. I do hope, however, that your comment will be inspiring for OP to learn more.
– user700480
Dec 31, 2020 at 12:33
• Personally, I disagree slightly. I'd even go as far as saying that on a pure math track, multivariable calculus shouldn't be taught without first teaching linear algebra. Without it, multivar calculus just looks like a mess of arbitrary exceptions and rules, which is discouraging, I think. The whole point of calculus is to make things easier by approximating them linearly. How could anyone possibly get this point without being familiar with linear algebra? Though full disclosure, this might be cultural bias: where I'm from, linear algebra is the first course any math student takes. Dec 31, 2020 at 13:31

Maybe an example would help. Say we take $$z=x^2y$$ where as you said $$x,y$$ are functions of $$t$$ so we will define them as $$x=t^2$$ and $$y=t^3$$.

Our formula is:

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

Which is then:

$$\frac{dz}{dt}=(2xy)(2t)+(x^2)(3t^2)$$

Subbing for $$x,y$$:

$$\frac{dz}{dt}=(2t^5)(2t)+(t^4)(3t^2)$$

$$\frac{dz}{dt}=7t^6$$

I hope this makes sense. I think the way you are getting confused is with the $$f$$ and $$z$$ and what you are differentiating with respect to. If you follow this example closely you should see!

• MathJax: use \partial for $\partial$.
– user700480
Dec 31, 2020 at 11:24
• @StinkingBishop Thank you!
– user868586
Dec 31, 2020 at 11:28

I think the confusion comes from thinking about actually changing the values of the variables $$x$$ and $$y$$ when calculating $$\frac{df}{dx}$$ and $$\frac{df}{dy}$$. Just think of it as exploring what would happen to the function $$f$$ if $$x$$ or $$y$$ were to change (independently) by a small amount. Likewise for $$\frac{dy}{dt}$$ and $$\frac{dx}{dt}$$. Now, $$x$$ or $$y$$ cannot ever change independently since they both depend on t. But since calculating the derivatives, we now have information about how a small change in $$t$$ affects the function $$f$$.