I am stuck with a question for my math class, I can prove it from the definition of differentiability but I have no idea how to do it using the chain rule:
Given $f, g: E \rightarrow \mathbb{R}, $
where E open in $\mathbb{R}^n$ prove that $fg$ is differentiable.
Surely it wants something like this: let $m:\mathbb{R}^2 \to \mathbb{R}$ be given by $$ m((x,y))= xy. $$ Show that this is differentiable: you'll find it has derivative $$ Dm((x,y)).(h,k) = yh+xk = \begin{pmatrix} y & 0 \\ 0 & x \end{pmatrix} \begin{pmatrix} h \\ k\end{pmatrix}. $$ Now, the function $ h(x)= f(x) g(x) $ is given by $$ h(x) = m((f(x),g(x))) = [m \circ (f,g)] (x). $$ Therefore, by the chain rule, it has derivative $$ Dh(x) = Dm((f(x),g(x))) \cdot (Df(x),Dg(x)) = g(x) Df(x) + f(x) Dg(x). $$
A clearer way to see this is to work with a vector $f(x)$ with $i$th component $f_i(x)$, and then you have $$ m(x)= \prod_i x_i, $$ and then $$ (Dm(x))_i = \prod_{j \neq i} x_j, $$ and $$ h(x) = \prod_i f_i(x) = [m \circ f](x), $$ and the chain rule gives $$ (Dh(x))_i = \sum_j (Dm(f(x)))_j (Df(x))_{j,i} = \left[ \sum_j \left(\prod_{j \neq k} f_k(x) \right) D(f_j)(x) \right]_i, $$ after swapping the linear operation of "taking the $i$th component" with the sum.
(if the functions don't commute, such as if they are matrices, your derivative also has to take into account the ordering, and insert the $D(f_j)$s into the correct places in the product)