Comment #3 on issue 2172 by [email protected]: diagonalize method to Matrix
http://code.google.com/p/sympy/issues/detail?id=2172

I implement now "diagonalize()", "is_diagonalizable()", "jordan_form" methods.

remarks:
1. diagonalize() method return tuple (D, P)
P^-1 is omited because of it is additional calculation, may be not necessary for user.

2. In some cases there is a bug found in method eigenvects() -
eigenvects() return no vectors:

In [1]: a = var("a")
In [2]: m = Matrix(2,2,[1, 0, 0, I])
In [3]: m.eigenvects()
Out[3]: [(1/2 + I/2 - (-1)**(3/4)*2**(1/2)/2, 1, []), (1/2 + I/2 + (-1)**(3/4)*2**(1/2)/2, 1, [])]
In [4]: m = Matrix(2,2,[1, 0, 0, a])
In [5]: m.eigenvects()
Out[5]: [(1/2 + a/2 - (1 - 2*a + a**2)**(1/2)/2, 1, []), (1/2 + a/2 + (1 - 2*a + a**2)**(1/2)/2, 1, [])]

(It may be connected with "roots" procedure )

2. Also "jordan_form()" method was implemented, but now without calculation of transformation of P, though the interface of output result is with P now: tuple (J, P) is returning for future compatibility.

It is because of difficult so-called "generalized eigen vectors" which must be implemented first (and with the above bug to be solved)

3. Constructor "diag()" was added for matrix constructor. "Create square diagonal matrix from a list as a diagonal." It is a middle between "eye()" and "block_diag" constructors that present in master branch.

4. Additianal helper constructor "jordan_cell" and helper methods "is_symbolic()", "is_symmetrical()", "is_diagonal()" was added too.

And for my pure English some doc strings for those methods must be checked.

Attachments:
        matrices_diagonalize_and_jordan_form.patch  15.0 KB

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to