I am looking to decompose a matrix in terms of a sum of matrices with the same coefficients, i want something in this form :
$ m1= \begin{pmatrix} a^2 + 2a + 3 & 1 \\ 2a & a^2 \end{pmatrix} =a^2\begin{pmatrix} 1& 0\\ 0& 1 \end{pmatrix} +a\begin{pmatrix} 2& 0\\ 2 & 0 \end{pmatrix}+\begin{pmatrix} 3& 1\\ 0& 0 \end{pmatrix}$
I tried to use Collect[m1,a]
but it collects the terms inside the matrix instead of giving a sum of matrices.