# Jordan

The Jordan decomposition of a matrix $A$ is a change of basis where $A$ is written into a diagonal or quasi-diagonal form: $A={P}^{-1}JP$, where $P$ is the change of basis matrix and $J$ is a matrix with the following structure

$\left(\begin{array}{ccccccccc}{\lambda }_{1}& 0& 0& 0& 0& 0& 0& 0& 0\\ 1& {\lambda }_{1}& 0& 0& 0& 0& 0& 0& 0\\ 0& 1& {\lambda }_{1}& 0& 0& 0& 0& 0& 0\\ 0& 0& 0& {\lambda }_{2}& 0& 0& 0& 0& 0\\ 0& 0& 0& 1& {\lambda }_{2}& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& {\lambda }_{3}& 0& 0& 0\\ 0& 0& 0& 0& 0& 0& \ddots & 0& 0\\ 0& 0& 0& 0& 0& 0& 0& {\lambda }_{n}& 1\\ 0& 0& 0& 0& 0& 0& 0& 1& {\lambda }_{n}\end{array}\right)$

where ${\lambda }_{1},...,{\lambda }_{n}$ are the eigenvalues of $A$.

## Syntax

```jordan(Matrix)
```

## Description

Given a matrix, returns the matrix $J$. If the option `transformation_matrix` is set to true, the output is a list with $J$ and $P$.

## Options

Below is a complete list of options that may be used in the `jordan` function.

Option

Description

Format

Default value

transformation_matrix

We can choose if we want the output of the transformation matrix P or not.

`{transformation_matrix=true}`

`transformation_matrix=false`

exact_computations

We can choose to perform or not exact computations.

`{exact_computations=false}`

`true`, but depends on the input