Eigenvalues of $aI + bJ$ Just as context, this problem arose when I was looking at the adjacency matrices of moore graphs of diameter 2.
Given that $I$ is the identity matrix and $J$ is the all 1 matrix. I have constructed some matrix $aI + bJ$. I am completely stuck in terms of how to find the eigenvalues of this matrix. I have considered trying to find the characteristic polynomial, but I have no idea how I would find the determinant of such a matrix.
 A: Write $A = aI+ bJ$. Note that $A-aI = bJ$ has rank 1, so the eigenvalue $a$ has geometric multiplicity $n-1$.
So all that’s left to do is find the other eigenvalue. Trying $\lambda=a+nb$ gives that $A-\lambda I$ has diagonal entries $(1-n)b$ and all other entries $b$. In particular, the sum of all the rows is the zero vector, so this matrix is singular.
Edit: I should note it is assumed here that $b\ne 0$. If $b=0$, then $A-aI=bJ$ is the zero matrix, which has rank 0, so $A$ has eigenvalue $a$ with multiplicity $n$. 
A: here is a matrix that shows a basis of the eigenvectors as columns, these being perpendicular to each other as well. Below is the 10 by 10 case. In smaller dimension, take the upper left square corner.
$$    
 \left(  \begin{array}{rrrrrrrrrr}
  1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1   \\
  1  &  1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1   \\
  1  &  0  &  2  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1   \\
  1  &  0  &  0  &  3  &  -1  &  -1  &  -1  &  -1  &  -1  &  -1   \\
  1  &  0  &  0  &  0  &  4  &  -1  &  -1  &  -1  &  -1  &  -1   \\
  1  &  0  &  0  &  0  &  0  &  5  &  -1  &  -1  &  -1  &  -1   \\
  1  &  0  &  0  &  0  &  0  &  0  &  6  &  -1  &  -1  &  -1   \\
  1  &  0  &  0  &  0  &  0  &  0  &  0  &  7  &  -1  &  -1   \\
  1  &  0  &  0  &  0  &  0  &  0  &  0  &  0  &  8  &  -1   \\
  1  &  0  &  0  &  0  &  0  &  0  &  0  &  0  &  0  &  9   
\end{array}
  \right).
  $$
