Opened 13 years ago

Closed 12 years ago

#2273 closed enhancement (duplicate)

matrix exponentials

Reported by: AlexGhitza Owned by: jason
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: linear algebra Keywords:
Cc: jason Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Right now, thanks to #2049, we can (have Maxima) compute the exponential of a symbolic matrix:

sage: var('t')
sage: A = Matrix(SR, [[t, 0], [0, t]])
sage: A.exp()
[e^t   0]
[  0 e^t]

This is great, but it would also be nice to have this for numerical matrices. On a related note, the following is perplexing (to me):

sage: A=Matrix(RDF,[[1,-2],[2,-1]])
sage: exp(A)
<type 'exceptions.TypeError'>: cannot coerce type '<type 'sage.matrix.matrix_real_double_dense.Matrix_real_double_dense'>' into a SymbolicExpression.
sage: exp(1.0*A)
<type 'exceptions.TypeError'>: cannot coerce type '<type 'sage.matrix.matrix_real_double_dense.Matrix_real_double_dense'>' into a SymbolicExpression.
sage: exp(pi/(3*sqrt(3))*A)
[ 1 -1]
[ 1  0]

Yes folks, the last one works (and gives the right answer, btw). Weird.

Change History (6)

comment:1 Changed 13 years ago by AlexGhitza

  • Milestone set to sage-2.10.3

comment:2 Changed 13 years ago by pdenapo

Now that we have the Jordan canonical form (#874) we could use it to compute the matrix exponential.

comment:3 Changed 13 years ago by pdenapo

For implementing this using the Jordan canonical form, being able to compute that canonical form is not enough, we would need to compute the Jordan basis as well (see #2615)

comment:4 Changed 12 years ago by jason

  • Cc jason added

comment:5 Changed 12 years ago by jason

  • Owner changed from was to jason
  • Status changed from new to assigned

#4733 implements this, though it could be done better, maybe, with the Jordan form code.

comment:6 Changed 12 years ago by mabshoff

  • Milestone changed from sage-3.2.2 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from assigned to closed

I agree that this is a duplicate of #4733 and since there is a patch there I am closing this as a dupe.



Note: See TracTickets for help on using tickets.