Let $f:\mathbb R ^n \to \mathbb R^m, g:\mathbb R \to \mathbb R^n$, and $f$ totally differentiable.

Then we have $$\frac{\partial }{\partial x} f(g(x)) = Df(g(x))\cdot Dg(x) \cdot x$$ and $$\frac{\partial }{\partial x} f(g(x)) = \left(\frac{\partial }{\partial x}f_1(g(x)), ...,\frac{\partial }{\partial x}f_n(g(x)) \right)^T $$.

The first definition uses the definition of the directional derivative by the total derivative,
the second definition uses the definition of the directional derivative as limit, which therefore can be pulled into the partial functions of $f$.

Regarding notation:
$Df(g(x))$ means the total derivative of $f$ at the point $g(x)$.
$\frac{\partial f}{\partial x} (g(x))$ means the partial derivative of $f$ at the point $g(x)$.
$\frac{\partial }{\partial x_1} f(g(x))$ means the partial derivative of $f(g(x))$.

We can work on the first expression: $$ \frac{\partial }{\partial x} f(g(x)) = Df(g(x))\cdot Dg(x) \cdot x \\= \begin{pmatrix} \frac{\partial f_1}{\partial x_1} (g(x)) &... & \frac{\partial f_1}{\partial x_n} (g(x)) \\ \vdots & ... &\vdots\\ \frac{\partial f_m}{\partial x_1} (g(x)) &... & \frac{\partial f_m}{\partial x_n} (g(x)) \\ \end{pmatrix}\cdot \begin{pmatrix} \frac{\partial g_1}{\partial x} (x)\\ ... \\ \frac{\partial g_n}{\partial x} (x) \end{pmatrix}\cdot x \\ = \begin{pmatrix} \sum_{i=1}^n \left(\frac{\partial f_1}{\partial x_i} g(x)\right) \left(\frac{\partial g_i}{\partial x} (x)\right)\cdot x\\ ... \\ \sum_{i=1}^n \left(\frac{\partial f_m}{\partial x_i} g(x)\right) \left(\frac{\partial g_i}{\partial x} (x)\right)\cdot x \end{pmatrix} $$

However, I don't see how the second expression $$\frac{\partial }{\partial x} f(g(x)) = \left(\frac{\partial }{\partial x}f_1(g(x)), ...,\frac{\partial }{\partial x}f_n(g(x)) \right)^T $$ can be transformed into the first one.


1 Answer 1


If $g$ really maps $\Bbb{R} \to \Bbb{R}^n$, then the notation $\dfrac{\partial}{\partial x}$ is misleading. It's better to use $\dfrac{d}{dx}$, or better yet, the $'$ prime notation.

By the way from the chain rule, we get: \begin{equation} (f \circ g)'(x) = Df(g(x)) \cdot Dg(x). \end{equation} There shouldn't be an extra multiplication by $x$. With this, the second expression agrees with what I have written.

Also, your notation is a little misleading. I suggest you look at the domains and target spaces, and use partial derivatives $\partial$, and "normal" derivatives $d$ appropriately.

I would recommend reading Loomis and Sternberg's famous text: Advanced Calculus, Chapter $3$, in particular sections $3.7$-$3.9$ for a clear and careful discussion of directional derivatives of functions, their geometric interpretation, their relation to total derivatives, how to apply chain rule when computing directional derivatives, how these are related to matrix computations often found, and much more.

  • $\begingroup$ I'm sorry for my use of notation, I had a feeling that it was very messy. The extra multiplication with $x$ we get by using the directional derivative (in this formula in direction $v$): $$\dfrac{\partial f}{\partial v} (x) = Df(x)\cdot v$$ Substituting $f$ by $f○ g$ and $v$ by $x$, then applying the chain rule leads to the formula $\endgroup$
    – Sudix
    Jun 18, 2019 at 15:09
  • $\begingroup$ @Sudix yes now that formula is understandable. But I hope you understand why the 2nd equation you wrote, and the equation I wrote are equal $\endgroup$
    – peek-a-boo
    Jun 19, 2019 at 1:24
  • $\begingroup$ Only from the greater picture, i.e. by setting $\frac{\partial }{\partial x}f_1(g(x)) = Df_1(g(x)) \cdot x$. However, that explanation feels unsatisfying - I'd really like to avoid reasoning using the total derivative there $\endgroup$
    – Sudix
    Jun 19, 2019 at 10:46
  • $\begingroup$ @Sudix Currently the equations you have written down are really just the chain rule applied to the total derivatives of composite functions. So perhaps consider rewording your question with more accurate/precise notation and explicitly spell out your doubts and concerns. Then I can try to edit my answer accordingly. Also, I'd really suggest reading the relevant sections of the book I referenced. It has really clarified a lot of concepts for me $\endgroup$
    – peek-a-boo
    Jun 19, 2019 at 11:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .