Show that $f$ is differentiable and determine $f'(t)$, for all $t \in I$. (Differentiable path) 
Let $X: I \to \mathbb{R}^{n^{2}}$ a differentiable path whose values ​​are matrices $n \times n$. Fixed $k \in \mathbb{N}$, let $f: I \to \mathbb{R}^{n^{2}}$ the path given by the rule $f(t) = X(t)^{k}$. Show that $f$ is differentiable and determine $f'(t)$, for all $t \in I$.

Since $X$ is differentiable, we have
$$X(a+t) - X(a) = X'(a) + r(t)$$
where $\lim_{t \to 0} \frac{r(t)}{t} = 0$, with $a \in I$. My idea is find $v$ such that
$$r(t) = f(a+t) - f(a) - v$$
implies $\lim_{t \to 0} \frac{r(t)}{t} = 0$ for show that
$$\lim_{t \to 0} \frac{X(a+t)^{k} - X(a)^{k}-v}{t} = 0.$$
I thought $v$ could be something that would allow you to write $X(a+t)^{k} - X(a)^{k} - v = (X(a+t) - X(a))^{k}$ or $v = kX(a+t)^{k-1}\cdot X'(t)$, but I couldn't conclude anything.
Thanks for the any hint!
 A: Your formula for what "differentiable" means is wrong; it is the first term of the Taylor polyomial, so you have 
$$
X(a+t)-X(a)=X'(a)t+r(t).
$$
Let's do $k=2$ first. Note that when we expand the square, the elements do not necessarily commute. 
\begin{align}
X^2(a+t)-X^2(a)&=(X(a)+X'(a)t+r(t))^2-X^2(a)\\ \ \\
&=(X'(a)t+r(t))^2+X(a)(X'(a)t+r(t))+(X'(a)t+r(t))X(a)\\ \ \\
&=[X(a)X'(a)+X'(a)X(a)]\,t+g(t)\,r(t),
\end{align}
where $g(t)$ denotes all the terms that are multiplied by $r(t)$. Then 
$$
\frac{X^2(a+t)-X^2(a)-[X(a)X'(a)+X'(a)X(a)]\,t}{t}=\frac{g(t)r(t)}{t}\to0,
$$
which shows that $X^2$ is differentiable and $(X^2)'(a)=X(a)X'(a)+X'(a)X(a).$
For higher powers the idea is the same, but we still have the issue that terms do not commute. So 
$$
(X^3)'(a)=X(a)^2X'(a)+X(a)X'(a)X(a)+X'(a)X(a)^2
$$
(only the terms with one $X'(a)$ survive, because it comes together with a $t$, so if we have two or more $X'(a)$, we will have at least $t^2$, and the term will vanish in the limit). 
For arbitrary $k$, the same arguments show that $X^k$ is differentiable and that 
$$
(X^k)'(a)=\sum_{j=1}^kX(a)^{j-1}X'(a)X(a)^{k-j}.
$$
