No, each non-diagonalizable matrix can be put into Jordan form, which is is
a matrix of blocks that are a sum of a diagonal part and a nilpotent part
(if you don't believe me, try finding the taylor expansion of m =
Matrix([[2, 1, 0, 0], [0, 2, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]])).

This is indeed how you compute the exponential (or at least how I was
taught). You find the Jordan blocks lambda*I + N and use the fact that
exp(lambda*I + N) = exp(lambda*I)*exp(N), where the first exponential is
just exp(lambda)*I and the second has a finite taylor expansion, so can
just be computed by I + N + 1/2!*N**2 + ..., which is a finite sum. (I
think there are more efficient ways of computing exp(N) than using the
taylor expansion, but even doing it the stupid way would be better than
nothing).

Aaron Meurer


On Sun, Jul 14, 2013 at 11:15 AM, F. B. <[email protected]> wrote:

> What about a temporary quick fix using the nilpotent matrix trick?
> Wikipedia claims that if the matrix is non-diagonalizable over the complex
> field, it is nilpotent. This means finite Taylor expansion.
>
>
> On Sunday, July 14, 2013 5:59:45 PM UTC+2, Aaron Meurer wrote:
>
>> The usual way to do it is to use generalized eigenvectors and Jordan
>> form. Some work was started at 
>> https://github.com/sympy/**sympy/pull/677<https://github.com/sympy/sympy/pull/677>,
>> but it needs to be finished.
>>
>> See also these issues: https://code.google.**com/p/sympy/issues/list?&q=*
>> *jordan <https://code.google.com/p/sympy/issues/list?&q=jordan>
>>
>> Aaron Meurer
>>
>>
>> On Sun, Jul 14, 2013 at 9:35 AM, F. B. <[email protected]> wrote:
>>
>>>  >>> m = Matrix([[0, 1], [0, 0]])
>>> >>> exp(m)
>>> NotImplementedError: Exponentiation is implemented only for
>>> diagonalizable matrices
>>>
>>>
>>> What is the best way to implement the exponentiation for
>>> non-diagonalibale matrices?
>>>
>>> I thought a way to fix it could be by Taylor expansion (hoping
>>> non-diagonalizable matrices over the complexes are nilpotent).
>>>
>>> Any better ideas? Just suggest me something and I'll try to fix it.
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "sympy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sympy+un...@**googlegroups.com.
>>> To post to this group, send email to [email protected].
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/sympy<http://groups.google.com/group/sympy>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to