I'm having difficulty applying real or complex-valued functions to matrices. For example let's define
Q = {{1,2,3},{2,3,1},{6,7,8}}
Then
PolyLog[-1,Q]
obviously returns
{{ComplexInfinity,2,3/4},{2,3/4,ComplexInfinity},{6/25,7/36,8/49}}
because it is doing the PolyLog on each entry of Q separately. However, what I really want is for the PolyLog[-1,z] expression, which evaluates to z/(1-z)^2, to be applied to Q as a matrix. That is, I want output that matches
Q.MatrixPower[Inverse[IdentityMatrix[3]-Q],2]
which returns
{{-17/20, -39/20, 7/10},{9/5,26/5,-8/5},{-11/10,-37/10,6/5}}
In my research, I need to iteratively evaluate polylogs of matrices, for n= -1, -2, -3, .... The problem is the huge difference in syntax for matrices vs. real or complex numbers. Is there any way to do this without manually rewriting the function in terms of the matrix syntax?
If not, is there a way to symbolically differentiate a function defined on a matrix (since you can get polylogs iteratively using differentiation)?
MatrixFunction
help? $\endgroup$RootReduce
, i.e.,MatrixFunction[PolyLog[-1, #] &, Q] // RootReduce
$\endgroup$