Hello group:
We are wondering if Sympy has a way to define a symbolic function which takes a MatrixSymbol as an argument, just like how f(x) = x^2 works on Sage.
We would like to have (A + B)**3 expand (assuming non-commutativity of course) for MatrixSymbols A and B. The obvious command
expand((A + B)**3)
did not work. However, if A and B are defined using Operator('A') and Operator('B'), it works. Surely, there must be a way to do this for MatrixSymbols too?
Regards,
Kannappan.