Jordan normal form: jordan

### 5.48.5 Jordan normal form: jordan

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]])
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  1 | 2 | −1
  1 | 0 | 2
  1 | −2 | −1
  | ⎤ ⎥ ⎥ ⎦ | , | ⎡ ⎢ ⎢ ⎣ |
  6 | 0 | 0
  0 | 3 | 0
  0 | 0 | 3
  | ⎤ ⎥ ⎥ ⎦

- Input:
  jordan([[4,1,1],[1,4,1],[1,1,4]],P)
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  6 | 0 | 0
  0 | 3 | 0
  0 | 0 | 3
  | ⎤ ⎥ ⎥ ⎦

  then input:
  P
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  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); i.e., tran(P)*P will be a diagonal matrix where the diagonal is the square norm of the eigenvectors.

#### Example

Input:

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

Output:

⎡ ⎢ ⎢ ⎣ |
1 | 2 | −1
1 | 0 | 2
1 | −2 | −1
| ⎤ ⎥ ⎥ ⎦ | , | ⎡ ⎢ ⎢ ⎣ |
6 | 0 | 0
0 | 3 | 0
0 | 0 | 3
| ⎤ ⎥ ⎥ ⎦