# Chain rule and Multivariable Chain rule¶

## Multivariable Chain rule¶

### Multivariable Chain rule (with a single input variable)¶

Suppose we have functions \(x = f_1(t)\) and \(y = f_2(t)\), i.e. each are functions of the variable \(t\).

Suppose we have another function \(z = f_3(x,y)\), i.e. \(z\) is a function of the variables \(x\) and \(y\).

We restrict ourselves to the case where \(x\) and \(y\) are differentiable at the chosen (but general) point \(t \in \mathbb{R}\), and \(z\) is differentiable at the corresponding point \((x, y) \in (\mathbb{R}, \mathbb{R})\).

By the multivariable chain rule, we have:

One way to remember this rule:

Starting at the final variable (\(z\)), you go along each path to the input variable (\(t\)), and multiply every partial derivative along the path. Each multiplicative term “cancels out” to the term you require (i.e \(\frac{\partial z}{\partial x} \cdot \frac{\partial x}{\partial t}\) “cancels out” to give \(\frac{\partial z}{\partial t}\), which is what we want to calculate. \(\frac{\partial z}{\partial y} \cdot \frac{\partial y}{\partial t}\) does the same). Finally, you add together all the chains of multiplications, which gives us the result above.

In short: take the **sum of multiplications which simplify to** \(\frac{\partial z}{\partial t}\), **along all possible paths from** \(z\) **to** \(t\).