# Is it possible to find the exponential of a symbolic matrix using sage?

I am searching for a function that is equivalent to mathematica's MatrixExp, that will calculate the exponential of a symbolic matrix. I don't want a term by term exponential but a something like expm() in scipy but for symbolic matrices.

Is it possible in sage?

edit retag close merge delete

Though see http://trac.sagemath.org/sage_trac/ticket/12101, where trying to do this with sparse matrices causes problems.

( 2012-06-22 05:03:50 -0500 )edit

Sort by » oldest newest most voted

sage: m=matrix(SR,2,2)

sage: m.exp?

more

I get "No object 'm.exp' currently defined." Is it just my machine or it is not defined? Edit: Sorry about that it actually worked. Thanks

( 2012-01-11 10:10:01 -0500 )edit

Just as a followup, since Sage 5.1.beta5, e^m will also work - see http://trac.sagemath.org/sage_trac/ticket/4735

( 2012-06-22 04:56:56 -0500 )edit

Would this work for you?

 A = matrix(SR, 2, var('a,b,c,d'))
exp(A)


I get a long expression which I assume is the matrix exponential.

more