### 15.2.5 Jordan form of a matrix

The jordan command finds the Jordan form of a matrix.

- jordan takes one mandatory and one optional argument:
  - A, a square matrix.
  - Optionally, var, a variable name.
- jordan(A) (in all modes but Maple) returns a sequence [P,J] of two matrices, where the columns of P are the eigenvectors of A, J is the Jordan form of A, and

  J=P−1AP

  jordan(A), in Maple mode, only returns the matrix J.

- jordan(A⟨,var⟩) returns the matrix J, as above, and assigns the matrix P to the variable var.

#### Examples

Input not in Maple mode:

jordan([[4,1,1],[1,4,1],[1,1,4]])

⎡
⎢
⎢
⎣

1 | 2 | −1
1 | 0 | 2
1 | −2 | −1

⎤
⎥
⎥
⎦

,

⎡
⎢
⎢
⎣

6 | 0 | 0
0 | 3 | 0
0 | 0 | 3

⎤
⎥
⎥
⎦

jordan([[4,1,1],[1,4,1],[1,1,4]],P)

⎡
⎢
⎢
⎣

6 | 0 | 0
0 | 3 | 0
0 | 0 | 3

⎤
⎥
⎥
⎦

P

⎡
⎢
⎢
⎣

1 | 2 | −1
1 | 0 | 2
1 | −2 | −1

⎤
⎥
⎥
⎦

If A is symmetric and has eigenvalues with multiple orders, the matrix P returned by 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.

jordan([[4,1,1],[1,4,1],[1,1,4]])

⎡
⎢
⎢
⎣

1 | 2 | −1
1 | 0 | 2
1 | −2 | −1

⎤
⎥
⎥
⎦

,

⎡
⎢
⎢
⎣

6 | 0 | 0
0 | 3 | 0
0 | 0 | 3

⎤
⎥
⎥
⎦