c mullan wrote:
> Hi,
> 
> Suppose I compute the Jordan Normal Form of a matrix,
> 
> A.jordan_form()
> 
> Then in the output I can see that the block sizes are indicated (by
> subdivide='True'), but I can't extract this information. I would like
> a list of block sizes, (e.g. [2,2,1,1,1] for a 7x7 matrix).
> 
> I cannot figure out how to do this, any ideas?
> 


sage: a = matrix(ZZ,4,[1, 0, 0, 0, 0, 1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 2])
sage: b=a.jordan_form()
sage: b

[2|0 0|0]
[-+---+-]
[0|1 1|0]
[0|0 1|0]
[-+---+-]
[0|0 0|1]
sage: b.subdivisions
([0, 1, 3, 4], [0, 1, 3, 4])


That will give you the indices of the subdivisions, for any subdivided 
matrix.  You can then calculate the jordan block sizes from that by 
subtracting each pair of numbers.



Alternatively, maybe there could be something in the jordan form 
function that returns the jordan block sizes for each of the eigenvalues...

Jason


--~--~---------~--~----~------------~-------~--~----~
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/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to