Derivative of $f: \mathcal M_{n\times n}(\mathbb R)\rightarrow \mathcal M_{n\times n}(\mathbb R)$ given by $f(X)=X^2$ Let $\mathcal M_{n\times n}(\mathbb R)$ be the set of $n\times n$ matrices with real entries and consider $f: \mathcal M_{n\times n}(\mathbb R)\rightarrow \mathcal M_{n\times n}(\mathbb R)$ given by $f(X):=X^2$. A real analysis book states that its derivative at a point $A\in \mathcal M_{n\times n}(\mathbb R)$ is the linear map $f'(X):\mathbb R^{n^2}\rightarrow \mathbb R^{n^2}$ given by $f'(X)\cdot A=AX+XA$. I'm trying to prove this using the following result:
Let $U\subset \mathbb R^m$ be an open set, $f, g :U\rightarrow \mathbb R^n$ differentiable functions at $a\in U$, and $B : \mathbb R^n\times \mathbb R^n\rightarrow \mathbb R^p$ a bilinear map. Then, $B(f, g) : U\rightarrow \mathbb R^p$, given by $B(f, g)(x):= B(f (x), g(x))$ is differentiable at $a$, and
$[B(f, g)]'(a) · v = B[f'(a) · v, \ g(a)] + B[f (a), \ g(a)'· v].$ 
But I'm not sure if that is a good way and I couldn't notice how to apply it. If someone could give me a hint, I'd be grateful. Thank you!

$$B:\Bbb R^{n\times n}\times \Bbb R^{n\times n}\to \Bbb R^{n\times n}, (A,B)\mapsto A\cdot B$$
Then $B\circ (\mathrm{id},\mathrm{id}):\Bbb R^{n\times n}\to\Bbb R^{n\times n}, X\mapsto X^2$ is differentiable at $X$ by your lemma and has differential
$$B[\mathrm{id},\mathrm{id}]_X'(A)=B[\mathrm{id}'_X (A),\mathrm{id}(X)]+B[\mathrm{id}(X),\mathrm{id}'_X(A)]=B[A,X]+B[X,A]=AX+XA$$
since the differential of the identity is the constant identity map (sounds dumb, but there is some info stuck in this, consider for example that the second differential of the identity is zero).
