This seems to be an elementary question, gonna ask it anyway.
Suppose that $A$ is a square matrix, and that $p(x)$ is its characteristic polynomial, we know that
(1) $p(x) = \det(xE - A)$
We also know that
(2) $p(x) = x^n + a_{n-1}x^{n-1}+...+a_0$
Now, from (1), we deduce that $p(A) = zero$, where "zero" is the number 0.
From (2), we will get $p(A) = ZERO$, where "ZERO" is the zero matrix.
I know I am wrong, so...where I misunderstood?
Would be appreciate if you go into the details.
Thanks.
Edit
I thought that what I was asking is obvious: you substitute the $x$ with $A$ in both (1) and (2), you should get equal results, since (1) and (2) is equal, this follows from the substitution property of the equality. But as argued in the question, we now get different results, so something must be wrong.