Solution (source code)

= Solution

The <chain rule> states that $f\circ g$ is differentiable at $x$ and
$$
\boxed{D(f\circ g)(x)=Df(g(x))\circ Dg(x).}
$$
In terms of <Jacobian matrix>[Jacobian matrices],
$$
\boxed{J_{f\circ g}(x)=J_f(g(x))J_g(x).}
$$
The factors have dimensions $k\times m$ and $m\times n$, respectively, giving the required $k\times n$ <Jacobian matrix>.