The rat_jordan command finds the rational Jordan form of a matrix.
| J=P−1AP | 
rat_jordan(A) (in Maple mode) only returns the matrix J.
Input not in Maple mode:
| rat_jordan([[1,0,0],[1,2,-1],[0,0,1]]) | 
| 
 | 
| rat_jordan([[1,0,0],[1,2,-1],[0,0,1]],P) | 
| 
 | 
| P | 
| 
 | 
| rat_jordan([[1,0,1],[0,2,-1],[1,-1,1]]) | 
| 
 | 
| rat_jordan([[1,0,0],[0,1,1],[1,1,-1]]) | 
| 
 | 
If A is symmetric and has eigenvalues with multiple orders, the matrix P returned by rat_jordan(A) will contain orthogonal eigenvectors (not always of norm equal to 1); that is, PTP will be a diagonal matrix where the diagonal is the square norm of the eigenvectors.
| rat_jordan([[4,1,1],[1,4,1],[1,1,4]]) | 
| 
 |