# Jacobian chain rule for function composition with rotation matrix

Can you explain why does the following Jacobian chain rule holds true?

$$\\ \it J_{f \circ R}(x) = J_{f}(Rx) \circ R$$

Where, $\ f\in C^2(\Omega; \mathbb{R} ),\ \Omega\subset\mathbb{R^2},\ and \ \it R \in SO(2)$ denotes a $2\times2$ matrix with det($\it R$) = 1 and it can be written as $\begin{pmatrix} \cos \alpha & -\sin \alpha \\ \cos \alpha & \sin \alpha \end{pmatrix}$

In general Jacobian chain rule is,

$$\\ \it J_{f \circ g}(x) = J_{f}(g(x)) \circ J_{g}(x)$$

so by that logic, it should be,

$$\\ \it J_{f \circ R}(x) = J_{f}(Rx) \circ J_{R}(x)$$ but obviously $J_{R}(x)$ it does not make any sense to me. Can you please explain?

Let $A$ be any matrix in $\mathbb{R}^{2\times 2}$ and consider the mapping $g : \mathbb{R}^2\to\mathbb{R}^2$ defined by $g(x) = Ax$. Then according to the chain rule

$$J_{f\circ g}(x) = J_f(g(x))\circ J_g(x)$$

Given our definition of $g$ it follows that

$$J_g(x) \equiv A$$

and hence

$$J_{f\circ g}(x) = J_f(Ax)\circ A$$

Your problem really boils down to the following question: what is the Jacobian of a linear map?

Let $\ell\colon\mathbb{R}^n\rightarrow\mathbb{R}^n$ be a linear map, then for all $x,h\in\mathbb{R}^n$, one has: $$\ell(x+h)=\ell(x)+\ell(h)=\ell(x)+\ell(h)+o(h),$$ so that $\mathrm{d}\ell_x\colon h\mapsto\ell(h)$, it other words: $\mathrm{d}\ell\equiv\ell$ and $J_x\ell=\ell$ for any $x\in\mathbb{R}^n$.