Show that if $p(X) = X^2 - (a+d)X + (ad-bc)$ and $A = \begin{bmatrix}a & b\\c&d\end{bmatrix}$ then $p(A) = 0$
My attempted solution:
$$\begin{align} p(A) &= \begin{bmatrix}a & b\\c&d\end{bmatrix}\begin{bmatrix}a & b\\c&d\end{bmatrix} - (a+d)\begin{bmatrix}a & b\\c&d\end{bmatrix} + (ad-bc) \\ &= \begin{bmatrix}a^2 + bc& ab+ bd\\ca+cd&cb+d^2\end{bmatrix} - \begin{bmatrix}a^2 +da & ab+ db\\ac + dc&ad + d^2\end{bmatrix} + (ad-bc) \\ &= \begin{bmatrix}bc-da & 0\\0&cb-ad\end{bmatrix} + (ad-bc) \\ &= -(ad-bc)\begin{bmatrix}1 & 0\\0&1\end{bmatrix} + (ad-bc) \end{align}$$
Now, $p(A) = 0$, only if $-(ad-bc)\begin{bmatrix}1 & 0\\0&1\end{bmatrix} = -(ad-bc)$, but that would mean treating a scalar multiplied into an identity matrix as a scalar, and I'm absolutely sure you can't do that.
Is there an error in the question or is there an alternate solution? Or am I wrong in saying that this can't be done, which I highly doubt
You should review the definition of what it means to plug a matrix into a polynomial. If $p(x) = a_nx^n + \cdots + a_1x^1 + a_0$, then by definition, we have $$ p(A) = a_nA^n + \cdots + a_1 A^1 + \color{red}{a_0 I} $$ where $I$ denotes the identity matrix. Another way to think of it is this: we define $A^0 = I$ for any matrix $A$. So, $a_0x^0$ becomes $a_0 I$.