Solution (source code)

= Solution

The <Cayley-Hamilton theorem> says that every square complex matrix satisfies its own <characteristic polynomial>: if $\chi_A(t)=t^n+c_{n-1}t^{n-1}+\cdots+c_0$, then
$$
\boxed{\chi_A(A)=A^n+c_{n-1}A^{n-1}+\cdots+c_0I=0.}
$$
For a $2\times2$ <diagonalisable matrix>, write $A=SDS^{-1}$ with $D=\operatorname{diag}(\lambda_1,\lambda_2)$. The <characteristic polynomial> is $(t-\lambda_1)(t-\lambda_2)$, including repeated roots. Evaluating it at $D$ gives zero in each diagonal position, and polynomial evaluation respects <matrix similarity>: $\chi_A(A)=S\chi_A(D)S^{-1}=0$. This proves the requested case.

For the final assertion, let $\lambda$ be any complex <eigenvalue> of $B$, with nonzero <eigenvector> $\mathbf v$. From $B^k=0$ we obtain $0=B^k\mathbf v=\lambda^k\mathbf v$, so $\lambda=0$. The <characteristic polynomial> of this <nilpotent linear map> is therefore $t^n$. Applying the full <Cayley-Hamilton theorem> yields \b[$\boxed{B^n=0}$]. This argument does not assume $B$ is diagonalisable.