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!