The eigenvalues of the sum of a diagonal matrix and a nilpotent matrix are the entries of the diagonal matrix. Let $L \in [0,1]^{n \times n}$ be a diagonal matrix and $K \in [0,1]^{n \times n}$ be a nilpotent matrix. I want to prove that the eigenvalues the matrix $S = L + K$ are the eigenvalues of the matrix $L$.
I was trying to use the fact that for every nilpotent matrix $K$ there is a permutation matrix $P$ so that the matrix $K1=P^TKP$ is strictly upper triangular and therefore the eigenvalues of $S1=L + K1$ are the eigenvalues of $L$ but I do not know how to prove that the eigenvalues of $S$ are the same with the eigenvalues of $S1$.
 A: It is because they are conjugate : $S_1 = P^{-1}SP$. So a vector $x$ is an eigenvector for $S$ if and only if $P^{-1}x$ is an eigenvector for $S_1$, and in this case the corresponding eigenvalues are the same.
More generally, the results also holds if $K$ is nilpotent and $L$ only commutes with $K$. Indeed, after a suitable field extension, $K$ and $L$ both are triangularizable and commute. So there exists an invertible matrix $P$ such that $P^{-1}KP$ and $P^{-1}LP$ are upper triangular. Then the previous argument is still valid.
EDIT : $S$ and $S_1$ need not be conjugate. For example take $L:=\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0.5\end{pmatrix}$, $K:=\begin{pmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\0 & 0 & 0 & 0 \\0 & 0 & 0 & 0 \end{pmatrix}$ and $P:=\begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{pmatrix}$. Then $L+K = \begin{pmatrix} 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0.5\end{pmatrix}$ and $L+ P^T KP = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0.5 & 1 \\ 0 & 0 & 0 & 0.5\end{pmatrix}$. These matrices cannot be conjugate since they have different Jordan reduction.
