### 2.46.5 Jordan normal form : `jordan`

`jordan` takes as argument a square matrix A of size n.
`jordan` returns :

- in `Xcas`, `Mupad` or `TI` mode
  a sequence of two matrix : a matrix P which columns are the eigenvectors and characteristic vectors of the matrix A and the Jordan matrix J of A verifying J=P−1AP,
- in `Maple` mode
  the Jordan matrix J of A. We can also have the matrix P verifying J=P−1AP in a variable by passing this variable as second argument, for example
  `jordan([[1,0,0],[0,1,1],[1,1,-1]],’P’)`

Remarks

- the syntax `Maple` is also valid in the other modes, for example, in `Xcas` mode input :
  `jordan([[4,1,1],[1,4,1],[1,1,4]],’P’)`
  Output :
  `[[1,-1,1/2],[1,0,-1],[1,1,1/2]]`
  then `P` returns
  `[[6,0,0],[0,3,0],[0,0,3]]`
- When A is symetric and has eigenvalues with an multiple order, `Xcas` returns orthogonal eigenvectors (not always of norm equal to 1) i.e. `tran(P)*P` is a diagonal matrix where the diagonal is the square norm of the eigenvectors, for example :
  `jordan([[4,1,1],[1,4,1],[1,1,4]])`
  returns :
  `[[1,-1,1/2],[1,0,-1],[1,1,1/2]],[[6,0,0],[0,3,0],[0,0,3]]`

Input in `Xcas`, `Mupad` or `TI` mode :

`jordan([[1,0,0],[0,1,1],[1,1,-1]])`

Output :

`[[1,0,0],[0,1,1],[1,1,-1]],[[-1,0,0],[1,1,1],[0,-sqrt(2)-1,sqrt(2)-1]],[[1,0,0],[0,-(sqrt(2)),0],[0,0,sqrt(2)]]`

Input in `Maple` mode :

`jordan([[1,0,0],[0,1,1],[1,1,-1]])`

Output :

`[[1,0,0],[0,-(sqrt(2)),0],[0,0,sqrt(2)]]`

then input :

`P)`

Output :

`[[-1,0,0],[1,1,1],[0,-sqrt(2)-1,sqrt(2)-1]]`

Input in `Xcas`, `Mupad` or `TI` mode :

`jordan([[4,1,-2],[1,2,-1],[2,1,0]])`

Output :

`[[[1,2,1],[0,1,0],[1,2,0]],[[2,1,0],[0,2,1],[0,0,2]]]`

In complex mode and in `Xcas`, `Mupad` or `TI` mode , input :

`jordan([[2,0,0],[0,2,-1],[2,1,2]])`

Output :

`[[1,0,0],[-2,-1,-1],[0,-i,i]],[[2,0,0],[0,2-i,0],[0,0,2+i]]`