From Convex Optimization by Boyd and Vandenberghe: Let $T \in \Bbb R^{n \times n}$ be nonsingular. Let $f: \Bbb R^n \rightarrow \Bbb R$ convex and twice continuously differentiable. Define $\bar f(y) = f(Ty)$, and $x=Ty$. Then $\nabla \bar f(y) = T^T \nabla f(x)$.
$T^T$ is the transpose of $T$
My calculation process is as follows: $\nabla \bar f(y) = (\bar f'(y))^T=(f'(x)*T)^T=T^T \nabla f(x)$, since the gradient is the transpose of the derivative.
But I do not know how does $\nabla^2\bar f(y)=T^T\nabla^2 f(x)T$ come from.
Suppose you know the gradient $(g)$ and Hessian $(H)$ of a function in terms of the variable $x$
$$\eqalign{ f = f(x),\,\,\,\,\, g = \frac{\partial f}{\partial x},\,\,\,\,\,\, H = \frac{\partial g}{\partial x} }$$ You are then told that $x$ is not independent, but actually depends on another variable $(x = Sy).\,\,$ Note that the matrix $S$ does not need to be invertible. It might even be rectangular.
Let's find the gradient $(p)$ and Hessian $(Q)$ with respect to this new variable, by way of differentials. $$\eqalign{ df &= g^Tdx = g^T(S\,dy) = (S^Tg)^Tdy = p^Tdy \cr p &= \frac{\partial f}{\partial y} = S^Tg \cr \cr dp &= S^T\,dg = S^T(H\,dx) = S^TH(S\,dy) = Q\,dy \cr Q &=\frac{\partial p}{\partial y} = S^THS \cr\cr }$$