# Gradient of a composite function

Let $\mathbf{ G}: \Bbb R^2 \to \Bbb R^2$ be given by $G(x,y)=(cos(x-y),sin(x+y))$

Assume that $f:\Bbb R^2 \to \Bbb R$ is differentiable, with gradient $\nabla f(0,1) = (2,3)$ in $(0,1)$. Let $h: \Bbb R^2 \to \Bbb R$ be given by $h(x)=f(\mathbf{G}(\mathbf{x}))$ for all $x$.

What is the gradient $\nabla h( \frac{\pi}{2},0 )$ of $h$ in $(\frac{\pi}{2},0)$?

-
hint: use the chain rule –  Quickbeam2k1 Mar 12 '13 at 18:46

Since $G(\pi/2,0)=(0,1)$ you get: $$\nabla h = D f(0,1)\cdot DG(\pi/2,0)$$ which is a $1\times 2$ times $2\times 2$ matrix multiplication.