Misunderstanding Caley-Hamilton Theorem - Characteristic Polynomial in the Standard/Factorized Form so my question is about the Caley-Hamilton theorem. Consider the following Matrix A.
$$A =\begin{pmatrix}
-1 & 0 & 4 \\
2 & -1 & 0 \\
3 & 2 & -1
\end{pmatrix}$$
The characteristic polynomial is (according to WolframAlpha)
$$\chi_A(X)=-X^3-3X^2+9X+27$$
or in factorized form
$$\chi_A(X)=-(X-3)(X+3)^2.$$
Now, according to CHT, $\chi_A(A)=0$. This is true in this particular case if the characteristic polynomial is in the standard form.
$$\chi_A(A)=-A^3-3A^2+9A+27I_3=0$$
But appearantly, if we use the factorized form of the polynomial, it is false.
$$\chi_A(A)=-(A-3I_3)(A+3I_3)^2\neq 0$$
So, I must be doing something wrong or misunderstanding something. I just don't get where I made a mistake. Any help would be greatly appreciated.
PS: I'm sure that I'm not the first one to ask this question, but I didn't know how to phrase it correctly to find an old answer. Also, I hope my tags are okay.

You have to check your algebra. The same manipulations that show that $$-x^3-3x^2+9X+27=-(x-3)(x+3)^2$$ will work when writing $A$ instead of $x$.
In WA, the matrix product is denoted with a period. And the square is interpreted entrywise. Here is the computation.
