ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 10 Mar 2012 09:59:31 +0100exponential matrix exp(A)https://ask.sagemath.org/question/7499/exponential-matrix-expa/What is the maximum size of a square matrix A to calculate exp(A)Thu, 08 Mar 2012 09:51:07 +0100https://ask.sagemath.org/question/7499/exponential-matrix-expa/Answer by Jason Grout for <p>What is the maximum size of a square matrix A to calculate exp(A)</p>
https://ask.sagemath.org/question/7499/exponential-matrix-expa/?answer=13340#post-id-13340I don't think there are any hard-coded size limits.Thu, 08 Mar 2012 11:58:25 +0100https://ask.sagemath.org/question/7499/exponential-matrix-expa/?answer=13340#post-id-13340Answer by kcrisman for <p>What is the maximum size of a square matrix A to calculate exp(A)</p>
https://ask.sagemath.org/question/7499/exponential-matrix-expa/?answer=13341#post-id-13341At the same time, experimentation with `random_matrix(ZZ,i,i)` suggests that Maxima hits a wall with this already when `i=4`. `RR` doesn't look much better, and
sage: m = random_matrix(RDF,4,4)
sage: m.exp?
basically says as much. But
sage: m = random_matrix(RDF,4,4)
sage: exp(m)
[ 0.360479628838 -0.145794589097 1.4781378783 0.316593839994]
[ 0.317770329736 0.0984841855079 -0.733966866354 -0.820812967827]
[ -1.58402218787 0.783288361066 0.965206766202 0.919221986577]
[-0.254553742946 0.837705408602 -2.47262343564 1.63085510321]
sage: m = random_matrix(RDF,10,10)
sage: exp(m)
looks much better. So the answer to your question depends on what you are exactly looking for.
Thu, 08 Mar 2012 13:30:35 +0100https://ask.sagemath.org/question/7499/exponential-matrix-expa/?answer=13341#post-id-13341Comment by Jason Grout for <p>At the same time, experimentation with <code>random_matrix(ZZ,i,i)</code> suggests that Maxima hits a wall with this already when <code>i=4</code>. <code>RR</code> doesn't look much better, and </p>
<pre><code>sage: m = random_matrix(RDF,4,4)
sage: m.exp?
</code></pre>
<p>basically says as much. But</p>
<pre><code>sage: m = random_matrix(RDF,4,4)
sage: exp(m)
[ 0.360479628838 -0.145794589097 1.4781378783 0.316593839994]
[ 0.317770329736 0.0984841855079 -0.733966866354 -0.820812967827]
[ -1.58402218787 0.783288361066 0.965206766202 0.919221986577]
[-0.254553742946 0.837705408602 -2.47262343564 1.63085510321]
sage: m = random_matrix(RDF,10,10)
sage: exp(m)
</code></pre>
<p>looks much better. So the answer to your question depends on what you are exactly looking for.</p>
https://ask.sagemath.org/question/7499/exponential-matrix-expa/?comment=20143#post-id-20143Indeed, using RDF or CDF will probably scale *much* better.Sat, 10 Mar 2012 09:59:31 +0100https://ask.sagemath.org/question/7499/exponential-matrix-expa/?comment=20143#post-id-20143