Let $A$ and $B$ be diagonalizable $n$-dimensional square matrices. Suppose each of $A$ and $B$ has no eigenvalues other than $0, 1$.Show that such $A$ and $B$ do not exist.
Any help would be appreciated, thank you.
P.S. Sorry, I missed important condition at first. I assume $A+B=E$.
Your question's wording is confusing, but it you really meant what is written, then the claim is false:
$$A=\begin{pmatrix}1&0\\0&0\end{pmatrix}\;,\;\;B=\begin{pmatrix}0&0\\0&1\end{pmatrix}$$
are both $\;2\times2\;$ diagonal (and thus trivially diagonalizable) matrices with only $\;0,1\;$ eigenvalues, and also
$\;A+B=E\;$ ...