$$\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)?
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$$