$\begingroup$

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.