Determinant of a otherwise constant matrix with a constant diagonal $$\begin{vmatrix}
a-E&-b&-b&-b&-b\\
-b&a-E&-b&-b&-b\\
-b&-b&a-E&-b&-b\\
-b&-b&-b&a-E&-b\\
-b&-b&-b&-b&a-E
\end{vmatrix}=0$$
I'm asked to show by solving that the two solutions for $E$ are $E=a+b$ and $E=a-4b$. If I add all the rows using row operations I get every term as $a-E-4b$ and so for the matrix to have zero determinant $a-E-4b=0$ which gives we the second solution on rearrangement. How can I obtain the first solution (and indeed the second if my method is not sufficient)?
 A: If you look at the general form of this type of matrix, you have a element $\alpha$ on the diagonal, and some $\beta$ everywhere else. 
We can rewrite such a matrix as:
$$A=(\alpha - \beta)(I+uv^T)$$
Where $v^T=(\beta, \beta, \ldots)$, and $u^T = (1/(\alpha - \beta), 1/(\alpha - \beta), \ldots)$.
Now, by the Matrix determinant lemma, the determinant of such a matrix is simply:
$$\det(A)=(\alpha - \beta)^n\left(1+n\frac{\beta}{\alpha - \beta}\right)$$
In your case, $\alpha=a-E, \beta=-b, n=5$.
The above can be zero if one of the factors is zero, i.e. either:
$$1-n\cdot\frac{b}{a-E+b}=0$$
$$\bf E=a-4b$$
Or:
$$a-E+b=0$$
$$\bf E=a+b$$
A: this matrix is an example of rank one perturbation of the identity matrix. if you take $u = (1,1,\cdots, 1)^\top,$  then the matrix $uu^T$ of all ones is a rank one matrix whose eigenvalues are $\{n, 0,0, \cdots 0\}$ and the corresponding eigenspaces are spanned by $u, u^\perp.$
it can be easily seen that the eiegnvalues of 
$(a+b-e)I -buu^\top,$ which is the matrix in question,  are $\{(a+b-e)-nb, a+b-e, a+b-e, \cdots, a+b-e\}.$ therefore the determinant is $$det\left((a+b-e)I -buu^\top\right)= \left(a-(n-1)b-e\right)(a+b-e)^{n-1}.$$
