# The chain rule and the gradient function

If $A: \mathbb{R}^n \to \mathbb{R}^n~$ is a linear map and $f:\mathbb{R}^n \to \mathbb{R}$ is differentiable everywhere. For $F: = f\circ A$, what is the relationship between $\nabla F$ and $\nabla f$?

-
maybe linear who knows? –  dato datuashvili May 17 '12 at 14:00

Let $g(x):=f(Ax)$. Then for arbitrary $h\in{\mathbb R}^n$ one has $$g(x+h)-g(x)=f\bigl(A(x+h)\bigr)-f(Ax)=f\bigl(Ax + Ah\bigr)-f(Ax)\ .$$ Here the left side is $$=\langle\nabla g(x), h\rangle +o(|h|)\qquad (h\to 0)\ ,$$ and the right side is $$=\langle\nabla f(Ax), Ah\rangle +o(|Ah|)=\langle A'\,\nabla f(Ax), h\rangle + o(|h|)\qquad (h\to0)\ ,$$ where $A'$ denotes the transpose (adjoint) of $A$. It follows that the two gradients are related via $$\nabla g(x)\ =\ A'\,\nabla f(Ax)\ .$$