# Taylor expansion of a function whose arguments are matrices

I'm studying rotations expressed by a matrix $R$.

$|\psi> \to \hat{U} (R) |\psi>$

When we assume infinitesimal rotations, we can write $R = E + \omega$ where $E$ is an identity matrix and $\omega$ is a real matrix. Then, according to "Lectures on Quantum Mechanics" by S.Weinberg, $\hat{U} (E + \omega)$ must take the form

$\hat{U} (E + \omega) = E + \frac{i}{2\hbar} \sum _{ij} \omega _{ij} J_{ij} + O(\omega ^2).$

But why? My teacher said this is taylor expansion but I've never heard of taylor expansion of matrix functions.