When does the following equation holds true? $$\dfrac{d}{dx}e^{A(x)}=A'(x)e^{A(x)}.$$

In the latter:

$A(x)=\begin{pmatrix}a\_1(x)&a\_2(x)\\a\_3(x)&a\_4(x)\end{pmatrix}$,

$A'(x)=\begin{pmatrix}a\_1'(x)&a\_2'(x)\\a\_3'(x)&a\_4'(x)\end{pmatrix}$,

$e^{A(x)}=\displaystyle\sum\limits\_{n=0}^\infty \dfrac{1}{n!}A^n(x)$.

I tried to solve this supossing that $A(x)=P(x)D(x)P^{-1}(x)$ where $D(x)$ is a diagonal matrix, thus $A^n(x)=P(x)D^n(x)P^{-1}(x)$, but I got stock in a part where I needed the product ${P^{-1}}'(x)P(x)$.