We have an algorithm for computing the rational canonical form of a matrix. How about computing the Jordan canonical form? Well, there's at least a straightforward way to convert the rational canonical form to the Jordan canonical form.
Computing the Jordan blocks
To compute the Jordan canonical form for an matrix , we first compute the invariant factors. For each invariant factor , we factor completely into linear factors:
where the are the distinct roots. For this factor, the corresponding elementary divisors are . We can then write down the corresponding Jordan blocks . Doing this for every invariant factor allows us to write down the Jordan canonical form for .
Computing the change-of-basis matrix
How about if we want to find a change-of-basis matrix such that ? We can compute that, as well. First note that if is the -module generator for the summand corresponding to , then the elements
are -module generators for the summands corresponding to the quotients
To see why this is true, first note that for each the polynomials and are relatively prime; the former is the annihilator of the summand , while the latter is the annihilator of the complement of that summand in the invariant summand . As such, multiplication by provides a surjective morphism .
For each one of these summands, if is the -module generator for the summand corresponding to , then an -vector space basis for that summand is
Note that the basis vectors have been listed in this order so that the corresponding matrix for (on that summand) is the Jordan block, matching the way in which we chose the basis for .
We can use this to algorithmically compute a change-of-basis matrix . We first compute an auxiliary matrix just as we did for the rational canonical form. The nonzero columns of correspond to vectors that generate the invariant factor summands as -modules. We can thus follow the recipe describe above, where takes the role of a nonzero column of . It's easiest to follow this through specific examples.
Examples
Example 1
Let be the matrix
We have seen that the invariant factors of are and . The elementary divisors of are therefore , , , and so the Jordan canonical form is
For a change-of-basis matrix , first recall an auxiliary matrix for this matrix was
For the first nonzero column of (which is a -module generator for the summand corresponding to the first invariant factor ), we compute
Since the summand is 1-dimensional, the single vector is our -basis for that summand.
For the second nonzero column of (which is a -module generator for the summand corresponding to the second invariant factor ), we compute the projections of into the two summands and , respectively:
Again, since each of those summands is 1-dimensional, these are our -bases for those two summands.
A change-of-basis matrix is then
One can verify .
Example 2
Consider the matrix
We have seen that the invariant factors of this matrix are , . The elementary divisors of are therefore , , and so the Jordan canonical form is
An auxiliary matrix for was
The first nonzero column of is a -module generator for the summand . There is nothing to project here, since this summand does not decompose further. (In other words, the invariant factor is also an elementary divisor). That summand is 2-dimensional over , so we compute its -basis:
The second nonzero column of is a -module generator for the second summand . By the identical reasoning used for the previous summand, a -basis for this summand is then