JordanForm.jl is an implementation for computing the Jordan form, also known as Jordan normal form and Jordan canonical form, intended for educational use. The Jordan form
However, the structure of
You can read more about the Jordan form on Wikipedia.
Warning
The Jordan form is not numerically stable. Attempting to use this with floating point numbers may yield unexpected results. This package is intended for educational use only.
As previously noted, the Jordan form is not numerically stable. Therefore, we restrict the input to integer and rational matrices. The Jordan form of a matrix jordan_form(A)
. The function returns a factorization struct F = (S, J)
where J
is the Jordan form of A
and S
is the transformation matrix such that A * S = S * J
.
using JordanForm
A = [
1 1 0;
0 2 1;
0 0 3
]
F = jordan_form(A) # or
S, J = jordan_form(A)
@assert A * S ≈ S * J