Solution (source code)

= Solution

They are <similar matrices>, so \b[their <eigenvalues>, with <algebraic multiplicities>, are identical]. Explicitly,
$$
\det(tI-D^{-1}AD)=\det\bigl(D^{-1}(tI-A)D\bigr)=\det(tI-A).
$$
Moreover their <eigenvectors> correspond by $Av=\lambda v\Longleftrightarrow(D^{-1}AD)(D^{-1}v)=\lambda D^{-1}v$. Since the transformed <matrix> is a real <symmetric matrix>, the <spectral theorem for real symmetric matrices> also shows that $A$ has real <eigenvalues> and is a <diagonalizable matrix>.