There is a formula of sorts. 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). $$ If the diagonal entries of $D$ are distinct, the right side equals $\phi(D,t)-\phi'(D,t)$.
Chris Godsil
- 12.1k
- 5
- 37
- 61