Symbolic Function taking a Matrix Argument

9 views
Skip to first unread message

Kannappan Sampath

unread,
Aug 7, 2014, 10:05:04 AM8/7/14
to sy...@googlegroups.com, parsa...@gmail.com
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. 

Reply all
Reply to author
Forward
0 new messages