TITLE: Eigenvalues of the sum of a diagonal and a unit matrix
QUESTION [10 upvotes]: I'm trying to find information on the eigenvalues of an $n \times n$  matrix A such that 
$A = D + J$
Where $D$ is some complex valued diagonal matrix, and $J$ is an matrix consisting of all $1$'s.
When $D$  has identical values, the problem is equivalent to finding the eigenvalues of $J$.
So my question is this:
If $D$ has non-identical values (specifically, non-identical imaginary components), 
is there an elementary way to compute the eigenvalues of $A$ ? 
The problem comes from linearising about the origin of a system of $n$ near identical coupled resonators. $D$ relates to the behaviour of each resonator, $J$ relates to the coupling process.

REPLY [13 votes]: There is a formula. Recall that $\det(I-AB)=\det(I-BA)$ for any matrices
$A$ and $B$ such that both products $AB$ and $BA$ are defined. Now
$$
 \det(tI-D-J) = \det(tI-D) \det(I-(tI-D)^{-1}J).
$$
If $u$ is the column vector with each entry equal to 1 then $J=uu^T$ and
$$
 \det(I-(tI-D)^{-1}J) = \det(I-(tI-D)^{-1}uu^T) = \det(1- u^T(tI-D)^{-1}u) = 1-u^T(tI-D)^{-1}u.
$$
If we write $\phi(M,t)$ for the characteristic polynomial off $M$, this yields
$$
 \phi(D+J,t) = \phi(D,t) \left(1-\sum_i \frac1{t-D_{i,i}}\right).
$$
The sum is equal to $\phi'(D,t)/\phi(D,t)$ and therefore the right side equals $\phi(D,t)-\phi'(D,t)$.