# How do I complete the steps of finding the Jordan of this $5\times 5$ matrix (with Octave)?

I know how to begin the procedure but I don't know how to finish it. Let's start with an example (sorry for it being so unwieldy).

Let $$A =\begin{pmatrix} 177& 548& 271& -548& -356\\ 19& 63& 14& -79& -23\\ 8& 24& 17& -20& -20\\ 42& 132& 55& -141& -76\\ 56& 176& 80& -184& -105\end{pmatrix}$$

Find the Jordan canonical form of A and the change of basis matrix.

STEP 1. Find the characteristic polynomial.

You can do this step using the following command

[V, lam] = eig(A)

which produces for the variable lam the eigenvalues with repeats, allowing one to easily deduce the following for the characteristic polynomial.

$$\chi_A(\lambda) = (\lambda - 3)^4(\lambda + 1)$$.

STEP 2. Find the geometric multiplicity for $$\lambda = 3$$.

To do this we must find the nullity, which is equal to $$5 - \text{rank}(A - 3I)$$ by the rank-nullity theorem. Commanding 5 - rank(A - 3 * eye(5)) gives $$2$$.

STEP 3. Find the geometric multiplicity for $$\lambda = -1$$.

To do this we must find the nullity, which is equal to $$5 - \text{rank}(A + I)$$ by the rank-nullity theorem. Commanding 5 - rank(A + eye(5)) gives $$1$$.

STEP 4. Make a table and try to guess the Jordan form.

$$\begin{array}{c|c|c} \lambda & \operatorname{am}_C(\lambda) & \operatorname{gm}_C(\lambda) \\ \hline 3 & 4 & 2 \\ -1 & 1 & 1 \end{array}$$

However in this case we cannot guess, because are two Jordan blocks and their dimensions sum to 4. There are two ways to split 4 into two integers and we don't know which one is it.

How do I proceed? If you could, I would greatly appreciate it if you use the step structure I had been using throughout this post. Ideally with Octave commands.

• do me a favor, what is the minimal polynomial? If I write it as $(\lambda - 3)^k (\lambda +1),$ what is the correct $k \; ? \;$ – Will Jagy Mar 30 at 23:55
• @WillJagy is it $(\lambda - 3)^2(\lambda + 1)$? – ErotemeObelus Mar 30 at 23:56
• I don't now, it should be the lowest degree that still gives the zero matrix when your matrix $A$ is the argument..ummm, is $(A - 3I)(A+I)= 0 ??$ If not, what about $(A - 3I)^2(A+I)= 0 ??$ – Will Jagy Mar 30 at 23:59
• @WillJagy I think that in order to find the minimal polynomial, you have to find the change-of-basis matrix. And to find the change-of-basis matrix, you have to do something regarding generalized eigenvectors that I don't remember. I think there are three more steps required. Once you have JCF, it is easy to inspect the matrix and determine the minimal polynomial. – ErotemeObelus Mar 31 at 0:02
• Actually, no. Cayley-Hamilton says that $(A-3I)^4 (A+I) = 0.$ The minimal polynomial is with the lowest exponent $k$ such that $(A-3I)^k (A+I) = 0.$ One theorem is that $k \geq 1,$ so the possibilities to check are $1 \leq k \leq 4.$ Once you find $k,$ there is a clear path to finding the Jordan form. – Will Jagy Mar 31 at 0:08