Suppose I have a matrix M=$\begin{pmatrix} A(p) & B(p) \\ C(p) & D(p)\end{pmatrix}$.
I want to apply some operatorial matrix E such that
EM=$\begin{pmatrix} 0 & \partial_p & \\ \partial_p & 0\end{pmatrix}\begin{pmatrix} A(p) & B(p) \\ C(p) & D(p)\end{pmatrix}$.
How can I create such an operatorial matrix ? I cannot do this explicitly because M is a product of complicated matrices, and I have to apply E several times.
Times
's at the right levelspec with the action of the operator or with anApply
. I'm not qualified to give an answer on pattern matching though... $\endgroup$Inner[Operate, {{(0 &) &, Derivative[1]}, {Derivative[1], (0 &) &}}, M, Plus]
. UseNest[]
as needed. $\endgroup$