I think I have either found an error in my notes either I misunderstood something.
Suppose:
$$f:\mathbb{R}^n \rightarrow \mathbb{R}^m $$ differentiable at $x_0$ $$g:\mathbb{R}^m \rightarrow \mathbb{R}^p $$ differentiable at $f(x_0)$
Now suppose $h: \mathbb{R}^n \rightarrow \mathbb{R}^p$ such that: $$h: x \mapsto g \circ f(x) $$
Then $h$ is differentiable at $x_0$ and $$\frac{\partial h_i}{\partial x_j}(x_0)= \sum_{k=1}^{m}\frac{\partial g}{\partial x_j}(f(x_0))\frac{\partial f_k}{\partial x_j}(x_0) $$
My question is why do we have $\sum_{k=1}^{m}\frac{\partial g}{\partial x_j}(f(x_0))$ and not $$\sum_{k=1}^{m}\frac{\partial g_k}{\partial x_j}(f(x_0))$$
And overall, is this formula even correct?