Can we apply here the Cayley–Hamilton theorem? We have the matrix \begin{equation*}A:=\begin{pmatrix}3 & 1 & 0 & -1& -1 \\ 0 & 2 & 0 & 0 & 0 \\ 1 & 0 & 2 & 0 & -1 \\ 0 & 0 & 0 & 2 & 0 \\ 1 & 0 & 0 & -1 & 1\end{pmatrix}\in M_5(\mathbb{R})\end{equation*}
The characteric polynomial is \begin{equation*}P_A(\lambda)=(2-\lambda)^5\end{equation*}
The eigenvalue $\lambda=2$ has the algebraic multiplicity $5$.
The eigenspace is \begin{equation*}\left \{\begin{pmatrix}e\\ 0\\ c\\ 0\\  e\end{pmatrix}:  c, e\in \mathbb{R}\right \}=\left \{e\begin{pmatrix}1\\ 0\\ 0\\ 0\\  1\end{pmatrix}+c\begin{pmatrix}0\\ 0\\ 1\\ 0\\  0\end{pmatrix}:  c, e\in \mathbb{R}\right \}\end{equation*}
So the geometric multiplicity of the eigenvalue $\lambda=2$ is $2$.
How can we calculate $(A − 2I_5)^3$ ?
Can we apply here the Cayley–Hamilton theorem?

Here, dimension of eigenspace corresponding to the eigenvalue 2 is 2, There are two Jordan canonical forms  possible! So, in one Jordan canonical form, there can be two blocks possible which are of order 3 and order 2 and in another of Jordon canonical form, there can also be possiblity for two blocks of order 4 and 1,
But through the first case max order of block is 3, hence there be possiblity of minimal polynomial of order 3, hence we can use Cayley Hamilton's theorem!                                        For the first case ,Jordon canonical form, $$
    \begin{pmatrix}
    2 & 1 & 0 & 0 & 0 \\
    0 & 2 & 1 & 0 & 0 \\
    0 & 0 & 2 & 0 & 0 \\
    0 & 0 & 0 & 2 & 1 \\
    0 & 0 & 0 & 0 & 2 \\
    \end{pmatrix}
$$
