I apologise if this is trivial but I want to know how should I treat integrals having matrices as arguments.
For example consider the integral $$\int_a^b e^{-As}ds$$, $A$ is some $n \times n$ invertible matrix, and $e^{-As}$ is an exponential matrix, how should I compute this?
What I would do is treat it as a usual integral so $$\int_a^b e^{-As}ds =[-e^{-Ax}A^{-1} ]_a^b$$ but here another question rises, is it $=[-e^{-Ax}A^{-1} ]_a^b$ or $[-A^{-1}e^{-Ax}]_a^b$?
Since $e^{-Ax}$ and $A^{-1}$ don't necessarily commute
Can you explain this?
By definition of the exponential of a matrix, $$e^{-Ax}=\sum_0^\infty\frac{(-1)^n}{n!}A^nx^n\tag1$$ It turns out that this can be integrated term-by-term, and it gives exactly the answer you have guessed.
It should be apparent from equation $(1)$ that $e^{-Ax}$ does, in fact, commute with $A$ and $A^{-1}$, so either way you write it is fine.