Sorting an n x n matrix in the Jordan form.

17 views (last 30 days)
Assume I have a matrix J (n x n dimension), the matrix is originally obtained from MATLAB using the 'jordan' function which returns the matrix in the Jordan canonical form. MATLAB always returns the matrix J sorting the diagonal from lowest to highest, until it encounters repeated eigenvalue(s), which are sorted in Jordan blocks in the lower right corner of the matrix. Here's an example:
A = [0 1 0 0 0;
0 0 1 0 0;
0 0 0 1 0;
0 0 0 0 1;
-18 -57 -68 -38 -10];
J = jordan(A)
J = [-2 0 0 0 0;
0 -3 1 0 0;
0 0 -3 0 0;
0 0 0 -1 1;
0 0 0 0 -1]
The question is, is it possible to sort Matrix J's diagonal from highest to lowest (e.g. here [-1;-1;-2;-3;-3]) while keeping the Jordan blocks associated with each repeated eigenvalue?
In my example I want J to look like
[-1 1 0 0 0;
0 -1 0 0 0;
0 0 -2 0 0;
0 0 0 -3 1;
0 0 0 0 -3],
I want to make this transformation to any matrix of order n (n x n).
Thank you in advance.
Regards, M Ayoub.
  1 Comment
Jan
Jan on 23 Mar 2017
Edited: Jan on 23 Mar 2017
What do you want for:
J = [-2 0 0 0 0;
0 -3 1 0 0;
0 0 -4 2 0; % <- 2 beside the diagonal
0 0 0 -1 1;
0 0 0 0 -1]
If the -3 is moved to the last row, there is no place for the 2. Can this happen?

Sign in to comment.

Answers (1)

David Goodmanson
David Goodmanson on 25 Mar 2017
Hello Mohammad, I believe the following code works for a given Jordan matrix J.
a = sort(diag(J),'descend');
d = diff(a)==0; % look for repeated elements
Jnew = diag(a) + diag(d,1);
This code does not permute the elements of the original Jordan matrix but rather sorts the diagonal elements, so it is sensitive to any very small unintended numerical differences in the diagonal elements. The Jordan decomposition itself has the same issues so I don't think that this process adds new complications.
  1 Comment
Martin Seltmann
Martin Seltmann on 28 Nov 2018
Edited: Martin Seltmann on 28 Nov 2018
The proposal seems to assume that identical eigenvalues belong to the same Jordan block. But this does not have to be the case, there could be several Jordan blocks for the same eigenvalue.

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!