So there is a question that the professor that i don't really understand
I was asked to give the change of basis matrix U and its inverse $U^{-1}$ so that $U^{-1}AU$ is in block triangular form (the original language of the question is not English, so I hope these are the right terms)
$$A=\begin{bmatrix}-5&-4&5\\3&3&-4\\-6&-5&5\end{bmatrix}$$
So the characteristic polynomial would be
$$det(Xid_3-A)=(x-4)(1+x+x^2)$$
Since the characteristic polynomial of A can not be factored in $\Bbb R$, A cannot be triangulated. Now we can find a basis B where the matrix induced by A is block triangular sable.
Let $v=(0,0,1)$ then $(A-4id_V)v=\begin{bmatrix}-9&-4&5\\3&-1&-4\\-6&-5&1\end{bmatrix}\begin{bmatrix}0\\0\\1\end{bmatrix}=\begin{bmatrix}5\\-4\\1\end{bmatrix}$
Define $u:=(A-4id_v)v=\begin{bmatrix}5\\-4\\1\end{bmatrix}$ and $w:=Au=\begin{bmatrix}-4\\-1\\-5\end{bmatrix}$
The vectors $u,v,w$ build a basis in $\Bbb R^3$ because they are linearly independent. In the basis, $B=(w,u,v)$ the representation matrix $L_A$ would be block triangular.
$$(A^2+A+id_3)(A-4id_3)v=0 \rightarrow A Au+Au+u=0 \rightarrow Aw=-w-u$$
Then $$_bM_b(L_A)=\begin{bmatrix}-1&1&0\\-1&0&1\\0&0&4\end{bmatrix}$$
And then it goes on to determine $U,U^{-1}$
My question is, what the hell is all this? Which part of linear algebra is this? I tried to find videos or other online resources where the steps are explained but I couldn't find anything.
What does this do?
EDIT: There is a similar exercise with solutions, maybe helpful in recognising what this is:
$$D=\begin{bmatrix}2&-2&3&3&-3\\0&-2&3&3&-3\\-1&-1&1&2&-3\\0&0&0 &-2&3\\0&0&0&-1&1\end{bmatrix}$$
Determine the similar matrix in block triangular form

where $D_i, 1\le i \le r$ are the companion matrices of an irreducible factor of the characteristic vectors.
We then choose a vector, that does not vanish when multiplied by (D − id5)(D2 + 2id5). We
choose


