Solution (source code)

= Solution

A map $f:A\to\mathbb R^m$ is differentiable at $p\in A$ when there is a <linear map> $Df(p):\mathbb R^n\to\mathbb R^m$ such that
$$
f(p+h)=f(p)+Df(p)h+r(h),
\qquad
\frac{|r(h)|}{|h|}\longrightarrow0.
$$
The linear map $Df(p)$ is the <Fréchet derivative> of $f$ at $p$.

The multivariable <chain rule> states that if $f$ is differentiable at $p$ and $g$ is differentiable at $f(p)$, then
$$
\boxed{D(g\circ f)(p)=Dg(f(p))\circ Df(p)}.
$$
Indeed, write $f(p+h)=f(p)+Ah+r(h)$ and $g(f(p)+k)=g(f(p))+Bk+s(k)$, where $r(h)=o(|h|)$ and $s(k)=o(|k|)$. Since $k=Ah+r(h)=O(|h|)$,
$$
g(f(p+h))=g(f(p))+BAh+Br(h)+s(Ah+r(h)),
$$
and the last two terms are $o(|h|)$. This proves the formula.

For matrix inversion near the <identity matrix>,
$$
(I+h)^{-1}=I-h+h^2(I+h)^{-1}.
$$
The last term is $O(\|h\|^2)$ because inversion is bounded near $I$. Therefore the inversion map is differentiable at $I$ and
$$
\boxed{Df(I)(h)=-h}.
$$