If $P^{-1}(D + A)P$ is a diagonal matrix, with $D$ a diagonal matrix and $D+A$ hermitian, is $P^{-1}AP$ also diagonal? Suppose $D+A$ is hermitian matrix, and $D$ is a diagonal matrix. Then $A$ is a hermitian matrix as well.
Since $D+A$ is a hermitian matrix, there exists $P$ such that $P^{-1}(D+A)P$ is a diagonal matrix.
The question is, how do I prove that same $P$ also diagonalizes $A$ such that $P^{-1}AP$ is a diagonal matrix? Or is there a counterexample?
 A: Here is an counter-example. Put \begin{align*} A = \begin{bmatrix} 3 &  i \\ -i & 1 \end{bmatrix},  D= \begin{bmatrix} -2 &  0 \\ 0 & 0 \end{bmatrix} \end{align*}
We can find an unitary matrix $U = \frac{1}{\sqrt{2}}  \begin{bmatrix} 1 &  1 \\ i & -i \end{bmatrix} $ such that $$U^{-1}(D+A)U = \frac{1}{2}
\begin{bmatrix} 1 &  -i \\ 1 & i \end{bmatrix} \begin{bmatrix} 1 &  i \\ -i & 1 \end{bmatrix}\begin{bmatrix} 1 &  1 \\ i & -i \end{bmatrix}=  \begin{bmatrix} 0 & 0 \\ 0 & 2 \end{bmatrix}$$
However, $$U^{-1}AU = \frac{1}{2}
\begin{bmatrix} 1 &  -i \\ 1 & i \end{bmatrix} \begin{bmatrix} 3 &  i \\ -i & 1 \end{bmatrix}\begin{bmatrix} 1 &  1 \\ i & -i \end{bmatrix}=  \begin{bmatrix} 1 & 1 \\ 1 & 3 \end{bmatrix}$$
A: No. For any $n>1$, let $P$ be any entrywise nonzero unitary matrix, $S$ be any real diagonal matrix, $D$ be any real diagonal matrix with distinct diagonal entries and $A=PSP^{-1}-D$. Then


*

*both $D$ and $P^{-1}(D+A)P=S$ are diagonal, and

*$D+A=PSP^{-1}=PSP^\ast$ is Hermitian.


However, $P^{-1}AP$ cannot possibly be diagonal. Suppose the contrary. Then both $D$ and $\Lambda=P^{-1}DP=S-P^{-1}AP$ are diagonal. As they are similar matrices, the diagonal entries of $\Lambda$ are obtained from a permutation of those of $D$. Hence $P^{-1}DP=MDM^T$ for some permutation matrix $M$. It follows that $D(PM)=(PM)D$. However, by definition, all diagonal entries of $D$ are distinct. Hence $PM$ must be a diagonal matrix. In turn, $P$ is the product of a permutation matrix and a diagonal matrix. But this is impossible, because $P$ was chosen to be entrywise nonzero. Hence $P^{-1}AP$ is not diagonal.
