partial derivative of function with a matrix

195 Views Asked by At

Let $A$ be a $n\times n$ matrix. Let $f\in C^1(\mathbb R^n)$ and $g:\mathbb R^n\rightarrow\mathbb R, g(x)=f(Ax)$. What is the partial derivative $\partial_{x_i} g(x)$?

So $Ax=(\sum_{l=1}^n a_{kl}x_l)_{l=1,\dots,n}$ and therefor $\partial_{x_i}(Ax)=(a_{1i},a_{2i},\dots,a_{ni})^T$. Now how do you get the outer derivative of $f$?

I've calculated $Df$ by $$(\partial_{x_1}f(Ax),\dots,\partial_{x_n}f(Ax))\cdot A=(\sum_{i=1}^n \partial_{x_i}f(Ax)\cdot a_{i1},\dots,\sum_{i=1}^n\partial_{x_n}f(Ax)\cdot a_{in})$$ so it must be $\partial_{x_k}g(x)=\sum_{i=1}^n\partial_{x_i}f(Ax)\cdot a_{ik}$ using the chain rule in higher dimensions.

But how can you calculate $\partial_{x_i}g(x)$ directly? Is there any possibility to use the chain rule in one dimension?

1

There are 1 best solutions below

2
On BEST ANSWER

I prefer to think of the chain rule in terms of matrices. You have $$\Bbb R^n\overset{A}\to\Bbb R^n\overset{f}\to\Bbb R,$$ and the chain rule tells us that the derivative at $x\in\Bbb R^n$ is given by $$\Bbb R^n\overset{A}\to\Bbb R^n\overset{Df(Ax)}\longrightarrow\Bbb R,$$ since a linear map is its own derivative at any point. To get the $i^{\text{th}}$ partial derivative of the composition, we want the $i^{\text{th}}$ entry of the $1\times n$ matrix given by multiplying $Df(Ax)A$. This is (using $u$ as the input variables for $f$) $$\sum_{j=1}^n \frac{\partial f}{\partial u_j}(Ax)\,a_{ji}.$$ This is, of course, exactly what you've done. Even if you think about the partial derivative with respect to $x_i$ as a one-dimensional derivative (fixing the values of the remaining components of $x$), you still have a composition $\Bbb R\to\Bbb R^n\to\Bbb R$, so there's no way to remove some application of the multivariable chain rule.