I was doing some work with diagonalization of a matrix $A$ in order to find a matrix $P$ such that $\,P^{-1}AP\,$ was diagonal. In order to that I set $\;\lambda I_{n}=0\;$ and found the characteristic polynomial and its roots.
When I factored my characteristic polynomial I obtained $\;\lambda^2(\lambda-2),\,$ so $\,\lambda=0,\,2$.
I was taught that the eignenvalues$\,\lambda_{i}\,$ I found become the entries of the diagonal matrix $\,P^{-1}AP.\,$ If this is indeed true, then two of the diagonal entries would be $\,0.\,$ Is this allowed, or must a diagonal matrix strictly have non-zero diagonal entries?